Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/types/src/providers/claude-code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ export const claudeCodeModels = {
supportsReasoningBudget: false,
requiredReasoningBudget: false,
},
"claude-sonnet-4-5-20250929[1m]": {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical: Model ID naming inconsistency. The model ID "claude-sonnet-4-5-20250929[1m]" includes a date (20250929) that doesn't exist in the base anthropic models. The base model being spread is "claude-sonnet-4-5" (no date), not "claude-sonnet-4-5-20250929".

This creates confusion because:

  1. The date in the model ID suggests it's based on a dated model variant
  2. But it's actually spreading from the undated "claude-sonnet-4-5" base model
  3. This inconsistency could lead to maintenance issues

Consider either:

  • Using "claude-sonnet-4-5[1m]" to match the base model name, OR
  • Documenting why the date is included if it has semantic meaning for Claude Code

...anthropicModels["claude-sonnet-4-5"],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: Consider adding a test case for the new 1M context model in __tests__/claude-code.spec.ts to verify:

  1. The model ID is valid and can be retrieved
  2. The contextWindow is correctly set to 1_000_000
  3. The model properly inherits other properties from the base model

contextWindow: 1_000_000, // 1M token context window (requires [1m] suffix)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major: Missing pricing information for 1M context. The base claude-sonnet-4-5 model in anthropic.ts has tiered pricing for 1M context (lines 21-29 in anthropic.ts):

  • Input: $6 per million tokens (vs $3 for ≤200K)
  • Output: $22.50 per million tokens (vs $15 for ≤200K)
  • Cache writes: $7.50 per million tokens (vs $3.75 for ≤200K)
  • Cache reads: $0.60 per million tokens (vs $0.30 for ≤200K)

The current implementation inherits the base pricing ($3/$15) which is incorrect for 1M context usage. You should either:

  1. Override the pricing fields to match the 1M tier pricing, OR
  2. Document that Claude Code uses different pricing than the Anthropic API

supportsImages: false,
supportsPromptCache: true, // Claude Code does report cache tokens
supportsReasoningEffort: false,
supportsReasoningBudget: false,
requiredReasoningBudget: false,
},
"claude-sonnet-4-20250514": {
...anthropicModels["claude-sonnet-4-20250514"],
supportsImages: false,
Expand Down