Skip to content

Drop temperature from Claude calls for Opus 4.7 compatibility#2559

Merged
hiroshinishio merged 1 commit intomainfrom
wes
Apr 20, 2026
Merged

Drop temperature from Claude calls for Opus 4.7 compatibility#2559
hiroshinishio merged 1 commit intomainfrom
wes

Conversation

@hiroshinishio
Copy link
Copy Markdown
Collaborator

No description provided.

Opus 4.7 deprecated the temperature parameter and returns 400
"temperature is deprecated for this model" when it's passed. This fired
a flood of BadRequestError Sentry issues (AGENT-3HG through AGENT-3J1)
from evaluate_condition and is_code_untestable, which call
claude.beta.messages.create directly. Other Claude callers
(chat_with_claude, chat_with_claude_simple, evaluate_quality_checks)
were failing silently because chat_with_agent's broad fallback loop
swallows the error and cycles through models, ultimately surfacing as
AGENT-36M "All models exhausted."

Removing temperature from all Claude call sites. Added kwargs-shape
assertions to tests so a future reintroduction fails loudly. Also
rewrote pre-existing partial assertions in test_is_code_untestable to
exact-content equality, and added missing logger calls per CLAUDE.md.
@hiroshinishio hiroshinishio self-assigned this Apr 20, 2026
@hiroshinishio hiroshinishio merged commit ffd8dab into main Apr 20, 2026
1 check passed
@hiroshinishio hiroshinishio deleted the wes branch April 20, 2026 03:11
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