-
Notifications
You must be signed in to change notification settings - Fork 55
Rename Anthropic model IDs to use dot notation (claude-sonnet-4.5, claude-haiku-4.5) #2418
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
Conversation
- claude-sonnet-4-5-20250929 → claude-sonnet-4.5 - claude-haiku-4-5-20251001 → claude-haiku-4.5 - Update fallback regex patterns for backward compatibility
|
|
Finished running flow.
|
||||||||||||||||||
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThis PR standardizes Anthropic Claude model identifiers from date-specific strings (e.g., "claude-sonnet-4-5-20250929") to generic semantic versions (e.g., "claude-sonnet-4.5") across registries, normalization logic, UI defaults/recommendations, pricing keys, fixtures, converters, and tests. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
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 updates Anthropic model identifiers from date-based suffixes to dot notation (e.g., claude-sonnet-4-5-20250929 → claude-sonnet-4.5) for consistency with the existing claude-opus-4.5 naming convention.
Key changes:
- Updated model IDs across registry, conversion, and configuration files
- Added legacy model IDs to the conversion layer for backward compatibility
- Updated test expectations and fixtures to reflect new model naming
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/node-registry/src/node-conversion.ts |
Added legacy model IDs to conversion mapping and updated registry keys |
packages/node-registry/src/node-conversion.test.ts |
Updated test expectations for new model ID format |
packages/node-registry/src/__fixtures__/node-conversion/nodes.ts |
Updated fixture data to use new model ID |
packages/language-model/src/costs/model-prices.ts |
Updated pricing table keys to use dot notation |
packages/language-model/src/anthropic.ts |
Updated enum values, fallback logic, and model definitions |
packages/language-model/src/anthropic.test.ts |
Updated all test cases to expect new model IDs |
packages/language-model-registry/src/anthropic.ts |
Updated registry keys and removed trailing spaces in descriptions |
packages/giselle/src/generations/v2/language-model/transform-giselle-to-ai-sdk.ts |
Updated case labels in switch statement |
internal-packages/workflow-designer-ui/src/editor/tool/toolbar/toolbar.tsx |
Updated hardcoded model ID arrays |
internal-packages/workflow-designer-ui/src/editor/properties-panel/text-generation-node-properties-panel/model/model-defaults.ts |
Updated default model ID |
apps/studio.giselles.ai/app/(main)/stage/tasks/[taskId]/loading.tsx |
Updated dummy data model ID |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case "anthropic/claude-haiku-4.5": | ||
| return "claude-haiku-4.5"; | ||
| case "anthropic/claude-opus-4.5": | ||
| return "claude-opus-4.5"; | ||
| case "anthropic/claude-sonnet-4-5": | ||
| return "claude-sonnet-4-5-20250929"; | ||
| case "anthropic/claude-sonnet-4.5": |
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.
Preserve legacy anthropic IDs in content->text conversion
The conversion back to text-generation nodes now matches only the dot-notation Anthropics (anthropic/claude-haiku-4.5, anthropic/claude-opus-4.5, anthropic/claude-sonnet-4.5). Content-generation nodes saved before this rename still carry the old registry IDs (anthropic/claude-haiku-4-5, anthropic/claude-sonnet-4-5, etc.), and those will now hit the default branch and throw Unknown language model id, breaking the backward-compatibility the summary promises. Add the legacy anthropic/claude-*-4-5 cases alongside the new ones so existing stored nodes continue to load.
Useful? React with 👍 / 👎.
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.
The registry IDs (anthropic/claude-*) are not persisted to storage. Stored data uses the text-generation format (claude-sonnet-4-5-20250929, etc.), which is handled by LegacyAnthropicModelId in the text→content conversion.
The content→text conversion only needs to handle current registry IDs since content-generation nodes are created in memory with the current registry, not loaded from legacy storage.
🔍 QA Testing Assistant by Giselle📋 Manual QA ChecklistBased on the changes in this PR, here are the key areas to test manually:
✨ Prompt for AI AgentsUse the following prompts with Cursor or Claude Code to automate E2E testing: 📝 E2E Test Generation Prompt |
|
|
||
| expect(result.content.llm?.provider).toBe("anthropic"); | ||
| expect(result.content.llm?.id).toBe("claude-sonnet-4-5-20250929"); | ||
| expect(result.content.llm?.id).toBe("claude-sonnet-4.5"); |
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.
Bug: Test expectation not updated for new model ID
The test expects the old model ID anthropic/claude-sonnet-4-5 but the fixture anthropicClaudeSonnet was updated to use claude-sonnet-4.5, and the conversion function now returns anthropic/claude-sonnet-4.5. This test will fail because the expectation wasn't updated to match the new dot notation ID format.
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.
The test is correct. Both the fixture and the expected value use the new dot notation:
- Fixture:
claude-sonnet-4.5 - Expected:
anthropic/claude-sonnet-4.5
The conversion function maps claude-sonnet-4.5 → anthropic/claude-sonnet-4.5, and tests pass successfully.
- Rename registry keys to use dot notation (claude-sonnet-4.5, claude-haiku-4.5) - Add legacy model IDs to conversion mapping for backward compatibility - Update fixtures and tests
c4437c8 to
0d9a6a0
Compare
|
Thank you! 🚀 |
Summary
claude-sonnet-4-5-20250929→claude-sonnet-4.5claude-haiku-4-5-20251001→claude-haiku-4.5anthropic/claude-sonnet-4.5,anthropic/claude-haiku-4.5)Note
Standardizes Anthropic Claude IDs to dot notation (e.g.,
claude-sonnet-4.5,claude-haiku-4.5) across codebase, updates registries/pricing/UI, and adds legacy fallbacks and conversion mappings.AnthropicLanguageModelIdenum and fallback parsing to accept dot notation (claude-sonnet-4.5,claude-haiku-4.5) and normalize legacy variants.models) to use new IDs.anthropicTokenPricing.anthropic/claude-sonnet-4.5andanthropic/claude-haiku-4.5.transform-giselle-to-ai-sdk.claude-sonnet-4.5.Written by Cursor Bugbot for commit 0d9a6a0. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
Chores
Tests
✏️ Tip: You can customize this high-level summary in your review settings.