Skip to content

fix: skip temperature parameter for claude-opus-4-7 models#2948

Open
yuxuan-7814 wants to merge 1 commit into
sipeed:mainfrom
yuxuan-7814:fix/2939-claude-opus-temperature
Open

fix: skip temperature parameter for claude-opus-4-7 models#2948
yuxuan-7814 wants to merge 1 commit into
sipeed:mainfrom
yuxuan-7814:fix/2939-claude-opus-temperature

Conversation

@yuxuan-7814
Copy link
Copy Markdown
Contributor

📝 Description

Fix HTTP 400 errors when using claude-opus-4-7 models. This model family no longer accepts the temperature parameter, and sending it returns an error: "temperature is deprecated for this model."

This PR skips the temperature field for claude-opus-4-7 models in both openai_compat and anthropic_messages providers, following the same pattern as the existing kimi-k2 special case.

🗣️ Type of Change

  • 🐞 Bug fix (non-breaking change which fixes an issue)

🤖 AI Code Generation

  • 🤖 Fully AI-generated (100% AI, 0% Human)

🔗 Related Issue

Closes #2939

📚 Technical Context

🧪 Test Environment

  • Hardware: PC
  • OS: Linux
  • Model/Provider: Anthropic claude-opus-4-7

☑️ Checklist

  • My code/docs follow the style of this project.
  • I have performed a self-review of my own changes.

claude-opus-4-7 no longer accepts the temperature parameter.
Sending it results in HTTP 400 error: 'temperature is deprecated
for this model.'

This change skips the temperature field for claude-opus-4-7 models
in both openai_compat and anthropic_messages providers, following
the same pattern as the existing kimi-k2 special case.

Closes sipeed#2939
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.

claude-opus-4-7 fails with 'temperature is deprecated for this model'

1 participant