Update Extensions for Harmony/GPT-OSS Tool Calling Support - #2200
Merged
Conversation
added 2 commits
May 12, 2026 14:29
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the onnxruntime-extensions dependency and extends the Python model-qa.py example to support “tools-only” tool calling flows used by Harmony/GPT-OSS chat templates (i.e., passing tools via the tools parameter to apply_chat_template without embedding them into the message list).
Changes:
- Bump
onnxruntime_extensionsto commit97809255e4cfc6fdee2b32d565935067c0309f8b(includes Harmony/GPT-OSS skip-normalization behavior). - Add an
elif args.tools_filebranch inexamples/python/model-qa.pyto load tools from a file even when constrained decoding guidance isn’t enabled.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
cmake/deps.txt |
Updates the pinned onnxruntime_extensions git commit to a newer revision. |
examples/python/model-qa.py |
Adds a tools-only path to pass tools into apply_chat_template for native tool-calling templates. |
added 2 commits
June 9, 2026 11:45
…into sayanshaw/harmony-tool-calling
sayanshaw24
enabled auto-merge (squash)
June 9, 2026 18:47
added 3 commits
June 9, 2026 12:03
kunal-vaishnavi
approved these changes
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update ort-extensions for Harmony/GPT-OSS tool calling support
Summary
Updates the ort-extensions dependency to include the merged Skip Tool Normalization for GPT-OSS/Harmony Templates PR, and adds a tools-only path to
model-qa.pyfor models that handle tool calling natively via their chat template (without constrained decoding).Changes
cmake/deps.txtonnxruntime_extensionsSHA to97809255e4cfc6fdee2b32d565935067c0309f8b(includes Harmony skip-normalization fix)Context
GPT-OSS (Harmony) models use chat templates that access
tool.functiondirectly, expecting the raw OpenAI tool format. The previousNormalizeTools()logic in ort-extensions unwrapped the function object, breaking these templates. The updated extensions commit skips normalization when the template content indicates it expects raw tool objects.Testing
gpt-oss-20b-generic-cpuin Foundry Local with full tool-call round-trip (tool call generation → tool execution → final response)Related PRs