refine: drop temperature param for Opus 4.8
ci / gates (push) Successful in 6s
ci / frontend (push) Successful in 35s
ci / rust (push) Successful in 3m2s
ci / e2e (push) Skipped
ci / publish (push) Successful in 2m25s

Claude Opus 4.8 rejects `temperature` — 'deprecated for this model'.
Newer models manage their own sampling; the parameter is only legal
on older Claude generations. Dropping it wholesale rather than
version-gating since we default to Opus 4.8.

Verified: cargo check clean.
This commit is contained in:
Omar Sobh
2026-07-20 14:47:38 -07:00
parent 1cbbbbd3e5
commit 1716bf33e6
+2 -1
View File
@@ -130,10 +130,11 @@ async fn call_anthropic(
} }
); );
// Opus 4.8 rejects the `temperature` parameter — the model runs at
// its own calibrated setting. Older Claude models accepted 0.0–1.0.
let body = json!({ let body = json!({
"model": model, "model": model,
"max_tokens": 4096, "max_tokens": 4096,
"temperature": 0.3,
"system": system, "system": system,
"messages": [ "messages": [
{ "role": "user", "content": user } { "role": "user", "content": user }