fix(sse): enable tool calling for GPT OSS and DeepSeek Reasoner models (#1455)

Integrated into release/v3.7.0
This commit is contained in:
Marcus Bearden
2026-04-21 08:50:00 +01:00
committed by GitHub
parent ceca26ae87
commit 496114ae8b
4 changed files with 23 additions and 6 deletions

View File

@@ -1199,9 +1199,9 @@ export const REGISTRY: Record<string, RegistryEntry> = {
authType: "apikey",
authHeader: "bearer",
models: [
{ id: "gpt-oss-120b", name: "GPT OSS 120B", toolCalling: false },
{ id: "openai/gpt-oss-120b", name: "GPT OSS 120B (OpenAI Prefix)", toolCalling: false },
{ id: "openai/gpt-oss-20b", name: "GPT OSS 20B", toolCalling: false },
{ id: "gpt-oss-120b", name: "GPT OSS 120B" },
{ id: "openai/gpt-oss-120b", name: "GPT OSS 120B (OpenAI Prefix)" },
{ id: "openai/gpt-oss-20b", name: "GPT OSS 20B" },
{ id: "meta/llama-3.3-70b-instruct", name: "Llama 3.3 70B" },
{ id: "nvidia/llama-3.3-70b-instruct", name: "Llama 3.3 70B (NVIDIA Prefix)" },
{ id: "meta/llama-4-maverick-17b-128e-instruct", name: "Llama 4 Maverick" },

View File

@@ -6,7 +6,7 @@ import { parseModel, resolveCanonicalProviderModel } from "@omniroute/open-sse/s
import { MODEL_SPECS, getModelSpec, type ModelSpec } from "@/shared/constants/modelSpecs";
import { getSyncedCapability } from "@/lib/modelsDevSync";
const TOOL_CALLING_UNSUPPORTED_PATTERNS = ["gpt-oss-120b", "deepseek-reasoner"];
const TOOL_CALLING_UNSUPPORTED_PATTERNS: string[] = [];
const REASONING_UNSUPPORTED_PATTERNS = [
"antigravity/claude-sonnet-4-6",
"antigravity/claude-sonnet-4-5",

View File

@@ -103,3 +103,20 @@ test("canonical model capability resolver merges models.dev data and keeps stati
32768
);
});
test("GPT OSS and DeepSeek Reasoner models support tool calling", () => {
// GPT OSS models should not be blocked by the heuristic
assert.equal(modelCapabilities.supportsToolCalling("nvidia/gpt-oss-120b"), true);
assert.equal(modelCapabilities.supportsToolCalling("gpt-oss-120b"), true);
assert.equal(modelCapabilities.supportsToolCalling("openai/gpt-oss-20b"), true);
// DeepSeek Reasoner supports tool calling
assert.equal(modelCapabilities.supportsToolCalling("deepseek-reasoner"), true);
assert.equal(modelCapabilities.supportsToolCalling("deepseek/deepseek-r1"), true);
// Full capability resolution
const gptOss = modelCapabilities.getResolvedModelCapabilities("nvidia/gpt-oss-120b");
assert.equal(gptOss.toolCalling, true);
const deepseek = modelCapabilities.getResolvedModelCapabilities("deepseek/deepseek-reasoner");
assert.equal(deepseek.toolCalling, true);
});

View File

@@ -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);
assert.equal(
modelCapabilities.supportsToolCalling("openai/nonexistent-default-safe-model"),
true