fix: update Anthropic default models to currently served versions - #1388
Open
ccyyy1023 wants to merge 1 commit into
Open
fix: update Anthropic default models to currently served versions#1388ccyyy1023 wants to merge 1 commit into
ccyyy1023 wants to merge 1 commit into
Conversation
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
14 tasks
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.
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
default_anthropic_chat_modelsto[claude-sonnet-4-5, claude-haiku-4-5]; remove retired model cost entriesclaude-3-7-sonnetfrom operator model whitelistclaude-3-7-sonnettool config branchesclaude-3-7-sonnet-latesttoclaude-sonnet-4-5Testing
No behavioral changes — this is a string-level update of model identifiers. Existing
claude-sonnet-4/claude-opus-4prefix matching in operator code continues to match the current models (.startswith(claude-sonnet-4)already coveredclaude-sonnet-4-5).Reference: https://platform.claude.com/docs/en/about-claude/model-deprecations