-
Notifications
You must be signed in to change notification settings - Fork 61.1k
Migrate to claude 4 #6552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Migrate to claude 4 #6552
Conversation
WalkthroughThe changes update the streaming response handler for Anthropic API responses to recognize new chunk types and handle content policy refusals by triggering an error callback. Additionally, two new Anthropic model identifiers are added to the internal model constants array. Changes
Possibly related PRs
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
app/constant.tsOops! Something went wrong! :( ESLint: 8.49.0 TypeError: Cannot read properties of undefined (reading 'loc') 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
Add support to claude 4 model. In the migration guide [1,2], handling stop_reason is required. Therefore, an addition change
is added in
app/clients/platforms/anthropics.ts
to give refusal message when we detected the stop_reason.📝 补充信息 | Additional Information
Summary by CodeRabbit
New Features
Bug Fixes