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
{{ message }}
Repository navigation
reasoning_effort none does not disable thinking on OpenAI-compatible / DeepSeek gateways (LiteLLM) #2020
Setting the reasoning effort to none does not actually turn thinking off for OpenAI-compatible / DeepSeek-style endpoints served through gateways such as LiteLLM. Jcode omits the reasoning_effort field from the request body when the effort is none, and LiteLLM (and DeepSeek-V3+) default thinking to ON when that field is absent — so none silently leaves thinking enabled.
Reproduced on deepseek-reasoner via a LiteLLM profile with supports-reasoning-effort = true.
Set the effort to none (via /effort none or openai_reasoning_effort = "none").
Send any prompt.
Expected
none disables thinking: no reasoning_content tokens, fast response.
Actual
Thinking still runs (visible 💭 reasoning stream, full latency).
Root cause: OpenRouterProvider::apply_resolved_reasoning_effort (crates/jcode-provider-openrouter-runtime/src/lib.rs) drops the field for none in both the DeepSeek-style and OpenAI-style branches:
if effort == "none"{returnfalse;// field omitted from the request body}
request["reasoning_effort"] = serde_json::json!(effort);
Wire-level proof (curl against the LiteLLM proxy)
Same prompt, only the reasoning_effort field differs:
Request body
reasoning_content length
field absent (current none behavior)
135 (thinking ON)
"reasoning_effort": "none"
0 (thinking OFF)
So the gateway honors an explicit "none"; the bug is purely that Jcode omits the field.
TUI proof (selfdev build)
effort low → "The user is asking me to reply…" + hi, 9.1s (thinking visible)
effort none → just hello, 2.3s (no thinking) — after the fix
Proposed fix
Send reasoning_effort: "none" explicitly instead of omitting the field, in both the DeepSeek-style and OpenAI-style branches of apply_resolved_reasoning_effort. Small, focused change with a new LiteLLM + deepseek-reasoner + none wire regression test
Fixed in 5fedab8, now on master. OpenAI-compatible profiles explicitly opting into supports-reasoning-effort now send reasoning_effort: "none" instead of omitting it. Built-in/heuristic behavior and model-level opt-outs are preserved. Hosted check passed, the provider suite passed 195 tests (1 ignored), and a seven-case HTTP wire regression matrix passed, including LiteLLM-style DeepSeek/GPT through the public effort setter. This verifies the outgoing request contract, not a live LiteLLM deployment. Thanks for the wire-level reproduction!
Jcode agent (automated triage), on behalf of @1jehuang
Activity
1jehuang commentedon Nov 2, 2026
Fixed in 5fedab8, now on master. OpenAI-compatible profiles explicitly opting into supports-reasoning-effort now send reasoning_effort: "none" instead of omitting it. Built-in/heuristic behavior and model-level opt-outs are preserved. Hosted check passed, the provider suite passed 195 tests (1 ignored), and a seven-case HTTP wire regression matrix passed, including LiteLLM-style DeepSeek/GPT through the public effort setter. This verifies the outgoing request contract, not a live LiteLLM deployment. Thanks for the wire-level reproduction!
Jcode agent (automated triage), on behalf of @1jehuang
fix: serialize explicit none for opted-in compatible profiles (fixes 1…
fix(swarm): apply inherit sentinel bypass at tool-level validation