fix: Update Claude model ID from deprecated version to claude-sonnet-4-5 #203
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.
fix #203
Summary of Changes
This PR updates the Anthropic Claude model ID from the deprecated
claude-3-5-sonnet-20241022to the currentclaude-sonnet-4-5model ID across the AI provider configuration files.Changes include:
factory.jsfrom'claude-3-5-sonnet-20241022'to'claude-sonnet-4-5'anthropic.jscreateLLMfunctionanthropic.jscreateStreamingLLMfunctionThis fix resolves the 404
not_found_errorthat was occurring when attempting to use the Anthropic provider forcommunication analysis features.
Related Issue
This PR addresses a critical bug where users were unable to generate communication analysis using the Anthropic provider.
The application was attempting to use an outdated model ID that no longer exists in Anthropic's API, resulting in a 404
error:
❌ Error during analysis generation: 404
{"type":"error","error":{"type":"not_found_error","message":"model: claude-3-5-sonnet-20241022"}}
Contributor's Self-Review Checklist
Please check the boxes that apply. This is a reminder of what we look for in a good pull request.
DESIGN_PATTERNS.md.
Additional Context (Optional)
Testing performed:
npm run buildnpm startFiles affected:
src/features/common/ai/factory.js(line 56)src/features/common/ai/providers/anthropic.js(lines 71 and 198)Why this change was needed:
According to the latest Anthropic API documentation, the model ID
claude-3-5-sonnet-20241022has been deprecated andreplaced with the simplified ID
claude-sonnet-4-5. Continuing to use the old model ID results in API errors that preventusers from utilizing the Anthropic provider for AI-powered communication analysis features.