-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
fix(sse): enable tool calling for GPT OSS and DeepSeek Reasoner models #1455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,8 +79,8 @@ test("model capability helpers cover denylist, empty input and default-safe path | |
| assert.equal(modelCapabilities.supportsReasoning("missing-provider/tool"), true); | ||
|
|
||
| assert.equal(modelCapabilities.supportsToolCalling(""), false); | ||
| assert.equal(modelCapabilities.supportsToolCalling("openai/gpt-oss-120b"), false); | ||
| assert.equal(modelCapabilities.supportsToolCalling("deepseek-reasoner"), false); | ||
| assert.equal(modelCapabilities.supportsToolCalling("openai/gpt-oss-120b"), true); | ||
| assert.equal(modelCapabilities.supportsToolCalling("deepseek-reasoner"), true); | ||
|
Comment on lines
+82
to
+83
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test imports Unless these two paths point to the same file (e.g., via a symlink), updating these assertions to
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
export {
getResolvedModelCapabilities,
supportsReasoning,
supportsToolCalling,
} from "../../src/lib/modelCapabilities.ts";Both import paths resolve to the same implementation. The test assertions are correct and pass against the modified code. |
||
| assert.equal( | ||
| modelCapabilities.supportsToolCalling("openai/nonexistent-default-safe-model"), | ||
| true | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By emptying
TOOL_CALLING_UNSUPPORTED_PATTERNS, theheuristicToolCallingfunction (lines 126-135) will now returntruefor any non-empty model string that isn't explicitly defined inMODEL_SPECS, the registry, or synced data.While this unblocks the intended models, it also changes the default behavior for all unknown models to "supported". If there are other older or specialized models that definitely do not support tool calling and are not in the registry, they will now be incorrectly reported as supporting it. Consider if a minimal blocklist should be maintained for such cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The heuristic was already default-
truefor all unknown models before this PR -- the blocklist only contained these 2 entries. Emptying it removes 2 false positives; it does not change the paradigm.Models that genuinely do not support tool calling should have
toolCalling: falseset explicitly in their registry entry or aModelSpecwithsupportsTools: false, both of which take priority over the heuristic (resolution layers 1-3). The heuristic at layer 4 is intentionally optimistic as a fallback for models with no capability data.No other models in the codebase relied on this blocklist for correctness -- all other tool-calling restrictions are handled by explicit registry fields or model specs.