Skip to content

fix(providers): drop deprecated temperature capability from claude-sonnet-5#5328

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix-sonnet-5-temperature
Jul 1, 2026
Merged

fix(providers): drop deprecated temperature capability from claude-sonnet-5#5328
waleedlatif1 merged 1 commit into
stagingfrom
fix-sonnet-5-temperature

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Claude Sonnet 5 rejects the temperature parameter with a 400 (`temperature` is deprecated for this model) — verified against the live Anthropic API.
  • The claude-sonnet-5 model entry exposed temperature: { min: 0, max: 1 }, so supportsTemperature() returned true and the Anthropic request builder sent temperature whenever thinking was disabled — breaking those runs.
  • Remove the capability (matching Opus 4.7/4.8, which omit it for the same deprecation) so temperature is never sent for Sonnet 5.
  • Add a supportsTemperature regression assertion for claude-sonnet-5.

Verification (live Anthropic API)

Request Result
Sonnet 5 with temperature 400 — "temperature is deprecated for this model"
Sonnet 5 without temperature 200
Provider shape (adaptive thinking + effort:high, no temp) 200
Structured outputs (output_format json_schema) 200

Type of Change

  • Bug fix

Testing

  • 156 provider tests pass (providers/utils.test.ts, providers/models.test.ts)
  • Live API verified (table above)

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…nnet-5

Claude Sonnet 5 rejects the temperature parameter with a 400 ("`temperature` is deprecated for this model"), verified against the live Anthropic API. The model entry exposed temperature: { min: 0, max: 1 }, so supportsTemperature() returned true and the Anthropic request builder sent temperature whenever thinking was disabled, breaking those runs. Remove the capability (matching Opus 4.7/4.8, which omit it for the same reason) so temperature is never sent for Sonnet 5. Add a supportsTemperature regression assertion.
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 1, 2026 6:32pm

Request Review

@cursor

cursor Bot commented Jul 1, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Small catalog and test-only change; fixes default Anthropic model behavior with no auth or data impact.

Overview
Fixes Claude Sonnet 5 runs failing with Anthropic 400 when the API receives a deprecated temperature parameter.

The claude-sonnet-5 catalog entry no longer declares a temperature capability (aligned with Opus 4.7/4.8). supportsTemperature('claude-sonnet-5') is now false, so the Anthropic request path and agent UI stop sending or surfacing temperature for that model.

A supportsTemperature regression test lists claude-sonnet-5 among models that do not support temperature.

Reviewed by Cursor Bugbot for commit c763000. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates Claude Sonnet 5 temperature capability handling. The main changes are:

  • Removed the temperature capability from the claude-sonnet-5 model entry.
  • Added claude-sonnet-5 to the unsupported temperature regression test.
  • Keeps Sonnet 5 aligned with newer Claude models that do not expose temperature controls.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/sim/providers/models.ts Removed temperature support from the Claude Sonnet 5 model definition so capability checks and request building omit the deprecated parameter.
apps/sim/providers/utils.test.ts Added regression coverage that treats Claude Sonnet 5 as not supporting temperature.

Reviews (1): Last reviewed commit: "fix(providers): drop deprecated temperat..." | Re-trigger Greptile

@waleedlatif1 waleedlatif1 merged commit 78661d2 into staging Jul 1, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the fix-sonnet-5-temperature branch July 1, 2026 18:34
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