-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add Support for Claude Opus 4.1 Model #1673
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 Support for Claude Opus 4.1 Model #1673
Conversation
…otes generation ## CHANGES - Upgrade anthropic-sdk-go from v1.4.0 to v1.7.0 - Move changelog generation to separate workflow job - Add Claude Opus 4.1 model support - Fix temperature/topP parameter conflict for models - Separate release artifact upload from changelog update - Add dedicated update_release_notes job configuration
## CHANGES - Add domain constants for default chat parameter values - Update Anthropic client to check explicitly set parameters - Add documentation linking CLI flags to domain defaults - Improve temperature and TopP parameter selection logic - Ensure consistent default values across CLI and domain - Replace zero-value checks with explicit default comparisons - Centralize chat option defaults in domain package
…default ## CHANGES - Always set temperature parameter for consistent behavior - Prioritize TopP over temperature when explicitly set - Override Anthropic's default 1.0 with Fabric's 0.7 - Add comprehensive tests for parameter precedence logic - Update VSCode dictionary with Keploy entry - Simplify conditional logic for temperature/TopP selection
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 Claude Opus 4.1 model and refactors the GitHub Actions release workflow to improve build reliability. The main changes include separating version retrieval into a dedicated job, simplifying OS detection logic, and fixing parameter conflicts in the Anthropic client.
- Add Claude Opus 4.1 model support to the Anthropic client
- Fix temperature/topP parameter conflict that was causing API errors
- Refactor GitHub Actions workflow to improve reliability with separated version job
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
internal/plugins/ai/anthropic/anthropic.go | Added Claude Opus 4.1 model and fixed temperature/topP parameter handling |
internal/plugins/ai/anthropic/anthropic_test.go | Added comprehensive tests for parameter handling logic |
internal/domain/domain.go | Added default constants for chat parameters |
internal/cli/flags.go | Added comment about parameter defaults consistency |
go.mod | Updated anthropic-sdk-go from v1.4.0 to v1.7.0 |
.github/workflows/release.yml | Refactored workflow with dedicated version job and simplified OS detection |
cmd/generate_changelog/incoming/1673.txt | Added changelog entry for the changes |
.vscode/settings.json | Added "Keploy" to spell check dictionary |
Add Support for Claude Opus 4.1 Model
Summary
This PR refactors the GitHub Actions release workflow to improve build reliability and adds support for the Claude Opus 4.1 model. The main changes include separating the version retrieval into its own job, simplifying OS detection logic, fixing parameter conflicts for Anthropic models, and updating the anthropic-sdk-go dependency.
Files Changed
Code Changes
Release Workflow Refactoring
The workflow now has a dedicated
get_version
job that runs before the build:OS detection has been simplified from a multi-step process to inline ternary operators:
Changelog generation has been moved to a separate
update_release_notes
job that runs after all builds complete:Anthropic Client Updates
Added support for the new Claude Opus 4.1 model:
Fixed temperature/topP parameter conflict issue:
Reason for Changes
Workflow Reliability: The previous workflow had version retrieval duplicated across matrix jobs, which could lead to race conditions and inefficiencies. Separating this into its own job ensures it runs once and provides consistent output.
Claude Opus 4.1 Support: Adding support for the latest Claude model provides users with access to improved AI capabilities.
Parameter Conflict Fix: Some Anthropic models don't allow both temperature and topP parameters to be set simultaneously, which was causing API errors.
Simplified OS Detection: The previous multi-step OS detection was unnecessarily complex and could be replaced with inline conditionals.
Impact of Changes
Test Plan
nix/pkgs/fabric/version.nix
Additional Notes
needs: [test, get_version]
) ensuring proper execution orderPotential Issues to Monitor:
update_release_notes
job requires all builds to complete successfully before running