diff --git a/packages/ai/test/issue-945-repro.test.ts b/packages/ai/test/issue-945-repro.test.ts index d38b0bcf0..95578963b 100644 --- a/packages/ai/test/issue-945-repro.test.ts +++ b/packages/ai/test/issue-945-repro.test.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from "bun:test"; import { type } from "@oh-my-pi/omptype"; -import { streamOpenAICompletions } from "@oh-my-pi/pi-ai/providers/openai-completions"; +import { type OpenAICompletionsOptions, streamOpenAICompletions } from "@oh-my-pi/pi-ai/providers/openai-completions"; +import { type OpenAIResponsesOptions, streamOpenAIResponses } from "@oh-my-pi/pi-ai/providers/openai-responses"; import type { Context, Model, Tool } from "@oh-my-pi/pi-ai/types"; import { getBundledModel } from "@oh-my-pi/pi-catalog/models"; @@ -23,7 +24,7 @@ function abortedSignal(): AbortSignal { async function capturePayload( model: Model<"openai-completions">, - opts: Parameters[2], + opts: OpenAICompletionsOptions, ): Promise> { const { promise, resolve } = Promise.withResolvers(); streamOpenAICompletions(model, context, { @@ -35,12 +36,36 @@ async function capturePayload( return (await promise) as Record; } +async function captureResponsesPayload( + model: Model<"openai-responses">, + opts: OpenAIResponsesOptions, +): Promise> { + const { promise, resolve } = Promise.withResolvers(); + streamOpenAIResponses(model, context, { + ...opts, + apiKey: "test-key", + signal: abortedSignal(), + onPayload: payload => resolve(payload), + }); + return (await promise) as Record; +} + describe("OpenCode Go tool_choice compatibility", () => { it("marks deepseek-v4-pro as not supporting tool_choice via compat override", () => { const model = getBundledModel("opencode-go", "deepseek-v4-pro") as Model<"openai-completions">; expect(model.compat?.supportsToolChoice).toBe(false); }); + it("omits forced tool_choice from DeepSeek Flash Responses payloads while preserving tools", async () => { + const model = getBundledModel("opencode-go", "deepseek-v4-flash") as Model<"openai-responses">; + expect(model.compat.supportsToolChoice).toBe(false); + const body = await captureResponsesPayload(model, { + toolChoice: { type: "tool", name: "echo" }, + }); + expect(body.tools).toEqual([expect.objectContaining({ type: "function", name: "echo" })]); + expect(body.tool_choice).toBeUndefined(); + }); + it("marks mimo-v2.5-pro as not supporting tool_choice via compat override", () => { const model = getBundledModel("opencode-go", "mimo-v2.5-pro") as Model<"openai-completions">; expect(model.compat?.supportsToolChoice).toBe(false); diff --git a/packages/catalog/CHANGELOG.md b/packages/catalog/CHANGELOG.md index 4f0617a76..eb89422f6 100644 --- a/packages/catalog/CHANGELOG.md +++ b/packages/catalog/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Fixed + +- Fixed `opencode-go/deepseek-v4-flash` Responses requests sending forced named `tool_choice` selectors that Console Go rejects while thinking mode is active. + ## [17.2.12] - 2026-08-08 ### Fixed diff --git a/packages/catalog/scripts/generated-policies.ts b/packages/catalog/scripts/generated-policies.ts index b53631849..a4c3f65f6 100644 --- a/packages/catalog/scripts/generated-policies.ts +++ b/packages/catalog/scripts/generated-policies.ts @@ -391,7 +391,7 @@ function applyGeneratedModelPolicy(model: ModelSpec): void { }; } if ( - model.api === "openai-completions" && + (model.api === "openai-completions" || model.api === "openai-responses") && model.provider === "opencode-go" && (model.id === "deepseek-v4-flash" || model.id === "deepseek-v4-pro") ) { diff --git a/packages/catalog/src/models.json b/packages/catalog/src/models.json index 1dae17096..ba063f39d 100644 --- a/packages/catalog/src/models.json +++ b/packages/catalog/src/models.json @@ -16,7 +16,7 @@ "cacheRead": 0, "cacheWrite": 0 }, - "contextWindow": 1048576, + "contextWindow": 1000000, "maxTokens": 393216, "thinking": { "mode": "effort", @@ -25,8 +25,7 @@ "high", "max" ] - }, - "supportsComputerUse": false + } }, "deepseek-ai/deepseek-v4-pro": { "id": "deepseek-ai/deepseek-v4-pro", @@ -44,7 +43,7 @@ "cacheRead": 0, "cacheWrite": 0 }, - "contextWindow": 1048576, + "contextWindow": 1000000, "maxTokens": 393216, "thinking": { "mode": "effort", @@ -52,8 +51,7 @@ "high", "max" ] - }, - "supportsComputerUse": false + } }, "google/gemma-4-31b-it": { "id": "google/gemma-4-31b-it", @@ -83,8 +81,37 @@ "high", "xhigh" ] + } + }, + "moonshotai/kimi-k2.6": { + "id": "moonshotai/kimi-k2.6", + "name": "Kimi K2.6", + "api": "openai-completions", + "provider": "aiand", + "baseUrl": "https://api.aiand.com/v1", + "reasoning": true, + "input": [ + "text", + "image" + ], + "cost": { + "input": 0.85, + "output": 3.5, + "cacheRead": 0, + "cacheWrite": 0 }, - "supportsComputerUse": false + "contextWindow": 262144, + "maxTokens": 262144, + "thinking": { + "mode": "effort", + "efforts": [ + "minimal", + "low", + "medium", + "high", + "xhigh" + ] + } }, "moonshotai/kimi-k2.7-code": { "id": "moonshotai/kimi-k2.7-code", @@ -114,8 +141,7 @@ "high", "xhigh" ] - }, - "supportsComputerUse": false + } }, "moonshotai/kimi-k3": { "id": "moonshotai/kimi-k3", @@ -176,8 +202,7 @@ "medium", "high" ] - }, - "supportsComputerUse": false + } }, "qwen/qwen3.6-27b": { "id": "qwen/qwen3.6-27b", @@ -191,8 +216,8 @@ "image" ], "cost": { - "input": 0.32, - "output": 3.2, + "input": 0, + "output": 0, "cacheRead": 0, "cacheWrite": 0 }, @@ -206,8 +231,36 @@ "medium", "high" ] + } + }, + "zai-org/glm-5.1": { + "id": "zai-org/glm-5.1", + "name": "GLM 5.1", + "api": "openai-completions", + "provider": "aiand", + "baseUrl": "https://api.aiand.com/v1", + "reasoning": true, + "input": [ + "text" + ], + "cost": { + "input": 1.4, + "output": 4.4, + "cacheRead": 0, + "cacheWrite": 0 }, - "supportsComputerUse": false + "contextWindow": 202752, + "maxTokens": 131072, + "thinking": { + "mode": "effort", + "efforts": [ + "minimal", + "low", + "medium", + "high", + "xhigh" + ] + } }, "zai-org/glm-5.2": { "id": "zai-org/glm-5.2", @@ -225,7 +278,7 @@ "cacheRead": 0, "cacheWrite": 0 }, - "contextWindow": 1048576, + "contextWindow": 1000000, "maxTokens": 131072, "thinking": { "mode": "effort", @@ -236,8 +289,7 @@ "high", "max" ] - }, - "supportsComputerUse": false + } } }, "aimlapi": { @@ -11973,9 +12025,7 @@ "max" ], "supportsDisplay": true - }, - "supportsComputerUse": false, - "supportsComputerUseConfig": false + } }, "claude-opus-4-0": { "id": "claude-opus-4-0", @@ -15899,6 +15949,35 @@ ] } }, + "nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B": { + "id": "nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B", + "name": "Nemotron 3.5 Lightning", + "api": "openai-completions", + "provider": "coreweave", + "baseUrl": "https://api.inference.wandb.ai/v1", + "reasoning": true, + "input": [ + "text" + ], + "cost": { + "input": 0.1, + "output": 0.25, + "cacheRead": 0.05, + "cacheWrite": 0 + }, + "contextWindow": 262144, + "maxTokens": 262144, + "thinking": { + "mode": "effort", + "efforts": [ + "minimal", + "low", + "medium", + "high", + "xhigh" + ] + } + }, "openai/gpt-oss-120b": { "id": "openai/gpt-oss-120b", "name": "gpt-oss-120b", @@ -28580,9 +28659,9 @@ "text" ], "cost": { - "input": 0.0896, - "output": 0.1792, - "cacheRead": 0.01792, + "input": 0.079996, + "output": 0.252, + "cacheRead": 0.0252, "cacheWrite": 0 }, "contextWindow": 1048576, @@ -29304,7 +29383,7 @@ }, "anthropic/claude-3.5-haiku": { "id": "anthropic/claude-3.5-haiku", - "name": "Claude 3.5 Haiku", + "name": "Claude Haiku 3.5", "api": "openai-completions", "provider": "kilo", "baseUrl": "https://api.kilo.ai/api/gateway", @@ -31009,7 +31088,7 @@ "cacheWrite": 0 }, "contextWindow": 1048576, - "maxTokens": 384000, + "maxTokens": 393216, "thinking": { "mode": "effort", "efforts": [ @@ -31892,7 +31971,7 @@ "cacheWrite": 0 }, "contextWindow": 262144, - "maxTokens": 16384, + "maxTokens": 262144, "thinking": { "mode": "effort", "efforts": [ @@ -33018,7 +33097,7 @@ "cacheRead": 0, "cacheWrite": 0 }, - "contextWindow": 1048576, + "contextWindow": 128000, "maxTokens": 16384 }, "meta-llama/llama-4-scout": { @@ -33124,6 +33203,36 @@ "supportsComputerUse": false, "supportsComputerUseConfig": false }, + "meta/muse-glimmer-30b": { + "id": "meta/muse-glimmer-30b", + "name": "Muse Glimmer 30B", + "api": "openai-completions", + "provider": "kilo", + "baseUrl": "https://api.kilo.ai/api/gateway", + "reasoning": true, + "input": [ + "text", + "image" + ], + "cost": { + "input": 0.35, + "output": 1.5, + "cacheRead": 0.04, + "cacheWrite": 0 + }, + "contextWindow": 131072, + "maxTokens": 131072, + "thinking": { + "mode": "effort", + "efforts": [ + "minimal", + "low", + "medium", + "high", + "xhigh" + ] + } + }, "meta/muse-spark-1.1": { "id": "meta/muse-spark-1.1", "name": "Muse Spark 1.1", @@ -34742,7 +34851,7 @@ "cacheWrite": 0 }, "contextWindow": 262144, - "maxTokens": 262144, + "maxTokens": 228000, "thinking": { "mode": "effort", "efforts": [ @@ -35836,7 +35945,7 @@ "cacheWrite": 0 }, "contextWindow": 128000, - "maxTokens": 16384 + "maxTokens": 32000 }, "openai/gpt-5.2-codex": { "id": "openai/gpt-5.2-codex", @@ -35904,8 +36013,7 @@ "baseUrl": "https://api.kilo.ai/api/gateway", "reasoning": false, "input": [ - "text", - "image" + "text" ], "cost": { "input": 1.75, @@ -35914,7 +36022,8 @@ "cacheWrite": 0 }, "contextWindow": 128000, - "maxTokens": 16384 + "maxTokens": 16384, + "supportsComputerUse": false }, "openai/gpt-5.3-codex": { "id": "openai/gpt-5.3-codex", @@ -37733,8 +37842,8 @@ "cacheRead": 0, "cacheWrite": 0 }, - "contextWindow": 131072, - "maxTokens": 8192, + "contextWindow": 40960, + "maxTokens": 16384, "thinking": { "mode": "effort", "efforts": [ @@ -37988,8 +38097,8 @@ "cacheRead": 0, "cacheWrite": 0 }, - "contextWindow": 160000, - "maxTokens": 32768 + "contextWindow": 262144, + "maxTokens": 262144 }, "qwen/qwen3-coder-flash": { "id": "qwen/qwen3-coder-flash", @@ -38440,7 +38549,7 @@ "cacheWrite": 0 }, "contextWindow": 262144, - "maxTokens": 65536, + "maxTokens": 262144, "thinking": { "mode": "effort", "efforts": [ @@ -39061,6 +39170,36 @@ ] } }, + "sakana/sakana-namazu": { + "id": "sakana/sakana-namazu", + "name": "Sakana Namazu", + "api": "openai-completions", + "provider": "kilo", + "baseUrl": "https://api.kilo.ai/api/gateway", + "reasoning": true, + "input": [ + "text", + "image" + ], + "cost": { + "input": 0.95, + "output": 4, + "cacheRead": 0.15, + "cacheWrite": 0 + }, + "contextWindow": 262144, + "maxTokens": 65536, + "thinking": { + "mode": "effort", + "efforts": [ + "minimal", + "low", + "medium", + "high", + "xhigh" + ] + } + }, "sao10k/l3-euryale-70b": { "id": "sao10k/l3-euryale-70b", "name": "Llama 3 Euryale 70B v2.1", @@ -39809,6 +39948,35 @@ ] } }, + "upstage/solar-pro4": { + "id": "upstage/solar-pro4", + "name": "Solar Pro 4", + "api": "openai-completions", + "provider": "kilo", + "baseUrl": "https://api.kilo.ai/api/gateway", + "reasoning": true, + "input": [ + "text" + ], + "cost": { + "input": 0.3, + "output": 1.2, + "cacheRead": 0.06, + "cacheWrite": 0 + }, + "contextWindow": 524288, + "maxTokens": 131072, + "thinking": { + "mode": "effort", + "efforts": [ + "minimal", + "low", + "medium", + "high", + "xhigh" + ] + } + }, "writer/palmyra-x5": { "id": "writer/palmyra-x5", "name": "Palmyra X5", @@ -40564,7 +40732,7 @@ "cacheRead": 0.11, "cacheWrite": 0 }, - "contextWindow": 202752, + "contextWindow": 204800, "maxTokens": 131072, "thinking": { "mode": "effort", @@ -40789,8 +40957,8 @@ "cacheRead": 0.26, "cacheWrite": 0 }, - "contextWindow": 1024000, - "maxTokens": 128000, + "contextWindow": 262144, + "maxTokens": 262144, "thinking": { "mode": "effort", "efforts": [ @@ -50728,6 +50896,54 @@ ] } }, + "inclusionai/ling-3.0-tiny": { + "id": "inclusionai/ling-3.0-tiny", + "name": "Ling 3.0 Tiny", + "api": "openai-completions", + "provider": "nanogpt", + "baseUrl": "https://nano-gpt.com/api/v1", + "reasoning": false, + "input": [ + "text" + ], + "cost": { + "input": 0.1, + "output": 0.2, + "cacheRead": 0.01, + "cacheWrite": 0 + }, + "contextWindow": 262144, + "maxTokens": 32768 + }, + "inclusionai/ling-3.0-tiny:thinking": { + "id": "inclusionai/ling-3.0-tiny:thinking", + "name": "Ling 3.0 Tiny Thinking", + "api": "openai-completions", + "provider": "nanogpt", + "baseUrl": "https://nano-gpt.com/api/v1", + "reasoning": true, + "input": [ + "text" + ], + "cost": { + "input": 0.1, + "output": 0.2, + "cacheRead": 0.01, + "cacheWrite": 0 + }, + "contextWindow": 262144, + "maxTokens": 32768, + "thinking": { + "mode": "effort", + "efforts": [ + "minimal", + "low", + "medium", + "high", + "xhigh" + ] + } + }, "inclusionai/ring-2.6-1t": { "id": "inclusionai/ring-2.6-1t", "name": "Ring 2.6 1T", @@ -55573,8 +55789,7 @@ "baseUrl": "https://nano-gpt.com/api/v1", "reasoning": false, "input": [ - "text", - "image" + "text" ], "cost": { "input": 0, @@ -60528,7 +60743,7 @@ "cacheWrite": 0 }, "contextWindow": 1048576, - "maxTokens": 65535, + "maxTokens": 1048576, "thinking": { "mode": "effort", "efforts": [ @@ -64211,7 +64426,7 @@ "api": "openai-completions", "provider": "novita", "baseUrl": "https://api.novita.ai/openai/v1", - "reasoning": true, + "reasoning": false, "input": [ "text" ], @@ -64224,16 +64439,6 @@ "contextWindow": 262144, "maxTokens": 32768, "supportsTools": true, - "thinking": { - "mode": "effort", - "efforts": [ - "minimal", - "low", - "medium", - "high", - "xhigh" - ] - }, "supportsComputerUse": false, "supportsComputerUseConfig": false }, @@ -64436,9 +64641,9 @@ "text" ], "cost": { - "input": 0, - "output": 0, - "cacheRead": 0, + "input": 0.45, + "output": 2.6, + "cacheRead": 0.08, "cacheWrite": 0 }, "contextWindow": 262144, @@ -73180,6 +73385,12 @@ }, "contextWindow": 1000000, "maxTokens": 384000, + "compat": { + "supportsToolChoice": false, + "maxTokensField": "max_tokens", + "reasoningContentField": "reasoning_content", + "requiresReasoningContentForToolCalls": true + }, "thinking": { "mode": "effort", "efforts": [ @@ -76339,9 +76550,9 @@ "text" ], "cost": { - "input": 0.0896, - "output": 0.1792, - "cacheRead": 0.017920000000000002, + "input": 0.079996, + "output": 0.252, + "cacheRead": 0.0252, "cacheWrite": 0 }, "contextWindow": 1048576, @@ -76859,7 +77070,7 @@ }, "anthropic/claude-3.5-haiku": { "id": "anthropic/claude-3.5-haiku", - "name": "Claude 3.5 Haiku", + "name": "Claude Haiku 3.5", "api": "openrouter", "baseUrl": "https://openrouter.ai/api/v1", "provider": "openrouter", @@ -78349,7 +78560,7 @@ }, "deepseek/deepseek-chat": { "id": "deepseek/deepseek-chat", - "name": "DeepSeek-V3.2 (Non-thinking Mode)", + "name": "DeepSeek Chat", "api": "openrouter", "baseUrl": "https://openrouter.ai/api/v1", "provider": "openrouter", @@ -78618,9 +78829,9 @@ "text" ], "cost": { - "input": 0.09, + "input": 0.08, "output": 0.18, - "cacheRead": 0.018, + "cacheRead": 0.016, "cacheWrite": 0 }, "contextWindow": 1048576, @@ -78676,13 +78887,13 @@ "text" ], "cost": { - "input": 0.435, - "output": 0.87, - "cacheRead": 0.003625, + "input": 0.63168, + "output": 1.26336, + "cacheRead": 0.053298, "cacheWrite": 0 }, "contextWindow": 1048576, - "maxTokens": 384000, + "maxTokens": 393216, "thinking": { "mode": "effort", "efforts": [ @@ -79641,13 +79852,13 @@ "image" ], "cost": { - "input": 0.07, - "output": 0.33999999999999997, + "input": 0.12, + "output": 0.39999999999999997, "cacheRead": 0.049999999999999996, "cacheWrite": 0 }, "contextWindow": 262144, - "maxTokens": 16384, + "maxTokens": 262144, "thinking": { "mode": "effort", "efforts": [ @@ -80385,7 +80596,7 @@ ], "cost": { "input": 0.19999999999999998, - "output": 0.7999999999999999, + "output": 0.696, "cacheRead": 0, "cacheWrite": 0 }, @@ -80416,6 +80627,36 @@ "supportsComputerUse": false, "supportsComputerUseConfig": false }, + "meta/muse-glimmer-30b": { + "id": "meta/muse-glimmer-30b", + "name": "Muse Glimmer 30B", + "api": "openrouter", + "provider": "openrouter", + "baseUrl": "https://openrouter.ai/api/v1", + "reasoning": true, + "input": [ + "text", + "image" + ], + "cost": { + "input": 0.35, + "output": 1.5, + "cacheRead": 0.04, + "cacheWrite": 0 + }, + "contextWindow": 131072, + "maxTokens": 131072, + "thinking": { + "mode": "effort", + "efforts": [ + "minimal", + "low", + "medium", + "high" + ] + }, + "supportsComputerUse": false + }, "meta/muse-spark-1.1": { "id": "meta/muse-spark-1.1", "name": "Muse Spark 1.1", @@ -81436,9 +81677,9 @@ "image" ], "cost": { - "input": 0.5795, - "output": 2.44, - "cacheRead": 0.0976, + "input": 0.95, + "output": 4, + "cacheRead": 0.16, "cacheWrite": 0 }, "contextWindow": 262144, @@ -81821,11 +82062,11 @@ "cost": { "input": 0.049999999999999996, "output": 0.19999999999999998, - "cacheRead": 0.03, + "cacheRead": 0.024999999999999998, "cacheWrite": 0 }, "contextWindow": 262144, - "maxTokens": 262144, + "maxTokens": 228000, "thinking": { "mode": "effort", "efforts": [ @@ -83300,7 +83541,7 @@ "cacheWrite": 0 }, "contextWindow": 128000, - "maxTokens": 16384, + "maxTokens": 32000, "supportsComputerUse": false, "supportsComputerUseConfig": false }, @@ -83436,8 +83677,7 @@ "baseUrl": "https://openrouter.ai/api/v1", "reasoning": false, "input": [ - "text", - "image" + "text" ], "cost": { "input": 1.75, @@ -85693,13 +85933,13 @@ "text" ], "cost": { - "input": 0.22749999999999998, - "output": 0.9099999999999999, + "input": 0.12, + "output": 0.24, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 131072, - "maxTokens": 8192, + "maxTokens": 16384, "thinking": { "mode": "effort", "efforts": [ @@ -86029,12 +86269,12 @@ ], "cost": { "input": 0.07, - "output": 0.27, + "output": 0.28, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 262144, - "maxTokens": 32768, + "maxTokens": 262144, "supportsComputerUse": false, "supportsComputerUseConfig": false }, @@ -86557,13 +86797,13 @@ "image" ], "cost": { - "input": 0.39, - "output": 2.34, - "cacheRead": 0.22499999999999998, + "input": 0.5, + "output": 3.5999999999999996, + "cacheRead": 0.3, "cacheWrite": 0 }, "contextWindow": 262144, - "maxTokens": 65536, + "maxTokens": 262144, "thinking": { "mode": "effort", "efforts": [ @@ -87164,6 +87404,36 @@ "supportsComputerUse": false, "supportsComputerUseConfig": false }, + "sakana/sakana-namazu": { + "id": "sakana/sakana-namazu", + "name": "Sakana Namazu", + "api": "openrouter", + "provider": "openrouter", + "baseUrl": "https://openrouter.ai/api/v1", + "reasoning": true, + "input": [ + "text", + "image" + ], + "cost": { + "input": 0.95, + "output": 4, + "cacheRead": 0.15, + "cacheWrite": 0 + }, + "contextWindow": 262144, + "maxTokens": 65536, + "thinking": { + "mode": "effort", + "efforts": [ + "minimal", + "low", + "medium", + "high" + ] + }, + "supportsComputerUse": false + }, "sao10k/l3-euryale-70b": { "id": "sao10k/l3-euryale-70b", "name": "Llama 3 Euryale 70B v2.1", @@ -87678,6 +87948,35 @@ "supportsComputerUse": false, "supportsComputerUseConfig": false }, + "upstage/solar-pro4": { + "id": "upstage/solar-pro4", + "name": "Solar Pro 4", + "api": "openrouter", + "provider": "openrouter", + "baseUrl": "https://openrouter.ai/api/v1", + "reasoning": true, + "input": [ + "text" + ], + "cost": { + "input": 0.03, + "output": 0.12, + "cacheRead": 0.006, + "cacheWrite": 0 + }, + "contextWindow": 524288, + "maxTokens": 131072, + "thinking": { + "mode": "effort", + "efforts": [ + "minimal", + "low", + "medium", + "high" + ] + }, + "supportsComputerUse": false + }, "x-ai/grok-3": { "id": "x-ai/grok-3", "name": "Grok 3", @@ -88358,9 +88657,9 @@ "text" ], "cost": { - "input": 0.5, - "output": 2, - "cacheRead": 0.09999999999999999, + "input": 0.55, + "output": 2.2, + "cacheRead": 0.11, "cacheWrite": 0 }, "contextWindow": 204800, @@ -88560,9 +88859,9 @@ "text" ], "cost": { - "input": 0.952, - "output": 2.992, - "cacheRead": 0.17679999999999998, + "input": 1.4, + "output": 4.4, + "cacheRead": 0.26, "cacheWrite": 0 }, "contextWindow": 204800, @@ -88590,13 +88889,13 @@ "text" ], "cost": { - "input": 0.182, - "output": 0.572, - "cacheRead": 0.0338, + "input": 0.76, + "output": 2.42, + "cacheRead": 0.14, "cacheWrite": 0 }, "contextWindow": 1048576, - "maxTokens": 128000, + "maxTokens": 262144, "thinking": { "mode": "effort", "efforts": [ @@ -88826,9 +89125,69 @@ } }, "synthetic": { + "hf:MiniMaxAI/MiniMax-M3": { + "id": "hf:MiniMaxAI/MiniMax-M3", + "name": "MiniMax-M3", + "api": "openai-completions", + "provider": "synthetic", + "baseUrl": "https://api.synthetic.new/openai/v1", + "reasoning": true, + "input": [ + "text", + "image" + ], + "cost": { + "input": 0.6, + "output": 1.2, + "cacheRead": 0.6, + "cacheWrite": 0 + }, + "contextWindow": 524288, + "maxTokens": 65536, + "thinking": { + "mode": "effort", + "efforts": [ + "minimal", + "low", + "medium", + "high", + "xhigh" + ] + } + }, + "hf:moonshotai/Kimi-K2.7-Code": { + "id": "hf:moonshotai/Kimi-K2.7-Code", + "name": "Kimi K2.7 Code", + "api": "openai-completions", + "provider": "synthetic", + "baseUrl": "https://api.synthetic.new/openai/v1", + "reasoning": true, + "input": [ + "text", + "image" + ], + "cost": { + "input": 0.95, + "output": 4, + "cacheRead": 0.95, + "cacheWrite": 0 + }, + "contextWindow": 262144, + "maxTokens": 65536, + "thinking": { + "mode": "effort", + "efforts": [ + "minimal", + "low", + "medium", + "high", + "xhigh" + ] + } + }, "hf:moonshotai/Kimi-K3": { "id": "hf:moonshotai/Kimi-K3", - "name": "moonshotai/Kimi-K3", + "name": "Kimi K3", "api": "openai-completions", "provider": "synthetic", "baseUrl": "https://api.synthetic.new/openai/v1", @@ -88857,13 +89216,11 @@ "max": "max" }, "requiresEffort": true - }, - "supportsComputerUse": false, - "supportsComputerUseConfig": false + } }, "hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4": { "id": "hf:nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4", - "name": "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4", + "name": "Nemotron 3 Super 120B A12B", "api": "openai-completions", "provider": "synthetic", "baseUrl": "https://api.synthetic.new/openai/v1", @@ -88874,7 +89231,7 @@ "cost": { "input": 0.3, "output": 1, - "cacheRead": 0.06, + "cacheRead": 0.3, "cacheWrite": 0 }, "contextWindow": 262144, @@ -88888,13 +89245,11 @@ "high", "xhigh" ] - }, - "supportsComputerUse": false, - "supportsComputerUseConfig": false + } }, "hf:openai/gpt-oss-120b": { "id": "hf:openai/gpt-oss-120b", - "name": "openai/gpt-oss-120b", + "name": "GPT OSS 120B", "api": "openai-completions", "provider": "synthetic", "baseUrl": "https://api.synthetic.new/openai/v1", @@ -88905,11 +89260,11 @@ "cost": { "input": 0.1, "output": 0.1, - "cacheRead": 0.02, + "cacheRead": 0.1, "cacheWrite": 0 }, "contextWindow": 131072, - "maxTokens": 65536, + "maxTokens": 32768, "thinking": { "mode": "effort", "efforts": [ @@ -88917,13 +89272,11 @@ "medium", "high" ] - }, - "supportsComputerUse": false, - "supportsComputerUseConfig": false + } }, "hf:Qwen/Qwen3.6-27B": { "id": "hf:Qwen/Qwen3.6-27B", - "name": "Qwen/Qwen3.6-27B", + "name": "Qwen3.6 27B", "api": "openai-completions", "provider": "synthetic", "baseUrl": "https://api.synthetic.new/openai/v1", @@ -88934,8 +89287,8 @@ ], "cost": { "input": 0.45, - "output": 2.2, - "cacheRead": 0.09, + "output": 3.6, + "cacheRead": 0.45, "cacheWrite": 0 }, "contextWindow": 262144, @@ -88948,13 +89301,11 @@ "medium", "high" ] - }, - "supportsComputerUse": false, - "supportsComputerUseConfig": false + } }, "hf:zai-org/GLM-4.7-Flash": { "id": "hf:zai-org/GLM-4.7-Flash", - "name": "zai-org/GLM-4.7-Flash", + "name": "GLM-4.7-Flash", "api": "openai-completions", "provider": "synthetic", "baseUrl": "https://api.synthetic.new/openai/v1", @@ -88965,7 +89316,7 @@ "cost": { "input": 0.1, "output": 0.5, - "cacheRead": 0.02, + "cacheRead": 0.1, "cacheWrite": 0 }, "contextWindow": 196608, @@ -88979,13 +89330,11 @@ "high", "xhigh" ] - }, - "supportsComputerUse": false, - "supportsComputerUseConfig": false + } }, "hf:zai-org/GLM-5.2": { "id": "hf:zai-org/GLM-5.2", - "name": "zai-org/GLM-5.2", + "name": "GLM-5.2", "api": "openai-completions", "provider": "synthetic", "baseUrl": "https://api.synthetic.new/openai/v1", @@ -88994,9 +89343,9 @@ "text" ], "cost": { - "input": 1, - "output": 3, - "cacheRead": 0.16, + "input": 1.4, + "output": 4.4, + "cacheRead": 1.4, "cacheWrite": 0 }, "contextWindow": 524288, @@ -89010,9 +89359,7 @@ "high", "xhigh" ] - }, - "supportsComputerUse": false, - "supportsComputerUseConfig": false + } }, "syn:large:text": { "id": "syn:large:text", @@ -90017,7 +90364,7 @@ "cacheRead": 0.26, "cacheWrite": 0 }, - "contextWindow": 262144, + "contextWindow": 512000, "maxTokens": 164000, "thinking": { "mode": "effort", @@ -90992,6 +91339,29 @@ ] } }, + "deepseek-v4-flash-0731-fast": { + "id": "deepseek-v4-flash-0731-fast", + "name": "deepseek-v4-flash-0731-fast", + "api": "openai-completions", + "provider": "venice", + "baseUrl": "https://api.venice.ai/api/v1", + "reasoning": false, + "input": [ + "text" + ], + "cost": { + "input": 0, + "output": 0, + "cacheRead": 0, + "cacheWrite": 0 + }, + "contextWindow": 1048576, + "maxTokens": 65536, + "supportsComputerUse": false, + "compat": { + "supportsUsageInStreaming": false + } + }, "deepseek-v4-pro": { "id": "deepseek-v4-pro", "name": "DeepSeek V4 Pro", @@ -93002,10 +93372,10 @@ "image" ], "cost": { - "input": 1.25, - "output": 7.5, - "cacheRead": 0.125, - "cacheWrite": 1.5625 + "input": 0.26666667, + "output": 1.6, + "cacheRead": 0.02666667, + "cacheWrite": 0.33333334 }, "contextWindow": 1000000, "maxTokens": 128000, @@ -94854,7 +95224,7 @@ }, "anthropic/claude-3.5-haiku": { "id": "anthropic/claude-3.5-haiku", - "name": "Claude 3.5 Haiku", + "name": "Claude Haiku 3.5", "api": "anthropic-messages", "baseUrl": "https://ai-gateway.vercel.sh", "provider": "vercel-ai-gateway", @@ -95328,8 +95698,7 @@ ], "supportsDisplay": true }, - "supportsComputerUse": false, - "supportsComputerUseConfig": false + "supportsComputerUse": false }, "anthropic/claude-sonnet-4": { "id": "anthropic/claude-sonnet-4", @@ -96858,6 +97227,37 @@ "maxTokens": 8192, "supportsComputerUse": false }, + "meta/muse-glimmer-30b": { + "id": "meta/muse-glimmer-30b", + "name": "Muse Glimmer 30B", + "api": "anthropic-messages", + "provider": "vercel-ai-gateway", + "baseUrl": "https://ai-gateway.vercel.sh", + "reasoning": true, + "input": [ + "text", + "image" + ], + "cost": { + "input": 0.35, + "output": 1.5, + "cacheRead": 0.04, + "cacheWrite": 0 + }, + "contextWindow": 131072, + "maxTokens": 131072, + "thinking": { + "mode": "budget", + "efforts": [ + "minimal", + "low", + "medium", + "high", + "xhigh" + ] + }, + "supportsComputerUse": false + }, "meta/muse-spark-1.1": { "id": "meta/muse-spark-1.1", "name": "Muse Spark 1.1", @@ -98515,7 +98915,8 @@ "high" ] }, - "supportsComputerUse": false + "supportsComputerUse": false, + "supportsComputerUseConfig": false }, "openai/gpt-5.1-thinking": { "id": "openai/gpt-5.1-thinking", @@ -98668,8 +99069,7 @@ "baseUrl": "https://ai-gateway.vercel.sh", "reasoning": false, "input": [ - "text", - "image" + "text" ], "cost": { "input": 1.75, @@ -98679,7 +99079,8 @@ }, "contextWindow": 128000, "maxTokens": 16384, - "supportsComputerUse": false + "supportsComputerUse": false, + "supportsComputerUseConfig": false }, "openai/gpt-5.3-codex": { "id": "openai/gpt-5.3-codex", @@ -99433,6 +99834,37 @@ }, "supportsComputerUse": false }, + "sakana/namazu": { + "id": "sakana/namazu", + "name": "Sakana Namazu", + "api": "anthropic-messages", + "provider": "vercel-ai-gateway", + "baseUrl": "https://ai-gateway.vercel.sh", + "reasoning": true, + "input": [ + "text", + "image" + ], + "cost": { + "input": 0.95, + "output": 4, + "cacheRead": 0.15, + "cacheWrite": 0 + }, + "contextWindow": 256000, + "maxTokens": 256000, + "thinking": { + "mode": "budget", + "efforts": [ + "minimal", + "low", + "medium", + "high", + "xhigh" + ] + }, + "supportsComputerUse": false + }, "stepfun/step-3.5-flash": { "id": "stepfun/step-3.5-flash", "name": "Step 3.5 Flash", @@ -102020,8 +102452,6 @@ }, "contextWindow": 2000000, "maxTokens": 2000000, - "supportsComputerUse": false, - "supportsComputerUseConfig": false, "compat": { "reasoningEffortMap": { "minimal": "low" @@ -102052,8 +102482,6 @@ }, "contextWindow": 2000000, "maxTokens": 2000000, - "supportsComputerUse": false, - "supportsComputerUseConfig": false, "compat": { "reasoningEffortMap": { "minimal": "low" @@ -102083,6 +102511,16 @@ }, "contextWindow": 2000000, "maxTokens": 2000000, + "compat": { + "reasoningEffortMap": { + "minimal": "low" + }, + "includeEncryptedReasoning": false, + "filterReasoningHistory": true, + "supportsImageDetailOriginal": false, + "omitReasoningEffort": false, + "supportsReasoningEffort": true + }, "thinking": { "mode": "effort", "efforts": [ @@ -102095,18 +102533,6 @@ "effortMap": { "minimal": "low" } - }, - "supportsComputerUse": false, - "supportsComputerUseConfig": false, - "compat": { - "reasoningEffortMap": { - "minimal": "low" - }, - "includeEncryptedReasoning": false, - "filterReasoningHistory": true, - "supportsImageDetailOriginal": false, - "omitReasoningEffort": false, - "supportsReasoningEffort": true } }, "grok-4.3": { @@ -102128,6 +102554,16 @@ }, "contextWindow": 1000000, "maxTokens": 1000000, + "compat": { + "reasoningEffortMap": { + "minimal": "low" + }, + "includeEncryptedReasoning": false, + "filterReasoningHistory": true, + "supportsImageDetailOriginal": false, + "omitReasoningEffort": false, + "supportsReasoningEffort": true + }, "thinking": { "mode": "effort", "efforts": [ @@ -102140,18 +102576,6 @@ "effortMap": { "minimal": "low" } - }, - "supportsComputerUse": false, - "supportsComputerUseConfig": false, - "compat": { - "reasoningEffortMap": { - "minimal": "low" - }, - "includeEncryptedReasoning": false, - "filterReasoningHistory": true, - "supportsImageDetailOriginal": false, - "omitReasoningEffort": false, - "supportsReasoningEffort": true } }, "grok-4.5": { @@ -102173,6 +102597,16 @@ }, "contextWindow": 500000, "maxTokens": 500000, + "compat": { + "reasoningEffortMap": { + "minimal": "low" + }, + "includeEncryptedReasoning": false, + "filterReasoningHistory": true, + "supportsImageDetailOriginal": false, + "omitReasoningEffort": false, + "supportsReasoningEffort": true + }, "thinking": { "mode": "effort", "efforts": [ @@ -102185,18 +102619,6 @@ "effortMap": { "minimal": "low" } - }, - "supportsComputerUse": false, - "supportsComputerUseConfig": false, - "compat": { - "reasoningEffortMap": { - "minimal": "low" - }, - "includeEncryptedReasoning": false, - "filterReasoningHistory": true, - "supportsImageDetailOriginal": false, - "omitReasoningEffort": false, - "supportsReasoningEffort": true } }, "grok-build": { @@ -102218,8 +102640,6 @@ }, "contextWindow": 512000, "maxTokens": 512000, - "supportsComputerUse": false, - "supportsComputerUseConfig": false, "compat": { "reasoningEffortMap": { "minimal": "low" @@ -102250,8 +102670,6 @@ }, "contextWindow": 256000, "maxTokens": 256000, - "supportsComputerUse": false, - "supportsComputerUseConfig": false, "compat": { "reasoningEffortMap": { "minimal": "low" @@ -102281,8 +102699,6 @@ }, "contextWindow": 200000, "maxTokens": 200000, - "supportsComputerUse": false, - "supportsComputerUseConfig": false, "compat": { "reasoningEffortMap": { "minimal": "low" @@ -103268,7 +103684,7 @@ "zenmux": { "anthropic/claude-3.5-haiku": { "id": "anthropic/claude-3.5-haiku", - "name": "Claude 3.5 Haiku", + "name": "Claude Haiku 3.5", "api": "anthropic-messages", "provider": "zenmux", "baseUrl": "https://zenmux.ai/api/anthropic", @@ -103284,7 +103700,8 @@ "cacheWrite": 1 }, "contextWindow": 200000, - "maxTokens": 64000 + "maxTokens": 64000, + "supportsComputerUse": false }, "anthropic/claude-3.5-sonnet": { "id": "anthropic/claude-3.5-sonnet", @@ -103336,7 +103753,8 @@ "high", "xhigh" ] - } + }, + "supportsComputerUse": false }, "anthropic/claude-fable-5": { "id": "anthropic/claude-fable-5", @@ -104188,7 +104606,7 @@ }, "deepseek/deepseek-chat": { "id": "deepseek/deepseek-chat", - "name": "DeepSeek-V3.2 (Non-thinking Mode)", + "name": "DeepSeek Chat", "api": "openai-completions", "provider": "zenmux", "baseUrl": "https://zenmux.ai/api/v1", @@ -104203,7 +104621,8 @@ "cacheWrite": 0 }, "contextWindow": 128000, - "maxTokens": 64000 + "maxTokens": 64000, + "supportsComputerUse": false }, "deepseek/deepseek-chat-v3.1": { "id": "deepseek/deepseek-chat-v3.1", @@ -104954,7 +105373,8 @@ "cacheWrite": 0 }, "contextWindow": 128000, - "maxTokens": 64000 + "maxTokens": 64000, + "supportsComputerUse": false }, "inclusionai/ling-2.6-1t": { "id": "inclusionai/ling-2.6-1t", @@ -105026,6 +105446,26 @@ ] } }, + "inclusionai/ling-3.0-tiny": { + "id": "inclusionai/ling-3.0-tiny", + "name": "Ling 3.0 Tiny", + "api": "openai-completions", + "provider": "zenmux", + "baseUrl": "https://zenmux.ai/api/v1", + "reasoning": false, + "input": [ + "text" + ], + "cost": { + "input": 0, + "output": 0, + "cacheRead": 0, + "cacheWrite": 0 + }, + "contextWindow": 262144, + "maxTokens": 32768, + "supportsComputerUse": false + }, "inclusionai/ling-flash-2.0": { "id": "inclusionai/ling-flash-2.0", "name": "Ling-flash-2.0", @@ -105158,7 +105598,8 @@ "high", "xhigh" ] - } + }, + "supportsComputerUse": false }, "inclusionai/ring-2.6-1t": { "id": "inclusionai/ring-2.6-1t", @@ -105762,7 +106203,8 @@ "cacheWrite": 0 }, "contextWindow": 262000, - "maxTokens": 64000 + "maxTokens": 64000, + "supportsComputerUse": false }, "moonshotai/kimi-k2-thinking": { "id": "moonshotai/kimi-k2-thinking", @@ -105792,7 +106234,8 @@ "xhigh" ], "requiresEffort": true - } + }, + "supportsComputerUse": false }, "moonshotai/kimi-k2-thinking-turbo": { "id": "moonshotai/kimi-k2-thinking-turbo", @@ -105822,7 +106265,8 @@ "xhigh" ], "requiresEffort": true - } + }, + "supportsComputerUse": false }, "moonshotai/kimi-k2.5": { "id": "moonshotai/kimi-k2.5", @@ -107606,6 +108050,68 @@ }, "supportsComputerUse": false }, + "sapiens-ai/agnes-2.5-flash": { + "id": "sapiens-ai/agnes-2.5-flash", + "name": "Agnes-2.5-Flash", + "api": "openai-completions", + "provider": "zenmux", + "baseUrl": "https://zenmux.ai/api/v1", + "reasoning": true, + "input": [ + "text", + "image" + ], + "cost": { + "input": 0, + "output": 0, + "cacheRead": 0, + "cacheWrite": 0 + }, + "contextWindow": 524288, + "maxTokens": null, + "thinking": { + "mode": "effort", + "efforts": [ + "minimal", + "low", + "medium", + "high", + "xhigh" + ] + }, + "supportsComputerUse": false + }, + "sapiens-ai/agnes-2.5-pro": { + "id": "sapiens-ai/agnes-2.5-pro", + "name": "Agnes-2.5-Pro", + "api": "openai-completions", + "provider": "zenmux", + "baseUrl": "https://zenmux.ai/api/v1", + "reasoning": true, + "input": [ + "text", + "image" + ], + "cost": { + "input": 0.45, + "output": 0.9, + "cacheRead": 0.0038, + "cacheWrite": 0 + }, + "contextWindow": 1048576, + "maxTokens": null, + "thinking": { + "mode": "effort", + "efforts": [ + "minimal", + "low", + "medium", + "high", + "xhigh" + ] + }, + "supportsComputerUse": false + }, "stepfun/step-3": { "id": "stepfun/step-3", "name": "Step-3", @@ -107634,7 +108140,8 @@ "high", "xhigh" ] - } + }, + "supportsComputerUse": false }, "stepfun/step-3.5-flash": { "id": "stepfun/step-3.5-flash", @@ -108036,7 +108543,8 @@ "high", "xhigh" ] - } + }, + "supportsComputerUse": false }, "x-ai/grok-4": { "id": "x-ai/grok-4", @@ -108066,7 +108574,8 @@ "high", "xhigh" ] - } + }, + "supportsComputerUse": false }, "x-ai/grok-4-fast": { "id": "x-ai/grok-4-fast", @@ -108096,7 +108605,8 @@ "high", "xhigh" ] - } + }, + "supportsComputerUse": false }, "x-ai/grok-4-fast-non-reasoning": { "id": "x-ai/grok-4-fast-non-reasoning", @@ -108148,7 +108658,8 @@ "high", "xhigh" ] - } + }, + "supportsComputerUse": false }, "x-ai/grok-4.1-fast-non-reasoning": { "id": "x-ai/grok-4.1-fast-non-reasoning", @@ -108168,7 +108679,8 @@ "cacheWrite": 0 }, "contextWindow": 2000000, - "maxTokens": 64000 + "maxTokens": 64000, + "supportsComputerUse": false }, "x-ai/grok-4.2-fast": { "id": "x-ai/grok-4.2-fast", @@ -108369,7 +108881,8 @@ "high", "xhigh" ] - } + }, + "supportsComputerUse": false }, "xiaomi/mimo-v2-flash": { "id": "xiaomi/mimo-v2-flash", diff --git a/packages/catalog/test/generated-policies.test.ts b/packages/catalog/test/generated-policies.test.ts index fbcb9a024..342103eae 100644 --- a/packages/catalog/test/generated-policies.test.ts +++ b/packages/catalog/test/generated-policies.test.ts @@ -319,11 +319,11 @@ describe("generated model policies", () => { expect(models[0]?.compat?.supportsToolChoice).toBe(false); }); - it("sets OpenCode Go DeepSeek V4 tool-call request compat", () => { - const models: ModelSpec<"openai-completions">[] = [ + it("sets OpenCode Go DeepSeek V4 tool-call request compat for both OpenAI APIs", () => { + const models: ModelSpec[] = [ createSpec({ id: "deepseek-v4-flash", - api: "openai-completions", + api: "openai-responses", provider: "opencode-go", }), createSpec({