Repository navigation
PeasyAI: default the direct Anthropic provider to claude-sonnet-4-6 - #1011
Open
emreyoleridev wants to merge 1 commit into
Open
emreyoleridev wants to merge 1 commit into
emreyoleridev wants to merge 1 commit into
Conversation
Anthropic retired claude-3-5-sonnet-20241022 on 2025-10-28, and the other IDs in AnthropicProvider.AVAILABLE_MODELS (3.5 Haiku, 3 Opus, 3 Sonnet, 3 Haiku) are retired too. With ANTHROPIC_API_KEY set and no model configured, PeasyAI sent the retired default and the API returned not_found_error. Update the provider default, the env/config fallbacks, providers.yaml, the JSON schema, the README example and the matching test. Bedrock and Snowflake model IDs are left as they are.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PeasyAI's direct Anthropic provider still defaults to
claude-3-5-sonnet-20241022. Anthropic retired that model on 2025-10-28 (model deprecations), so withANTHROPIC_API_KEYset and no model configured, every request comes back asnot_found_error. The rest ofAnthropicProvider.AVAILABLE_MODELS(3.5 Haiku, 3 Opus, 3 Sonnet, 3 Haiku) is retired as well.Changes, direct Anthropic provider only:
anthropic_direct.py:DEFAULT_MODEL→claude-sonnet-4-6;AVAILABLE_MODELS→claude-sonnet-4-6,claude-opus-4-6,claude-haiku-4-5factory.py:ANTHROPIC_MODEL_NAMEfallback (both places)config.py: fallback into_env_vars()and the generated default configconfiguration/providers.yaml(anthropic_direct),.peasyai-schema.jsonand the README exampletests/test_config.py:test_anthropic_env_varsnow expects the new defaultI left the Bedrock (
anthropic.claude-3-5-sonnet-20241022-v2:0) and Snowflake Cortex IDs alone, since those follow their own platforms' model lifecycles and are a separate change.I didn't run the test suite locally;
test_anthropic_env_varsis the only test that checks the default value, and it's updated here.