You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(models): raise max_tokens for reasoning models (#2384)
* fix(models): raise max_tokens to 98304 for reasoning models
Reasoning models share a single max_tokens budget between the <think> phase
and the answer. With 49152, a hard prompt could spend the entire budget on
reasoning and hit finish_reason=length before emitting any answer (observed
with GLM-5.2 on a complex coding task). OpenAI-compatible APIs expose no
separate reasoning budget, so the lever is a larger shared cap.
Raise every supportsReasoning model with an explicit cap below 98304 (2x the
common 49152) to 98304, giving room for both reasoning and the answer. Only
reasoning lines are touched; non-reasoning models keep their caps. These are
1M / 256K-context models, so the larger output cap fits the context window.
Note: reasoning models without an explicit cap (e.g. GLM-4.7, MiniMax-M2,
Kimi-K2-Thinking) still fall back to the provider default and are left as-is.
* fix(models): cap gpt-oss-120b at 65536 (128k-context model)
Live verification against the router showed all bumped reasoning models accept
max_tokens=98304, but gpt-oss-120b is the one outlier with only a 131072-token
total context (every provider reports context_length 131072), versus 256K-1M for
the others. At 98304 that leaves only ~33k tokens for the prompt, risking
context_length_exceeded on long conversations. 65536 balances reasoning+answer
budget against prompt headroom (~65k each) for a 128k-context model.
{ "id": "moonshotai/Kimi-K2.7-Code", "description": "1T MoE coding agent with persistent thinking across long tool workflows." , "supportsReasoning": true, "supportsArtifacts": true, "parameters": { "max_tokens": 98304 } },
88
+
{ "id": "MiniMaxAI/MiniMax-M3", "description": "Natively multimodal 428B MoE with 1M context for frontier coding and agents." , "supportsReasoning": true, "supportsArtifacts": true, "parameters": { "max_tokens": 98304 } },
89
+
{ "id": "nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-NVFP4", "description": "Hybrid Mamba-Transformer 550B MoE with 55B active params for efficient agentic reasoning.", "parameters": { "max_tokens": 98304 }, "supportsReasoning": true, "supportsArtifacts": true },
90
90
{ "id": "Qwen/Qwen3.6-27B", "description": "Dense 27B hybrid with DeltaNet attention and 1M context.", "supportsArtifacts": true },
91
91
{ "id": "meta-llama/Llama-4-Scout-17B-16E-Instruct", "description": "Native multimodal 17B MoE with 16 experts and very long context."},
92
92
{ "id": "CohereLabs/c4ai-command-r7b-12-2024", "description": "Compact 7B Command R for multilingual RAG, tool use, and agents." },
93
93
{ "id": "pearl-ai/Gemma-4-31B-it-pearl", "description": "Community Gemma-4-31B variant integrated with Pearl mining for chain-validated inference."},
94
94
{ "id": "inclusionAI/Ling-2.6-1T", "description": "1T MoE with 50B active params, hybrid MLA-Linear attention, and fast thinking.", "supportsArtifacts": true },
95
-
{ "id": "deepseek-ai/DeepSeek-V4-Pro", "description": "Frontier 1.6T MoE with 49B active params, hybrid attention, and 1M context.", "parameters": { "max_tokens": 49152 }, "supportsReasoning": true, "supportsArtifacts": true },
95
+
{ "id": "deepseek-ai/DeepSeek-V4-Pro", "description": "Frontier 1.6T MoE with 49B active params, hybrid attention, and 1M context.", "parameters": { "max_tokens": 98304 }, "supportsReasoning": true, "supportsArtifacts": true },
96
96
{ "id": "deepseek-ai/DeepSeek-V4-Flash", "description": "Compact 284B MoE with 13B active params, hybrid attention, and 1M context.", "parameters": { "max_tokens": 49152 }, "supportsArtifacts": true },
97
97
{ "id": "deepseek-ai/DeepSeek-V3.2", "description": "Stable 671B MoE with sparse attention for agentic reasoning and long contexts.", "supportsArtifacts": true },
98
98
{ "id": "stepfun-ai/Step-3.5-Flash", "description": "Sparse 197B MoE agent with multi-token prediction and 256K context.", "supportsArtifacts": true },
99
99
{ "id": "Qwen/Qwen3.6-35B-A3B", "description": "Hybrid 35B MoE with 3B active params, DeltaNet attention, and 1M context.", "supportsArtifacts": true },
100
100
{ "id": "zai-org/GLM-4.7-Flash", "description": "Compact 30B MoE for agentic coding with 128K context and tool use.", "supportsReasoning": true, "supportsArtifacts": true },
101
101
{ "id": "moonshotai/Kimi-K2.6", "description": "Native multimodal 1T MoE for long-horizon coding and 300-sub-agent swarms.", "supportsArtifacts": true },
0 commit comments