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
ClaudeProvider.createProviderRequest unconditionally sets temperature = 1.0 and thinking: {type: "enabled"} whenever thinking is on (ClaudeProvider.scala:92, :98):
if (isThinking) {
...
// Anthropic requires temperature=1.0 when thinking is enabled
baseRequest("temperature") =1.0
...
baseRequest("thinking") = ujson.Obj(
"type"->"enabled",
"budget_tokens"-> budget
)
}
Both assumptions are now wrong for the current Claude generation (verified against Anthropic's model overview, Jul 2026):
temperature is deprecated on Claude Opus 4.7 and later and returns HTTP 400 on any non-default value. Sending temperature = 1.0 to Opus 5, Sonnet 5, or Fable 5 makes the request fail outright.
Extended thinking (thinking.type: "enabled") is not supported on Fable 5, Opus 5, or Sonnet 5, and is deprecated on Opus 4.6 / Sonnet 4.6. Those models use adaptive thinking instead, configured with an effort parameter (Fable 5 is always-on; Opus 5 / Sonnet 5 / Opus 4.6-4.8 accept effort, default high).
So the thinking path works only for the older family (claude-haiku-4-5, claude-sonnet-4-5, claude-opus-4-5, claude-opus-4-1) and hard-fails on everything newer.
Note Haiku 4.5 is the inverse of the newer models: extended thinking supported, adaptive not.
What needs to be done
Branch on model generation in ClaudeProvider: extended-thinking models keep the current thinking block and temperature = 1.0; adaptive-thinking models get effort and notemperature key at all.
Suppress temperature entirely for Opus 4.7+ even on the non-thinking path — the deprecation is not limited to thinking requests.
Decide where the generation split lives. ReasoningModelDetector already string-matches Claude versions, but adding another hardcoded family check there compounds the inconsistency noted in cleanup: remove or wire currently unused provider and registry helpers #31 — a ProviderDescriptor field or a models.yaml capability flag would be cleaner.
Tests covering: extended-thinking model, adaptive-thinking model, and a non-thinking request to an Opus 4.7+ model (asserting no temperature key is sent).
Problem
ClaudeProvider.createProviderRequestunconditionally setstemperature = 1.0andthinking: {type: "enabled"}whenever thinking is on (ClaudeProvider.scala:92,:98):Both assumptions are now wrong for the current Claude generation (verified against Anthropic's model overview, Jul 2026):
temperatureis deprecated on Claude Opus 4.7 and later and returns HTTP 400 on any non-default value. Sendingtemperature = 1.0to Opus 5, Sonnet 5, or Fable 5 makes the request fail outright.thinking.type: "enabled") is not supported on Fable 5, Opus 5, or Sonnet 5, and is deprecated on Opus 4.6 / Sonnet 4.6. Those models use adaptive thinking instead, configured with aneffortparameter (Fable 5 is always-on; Opus 5 / Sonnet 5 / Opus 4.6-4.8 accepteffort, defaulthigh).So the thinking path works only for the older family (
claude-haiku-4-5,claude-sonnet-4-5,claude-opus-4-5,claude-opus-4-1) and hard-fails on everything newer.Note Haiku 4.5 is the inverse of the newer models: extended thinking supported, adaptive not.
What needs to be done
ClaudeProvider: extended-thinking models keep the currentthinkingblock andtemperature = 1.0; adaptive-thinking models geteffortand notemperaturekey at all.temperatureentirely for Opus 4.7+ even on the non-thinking path — the deprecation is not limited to thinking requests.reasoning_effortconfig values (none|low|medium|high|xhigh) onto Anthropic'seffortparameter.ReasoningModelDetectoralready string-matches Claude versions, but adding another hardcoded family check there compounds the inconsistency noted in cleanup: remove or wire currently unused provider and registry helpers #31 — aProviderDescriptorfield or amodels.yamlcapability flag would be cleaner.temperaturekey is sent).Related
claude-3-5-haiku-latestis a retired model (underlyingclaude-3-5-haiku-20241022retired 19 Feb 2026), so the default config cannot reach Anthropic at all.claude-opus-4-1-20250805retires 5 Aug 2026.ReasoningModelDetector.