-
Notifications
You must be signed in to change notification settings - Fork 838
Add Claude 3.7 Sonnet & Sonnet/Opus 4 #861
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
Add Claude 3.7 Sonnet & Sonnet/Opus 4 #861
Conversation
Caution Review failedThe pull request is closed. WalkthroughThree new Claude API model keys and their corresponding model definitions were added to the configuration. These additions expand the list of available Claude models by updating both the Changes
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
npm error Exit handler never called! 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✨ Finishing Touches
🪧 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 (
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
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.
Pull Request Overview
Adds support for three new Claude API models by extending the model key list and defining their configurations.
- Appends
claude37SonnetApi
,claudeOpus4Api
, andclaudeSonnet4Api
toclaudeApiModelKeys
. - Introduces matching entries under
Models
withvalue
anddesc
for each new model.
Comments suppressed due to low confidence (2)
src/config/index.mjs:232
- [nitpick] The description order is inconsistent with existing entries (e.g., 'Claude 3.5 Haiku'). Consider changing to 'Claude.ai (API, Claude 3.7 Sonnet)' for consistency.
desc: 'Claude.ai (API, Claude Sonnet 3.7)',
src/config/index.mjs:76
- New models have been added to the configuration but there are no corresponding unit tests to verify their registration. Please add tests to ensure these keys and model entries are correctly handled.
'claude37SonnetApi',
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/config/index.mjs (1)
230-241
: Ensure model identifiers and descriptions follow existing conventions
Thevalue
strings forclaudeOpus4Api
andclaudeSonnet4Api
(currentlyclaude-opus-4-…
andclaude-sonnet-4-…
) diverge from the establishedclaude-{version}-{type}-{date}
pattern (e.g.claude-3-opus-20240229
) and theClaude {version} {Type}
description format (e.g.Claude 3 Opus
). Please verify the correct API identifiers and align these entries. For example:--- a/src/config/index.mjs +++ a/src/config/index.mjs @@ Models { - claudeOpus4Api: { - value: 'claude-opus-4-20250514', - desc: 'Claude.ai (API, Claude Opus 4)', - }, - claudeSonnet4Api: { - value: 'claude-sonnet-4-20250514', - desc: 'Claude.ai (API, Claude Sonnet 4)', - }, + claudeOpus4Api: { + value: 'claude-4-opus-20250514', + desc: 'Claude.ai (API, Claude 4 Opus)', + }, + claudeSonnet4Api: { + value: 'claude-4-sonnet-20250514', + desc: 'Claude.ai (API, Claude 4 Sonnet)', + },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/config/index.mjs
(2 hunks)
🧰 Additional context used
🪛 Gitleaks (8.26.0)
src/config/index.mjs
76-77: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
🔇 Additional comments (1)
src/config/index.mjs (1)
76-79
: New Claude API model keys appended correctly
The keysclaude37SonnetApi
,claudeOpus4Api
, andclaudeSonnet4Api
have been added in sequence alongside existing entries inclaudeApiModelKeys
.🧰 Tools
🪛 Gitleaks (8.26.0)
76-77: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
cdf6546
to
a5b6d57
Compare
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.
Pull Request Overview
This PR adds support for new Claude API models by updating the configuration file.
- Adds three new API model keys: claude37SonnetApi, claudeOpus4Api, and claudeSonnet4Api.
- Introduces corresponding model configurations with specific values and descriptions.
User description
Summary from GitHub Copilot:
PR Type
Enhancement
Description
claude37SonnetApi
,claudeOpus4Api
, andclaudeSonnet4Api
in model keys.Changes walkthrough 📝
index.mjs
Add new Claude 3.7 and 4 API models and configs
src/config/index.mjs
claude37SonnetApi
,claudeOpus4Api
, andclaudeSonnet4Api
toclaudeApiModelKeys
.Summary by CodeRabbit