@@ -47,14 +47,14 @@ export class AnthropicHandler extends BaseProvider implements SingleCompletionHa
4747
4848 // Add 1M context beta flag if enabled for Claude Sonnet 4 and 4.5
4949 if (
50- ( modelId === "claude-sonnet-4-20250514" || modelId === "claude-sonnet-4-5-20250514 " ) &&
50+ ( modelId === "claude-sonnet-4-20250514" || modelId === "claude-4.5-sonnet " ) &&
5151 this . options . anthropicBeta1MContext
5252 ) {
5353 betas . push ( "context-1m-2025-08-07" )
5454 }
5555
5656 switch ( modelId ) {
57- case "claude-sonnet-4-5-20250514 " :
57+ case "claude-4.5-sonnet " :
5858 case "claude-sonnet-4-20250514" :
5959 case "claude-opus-4-1-20250805" :
6060 case "claude-opus-4-20250514" :
@@ -114,7 +114,7 @@ export class AnthropicHandler extends BaseProvider implements SingleCompletionHa
114114
115115 // Then check for models that support prompt caching
116116 switch ( modelId ) {
117- case "claude-sonnet-4-5-20250514 " :
117+ case "claude-4.5-sonnet " :
118118 case "claude-sonnet-4-20250514" :
119119 case "claude-opus-4-1-20250805" :
120120 case "claude-opus-4-20250514" :
@@ -249,10 +249,7 @@ export class AnthropicHandler extends BaseProvider implements SingleCompletionHa
249249 let info : ModelInfo = anthropicModels [ id ]
250250
251251 // If 1M context beta is enabled for Claude Sonnet 4 or 4.5, update the model info
252- if (
253- ( id === "claude-sonnet-4-20250514" || id === "claude-sonnet-4-5-20250514" ) &&
254- this . options . anthropicBeta1MContext
255- ) {
252+ if ( ( id === "claude-sonnet-4-20250514" || id === "claude-4.5-sonnet" ) && this . options . anthropicBeta1MContext ) {
256253 // Use the tier pricing for 1M context
257254 const tier = info . tiers ?. [ 0 ]
258255 if ( tier ) {
0 commit comments