Fix Claude 4 Sonnet context window token count display #5727
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.
Fixes #5726
Problem
Claude 4 Sonnet was showing only 200k tokens instead of its actual 1 million token capacity in the context window display. This affected both the UI display and context condensing functionality.
Solution
Updated Claude 4 model definitions across all providers to reflect the correct 1M token context window:
claude-sonnet-4-20250514andclaude-opus-4-20250514from 200k to 1M tokensanthropic.claude-sonnet-4-20250514-v1:0andanthropic.claude-opus-4-20250514-v1:0from 200k to 1M tokensclaude-sonnet-4@20250514andclaude-opus-4@20250514from 200k to 1M tokensFiles Changed
packages/types/src/providers/anthropic.tspackages/types/src/providers/bedrock.tspackages/types/src/providers/vertex.tspackages/types/src/providers/openrouter.tssrc/api/providers/fetchers/litellm.tssrc/core/webview/__tests__/ClineProvider.spec.tsTesting
Important
Update Claude 4 Sonnet models to reflect 1M token context window across multiple providers and update tests accordingly.
anthropic.ts,bedrock.ts,vertex.ts,openrouter.ts, andlitellm.ts.ClineProvider.spec.tsto reflect 1M token context window.claude-sonnet-4-20250514andclaude-opus-4-20250514.anthropic.claude-sonnet-4-20250514-v1:0andanthropic.claude-opus-4-20250514-v1:0.claude-sonnet-4@20250514andclaude-opus-4@20250514.This description was created by
for 3a2278a. You can customize this summary. It will automatically update as commits are pushed.