Skip to content

fix(agent): drop temperature param for claude-opus-4-7#4459

Merged
TheodoreSpeaks merged 1 commit intostagingfrom
fix/opus-4-7-block
May 5, 2026
Merged

fix(agent): drop temperature param for claude-opus-4-7#4459
TheodoreSpeaks merged 1 commit intostagingfrom
fix/opus-4-7-block

Conversation

@TheodoreSpeaks
Copy link
Copy Markdown
Collaborator

Summary

  • Remove temperature capability from claude-opus-4-7 in providers/models.ts since Anthropic deprecated the parameter for this model
  • supportsTemperature('claude-opus-4-7') now returns false, so the Anthropic provider skips sending temperature in the payload and the agent block hides the temperature slider for this model

Type of Change

  • Bug fix

Testing

  • Ran bun run lint — clean
  • Ran bun run check:api-validation:strict — passed
  • Ran bunx vitest run providers/utils.test.ts blocks/blocks/agent.test.ts — 139 tests passing
  • Tested manually

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)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped May 5, 2026 11:54pm

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented May 5, 2026

PR Summary

Low Risk
Low risk metadata change limited to a single model definition; primary impact is any codepaths that conditionally enable temperature for this model.

Overview
Removes the temperature capability from the claude-opus-4-7 model entry in apps/sim/providers/models.ts, so this model is no longer treated as supporting temperature adjustments.

Reviewed by Cursor Bugbot for commit 3a7f7d9. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 5, 2026

Greptile Summary

This PR removes the temperature capability from claude-opus-4-7's model definition in providers/models.ts, fixing a bug where the Anthropic provider was sending a temperature parameter that Anthropic has deprecated for that model.

  • Deletes temperature: { min: 0, max: 1 } from claude-opus-4-7's capabilities block, causing supportsTemperature('claude-opus-4-7') to return false, which propagates correctly to both the Anthropic core provider (payload construction) and the agent block UI (temperature slider visibility).
  • No other provider variants (bedrock, azure) define claude-opus-4-7, so the single-line removal is the complete fix.

Confidence Score: 5/5

Safe to merge — the one-line removal correctly disables a deprecated API parameter for a single model with no downstream side effects.

The change is a minimal, targeted removal that affects only claude-opus-4-7. The supportsTemperature helper and Anthropic core provider already handle the no-temperature case correctly for other models, so the fix slots in without any new code paths. No other provider variants (Azure, Bedrock) define this model, so there are no parallel entries to update. The only gap is that the existing test suite doesn't add claude-opus-4-7 to the unsupported-temperature list to pin the behaviour going forward.

No files require special attention; apps/sim/providers/utils.test.ts could optionally be updated to cover the new behaviour.

Important Files Changed

Filename Overview
apps/sim/providers/models.ts Removes the temperature capability entry from claude-opus-4-7's model definition so that supportsTemperature returns false and the provider skips sending the deprecated parameter.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Request with model: claude-opus-4-7"] --> B["supportsTemperature(model)"]
    B --> C{"capabilities.temperature\ndefined?"}
    C -- "Before PR: YES\n(min:0, max:1)" --> D["Include temperature\nin API payload ❌"]
    C -- "After PR: NO\n(removed)" --> E["Skip temperature\nin API payload ✅"]
    B2["Agent Block UI"] --> F{"supportsTemperature(model)"}
    F -- "Before PR: true" --> G["Show temperature slider ❌"]
    F -- "After PR: false" --> H["Hide temperature slider ✅"]
Loading

Comments Outside Diff (1)

  1. apps/sim/providers/utils.test.ts, line 214-220 (link)

    P2 claude-opus-4-7 is not listed in the unsupported-temperature models array, so the test suite doesn't explicitly verify the fix introduced by this PR. Adding it here would prevent a regression if the capability is accidentally re-added.

Reviews (1): Last reviewed commit: "fix(agent): drop temperature param for c..." | Re-trigger Greptile

@TheodoreSpeaks TheodoreSpeaks merged commit 0925e2d into staging May 5, 2026
14 checks passed
@TheodoreSpeaks TheodoreSpeaks deleted the fix/opus-4-7-block branch May 5, 2026 23:59
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