Skip to content

fix(llm): stop sending temperature to Claude 5.x and pass DeepSeek reasoning back - #1129

Closed
sosidudku1 wants to merge 1 commit into
mainfrom
fix/anthropic-temperature-deepseek-reasoning
Closed

sosidudku1 wants to merge 1 commit into
mainfrom
fix/anthropic-temperature-deepseek-reasoning

Conversation

@sosidudku1

Copy link
Copy Markdown
Collaborator

What

Two cloud providers failed on their very first turn in Desktop 0.0.8:

  • Anthropic (Sonnet 5.5, Haiku 5.5): 400 "temperature" is deprecated for this model. We always sent temperature: 0.2. Claude 5.x ids (claude-{opus,sonnet,haiku,fable}-5…, also the dotted OpenRouter spelling) now get no temperature at all. On top of that, the run-time lesson that already handled Moonshot's "only 1 is allowed" now also reads "temperature is deprecated / not supported / Unsupported parameter: 'temperature'" as "send none": one resend without the field, remembered for that model for the rest of the process (an operator's extraBody temperature is dropped too, since the service just refused it). Same for the image-description body.
  • DeepSeek thinking mode: 400 The reasoning_content in the thinking mode must be passed back to the API. We read the reasoning but never sent it back. For api.deepseek.com every assistant tool_calls message in the native layout now carries reasoning_content: the recorded reasoning of the current turn (within the existing PRESERVED_REASONING_TOKEN_BUDGET), or an empty string when none is known or the budget dropped it. Other hosts are unchanged, because strict APIs reject unknown fields.

Why

Both are among the most used cloud providers and both broke on default settings for a new user. Linear: ATO-1397.

How it was verified

  • New/updated unit tests: allowed-temperature.test.ts, model-params.test.ts, openai-temperature-retry.test.ts, openai-native-messages.test.ts, new reasoning-echo-url.test.ts.
  • Not run yet. Open question for the live check: whether DeepSeek accepts an empty reasoning_content for a call whose reasoning we do not have (the current turn's calls do carry the real text).

Not yet checked on the second Mac.

…asoning back

Anthropic answers any temperature on Sonnet/Haiku/Opus 5.5 and Fable
with a 400 ("`temperature` is deprecated for this model"), so a fresh
Anthropic key failed on its first turn. Claude 5.x ids now get no
temperature, and the run-time lesson that already handled Moonshot's
"only 1 is allowed" also reads "deprecated / not supported" as "send
none": one resend without it, kept for the model.

DeepSeek's thinking mode refuses a tool loop unless every assistant
tool_calls message carries reasoning_content back. For api.deepseek.com
the native messages now always include it: the recorded reasoning
(within the existing budget) or an empty string.
@sosidudku1

Copy link
Copy Markdown
Collaborator Author

Closing as a duplicate of #1123, which covers the same fix more completely (cloud prompt path included).

@sosidudku1 sosidudku1 closed this Nov 10, 2026
@sosidudku1
sosidudku1 deleted the fix/anthropic-temperature-deepseek-reasoning branch November 10, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant