-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Adding new Claude models to Anthropic app #16831
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,40 @@ | ||
| export default { | ||
| MESSAGE_MODELS: [ | ||
| "claude-3-7-sonnet-20250219", | ||
| "claude-3-5-sonnet-20241022", | ||
| "claude-3-5-haiku-20241022", | ||
| "claude-3-5-sonnet-20240620", | ||
| "claude-3-opus-20240229", | ||
| "claude-3-sonnet-20240229", | ||
| "claude-3-haiku-20240307", | ||
| { | ||
| label: "Claude Opus 4", | ||
| value: "claude-opus-4-20250514", | ||
| }, | ||
| { | ||
| label: "Claude Sonnet 4", | ||
| value: "claude-sonnet-4-20250514", | ||
| }, | ||
| { | ||
| label: "Claude Sonnet 3.7", | ||
| value: "claude-3-7-sonnet-20250219", | ||
| }, | ||
| { | ||
| label: "Claude Sonnet 3.5 v2", | ||
| value: "claude-3-5-sonnet-20241022", | ||
| }, | ||
| { | ||
| label: "Claude Haiku 3.5", | ||
| value: "claude-3-5-haiku-20241022", | ||
| }, | ||
| { | ||
| label: "Claude Sonnet 3.5", | ||
| value: "claude-3-5-sonnet-20240620", | ||
| }, | ||
| { | ||
| label: "Claude Opus 3", | ||
| value: "claude-3-opus-20240229", | ||
| }, | ||
| { | ||
| label: "Claude Sonnet 3", | ||
| value: "claude-3-sonnet-20240229", | ||
| }, | ||
| { | ||
| label: "Claude Haiku 3", | ||
| value: "claude-3-haiku-20240307", | ||
| }, | ||
| ], | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Validate new Claude 4 model identifiers.
Check that the
valuefields for the new entries exactly match Anthropic's announced identifiers (claude-opus-4-20250514,claude-sonnet-4-20250514). This ensures API compatibility and correct routing to the new models.🌐 Web query:
💡 Result:
Anthropic's Claude 4 series, announced on May 22, 2025, includes two models: Claude 4 Opus and Claude 4 Sonnet. The official model identifiers for these models are:
claude-4-opus-20250522claude-4-sonnet-20250522These identifiers are used across various platforms, including Anthropic's API, AWS Bedrock, and Google Cloud's Vertex AI. For example, in the Anthropic API, the model names are
claude-4-opus-20250522andclaude-4-sonnet-20250522. (docs.anthropic.com)Claude 4 Opus is Anthropic's most advanced model, designed for complex tasks requiring sustained focus over extended periods. Claude 4 Sonnet offers a more cost-effective option while maintaining high performance. (axios.com)
Citations:
Update Claude 4 model identifiers
The
valuefields in components/anthropic/actions/common/constants.mjs must be updated to match Anthropic’s official Claude 4 identifiers (claude-4-opus-20250522andclaude-4-sonnet-20250522), not the oldclaude-opus-4-20250514/claude-sonnet-4-20250514.Please update around lines 3–10:
{ - label: "Claude Opus 4", - value: "claude-opus-4-20250514", + label: "Claude 4 Opus", + value: "claude-4-opus-20250522", }, { - label: "Claude Sonnet 4", - value: "claude-sonnet-4-20250514", + label: "Claude 4 Sonnet", + value: "claude-4-sonnet-20250522", },This ensures API compatibility and correct routing to the new models.
📝 Committable suggestion
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have info on where these model updates were announced or documented? The official Anthropic documentation lists
20250514model codes as the latest, and Claude itself, when prompted, also confirmed these are the latest model codes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
@GTFalcao Thank you for raising this important clarification! I need to verify the correct model identifiers with a more thorough search of official sources.
🌐 Web query:
💡 Result:
Based on the latest documentation from Anthropic, Claude 4 models were released in May 2025 with two main variants: Claude Opus 4 and Claude Sonnet 4. These models represent Anthropic's next generation of AI systems with enhanced capabilities for coding, reasoning, and agent-based tasks.
Official Model Identifiers
The official model identifiers for Claude 4 models are:
claude-opus-4-20250514[2]claude-sonnet-4-20250514[2]When migrating from Claude 3.7 to Claude 4, you need to update your model name from something like
claude-3-7-sonnet-20250219to the appropriate Claude 4 identifier[2][3]. While Anthropic provides model aliases for experimentation, they recommend using these specific model versions in production applications to ensure consistency[2].API Access Methods
Claude 4 models are available through multiple platforms:
anthropic.claude-opus-4-20250514-v1:0for Opus 4anthropic.claude-sonnet-4-20250514-v1:0for Sonnet 4[4][8]Pricing and Specifications
Key Features in the 2025 API
The Claude 4 models come with several API capabilities released in 2025:
When using the messages API, each input message must include a role and content. The messages can be formatted as either a single string or an array of content blocks with specific types[7].
These model identifiers and API features represent the current state of Claude 4 as of May 2025, providing developers with powerful tools for building AI applications with advanced reasoning and coding capabilities.
Citations:
🌐 Web query:
💡 Result:
Based on the search results, I can provide you with the Claude 4 model identifiers and their corresponding API names across different platforms.
Claude 4 Model Identifiers
Anthropic recently released their Claude 4 generation of models, consisting of two main variants: Claude Opus 4 and Claude Sonnet 4, both released on May 23, 2025[1][5].
Anthropic API Model Names
When using Claude 4 models through Anthropic's direct API, you should use these model identifiers:
claude-opus-4-20250514[8]claude-sonnet-4-20250514[3]These model identifiers should be specified in the "model" parameter when making API requests to Anthropic's endpoints.
Amazon Bedrock API Model Names
If you're accessing Claude 4 models through Amazon Bedrock, the model identifiers follow a different naming convention:
anthropic.claude-opus-4-20250514-v1:0[9]anthropic.claude-sonnet-4-20250514-v1:0[9]Amazon Bedrock makes these models available in various AWS regions. Claude Opus 4 is available in North American regions (US East: Ohio, N. Virginia; US West: Oregon), while Claude Sonnet 4 is more widely available, including regions in North America, APAC, and Europe[2].
Using Model Identifiers
When making API requests to Claude 4 models, you need to include the appropriate model identifier in your request. For example, when using the Anthropic API to send a message to Claude Opus 4:
{ "model": "claude-opus-4-20250514", "max_tokens": 1024, "messages": [ { "role": "user", "content": "Your message here" } ] }For Amazon Bedrock, you would use the Bedrock-specific identifier (
anthropic.claude-opus-4-20250514-v1:0) when making API calls through AWS SDKs or the AWS CLI.Changes in Claude 4
The Claude 4 models introduce some API changes compared to previous generations, including:
refusalstop reason for content that the model declines to generate[3]When migrating from Claude 3.7 to Claude 4 models, you should update your application to handle these new features, particularly the new refusal stop reason.
Citations:
🌐 Web query:
💡 Result:
Anthropic has recently unveiled its latest AI models in the Claude 4 series, introduced on May 22, 2025. The two primary models are:
Claude 4 Opus: This is the most advanced model in the series, designed for complex tasks requiring sustained focus over extended periods. It has demonstrated the capability to autonomously write computer code for nearly seven hours during testing, a significant improvement over previous versions. (reuters.com)
Claude 4 Sonnet: A more compact and cost-effective version, Sonnet 4 offers a balance between performance and efficiency, catering to a broader range of applications. (reuters.com)
Both models are available through Anthropic's API and on platforms like Amazon Bedrock and Google Cloud's Vertex AI. For instance, the model names in the Anthropic API are:
Claude 4 Opus:
claude-4-opus-20250522Claude 4 Sonnet:
claude-4-sonnet-20250522These identifiers ensure consistency and allow developers to rely on stable performance across different environments. (docs.anthropic.com)
It's noteworthy that Claude 4 Opus has been classified as a "Level 3" model on Anthropic's safety scale, indicating its significant capabilities and the implementation of enhanced safety measures to manage potential risks. (time.com)
Anthropic's Claude 4 Models: Advanced Capabilities and Safety Measures:
Citations:
@GTFalcao You're absolutely right, and I apologize for the confusion! After reviewing all the search results, I can see that there's conflicting information across different sources, but the weight of evidence supports your implementation.
The correct Claude 4 model identifiers appear to be exactly what you have implemented:
claude-opus-4-20250514claude-sonnet-4-20250514Two out of three of my search results confirm these identifiers, and most importantly, you've verified them against:
I should have been more careful with my initial suggestion. Your implementation is correct and should remain as-is. Thank you for the clarification and for doing the proper due diligence on the official model identifiers!
🐰💭 (Learning from my mistake and appreciating the correction)
✏️ Learnings added