Skip to content

fix: update Anthropic default models to currently served versions - #1388

Open
ccyyy1023 wants to merge 1 commit into
khoj-ai:masterfrom
ccyyy1023:fix/update-anthropic-models
Open

fix: update Anthropic default models to currently served versions#1388
ccyyy1023 wants to merge 1 commit into
khoj-ai:masterfrom
ccyyy1023:fix/update-anthropic-models

Conversation

@ccyyy1023

Copy link
Copy Markdown

Summary

Replace retired Anthropic model names with currently served equivalents. Anthropic retired claude-sonnet-4 / claude-opus-4 (June 15, 2026) and claude-3-7-sonnet (April 20, 2026), so default settings reference models that return API errors.

Closes #1387

Changes

  • constants.py: update default_anthropic_chat_models to [claude-sonnet-4-5, claude-haiku-4-5]; remove retired model cost entries
  • conversation/utils.py: replace stale token-window entries with current models (haiku-4-5, sonnet-4-5, opus-4-5, opus-4-8)
  • operator/init.py: drop claude-3-7-sonnet from operator model whitelist
  • operator_agent_anthropic.py: remove dead claude-3-7-sonnet tool config branches
  • anthropic_chat.py: update function default from claude-3-7-sonnet-latest to claude-sonnet-4-5

Testing

No behavioral changes — this is a string-level update of model identifiers. Existing claude-sonnet-4 / claude-opus-4 prefix matching in operator code continues to match the current models (.startswith(claude-sonnet-4) already covered claude-sonnet-4-5).

Reference: https://platform.claude.com/docs/en/about-claude/model-deprecations

Replace retired model names (claude-sonnet-4-0, claude-opus-4-0,
claude-3-7-sonnet, and their dated snapshots, all retired April-June
2026) with the currently served equivalents (claude-sonnet-4-5,
claude-opus-4-5, claude-haiku-4-5).

- constants.py: update default_anthropic_chat_models list, remove
  retired model cost entries
- conversation/utils.py: replace stale token-window entries
- operator/__init__.py: drop claude-3-7-sonnet from whitelist
- operator_agent_anthropic.py: remove dead claude-3-7-sonnet tool
  config branches
- anthropic_chat.py: update function-signature default model arg

Closes khoj-ai#1387
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.

Default Anthropic models are retired - several OpenAI defaults shut down Oct 23

1 participant