Skip to content

PeasyAI: default the direct Anthropic provider to claude-sonnet-4-6 - #1011

Open
emreyoleridev wants to merge 1 commit into
p-org:masterfrom
emreyoleridev:peasyai-retired-claude-default
Open

emreyoleridev wants to merge 1 commit into
p-org:masterfrom
emreyoleridev:peasyai-retired-claude-default

Conversation

@emreyoleridev

Copy link
Copy Markdown

PeasyAI's direct Anthropic provider still defaults to claude-3-5-sonnet-20241022. Anthropic retired that model on 2025-10-28 (model deprecations), so with ANTHROPIC_API_KEY set and no model configured, every request comes back as not_found_error. The rest of AnthropicProvider.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-5
  • factory.py: ANTHROPIC_MODEL_NAME fallback (both places)
  • config.py: fallback in to_env_vars() and the generated default config
  • configuration/providers.yaml (anthropic_direct), .peasyai-schema.json and the README example
  • tests/test_config.py: test_anthropic_env_vars now expects the new default

I 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_vars is the only test that checks the default value, and it's updated here.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant