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.
Improve: Update model selection to use aliases instead of specific versions #379
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?
Uh oh!
There was an error while loading. Please reload this page.
Improve: Update model selection to use aliases instead of specific versions #379
Changes from 1 commit
76f18bba9f2823a590b0eFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
…rsions Changes: - Updated AgentExecution.tsx and CreateAgent.tsx UI to display 'Sonnet' and 'Opus' instead of 'Claude 4 Sonnet' and 'Claude 4 Opus' - Enhanced pricing logic in usage.rs to recognize both model aliases ('opus', 'sonnet') and full model names ('claude-opus-4', 'claude-sonnet-4') - Added case-insensitive model name matching - Updated cc_agents/README.md to reflect proper model alias usage per Claude Code documentation - Added comprehensive unit tests for calculate_cost function with alias support (test_calculate_cost_with_aliases, test_calculate_cost_partial_tokens) Rationale: Claude Code recommends using model aliases (sonnet, opus) which automatically map to the latest model versions, avoiding hardcoded version numbers that become outdated. This aligns with best practices from https://docs.claude.com/en/docs/claude-code/model-config#model-aliases Testing: - Manually tested agent execution with both 'opus' and 'sonnet' aliases - Both models execute successfully and display correct alias names in UI - Unit tests added but cannot run due to pre-existing compilation error (now fixed in previous commit) Backward Compatibility: - Fully backward compatible: existing agents using full model names will continue to work - Pricing calculation now supports both aliases and full names via OR logic 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing