@@ -7,6 +7,9 @@ export const ANTHROPIC_MODELS = [
77 'claude-opus-4.1-no-thinking' ,
88 'claude-opus-4.1-with-thinking-16k' ,
99 'claude-opus-4.1-with-thinking-32k' ,
10+ 'claude-opus-4.5-no-thinking' ,
11+ 'claude-opus-4.5-with-thinking-16k' ,
12+ 'claude-opus-4.5-with-thinking-32k' ,
1013 'claude-sonnet-4.5-no-thinking' ,
1114 'claude-sonnet-4.5-with-thinking-16k' ,
1215 'claude-sonnet-4.5-with-thinking-32k' ,
@@ -21,6 +24,9 @@ export async function getAiSdkModelOptionsForAnthropic(
2124 case 'claude-opus-4.1-no-thinking' :
2225 case 'claude-opus-4.1-with-thinking-16k' :
2326 case 'claude-opus-4.1-with-thinking-32k' :
27+ case 'claude-opus-4.5-no-thinking' :
28+ case 'claude-opus-4.5-with-thinking-16k' :
29+ case 'claude-opus-4.5-with-thinking-32k' :
2430 case 'claude-sonnet-4.5-no-thinking' :
2531 case 'claude-sonnet-4.5-with-thinking-16k' :
2632 case 'claude-sonnet-4.5-with-thinking-32k' : {
@@ -30,8 +36,13 @@ export async function getAiSdkModelOptionsForAnthropic(
3036 : modelName . endsWith ( '-32k' )
3137 ? 32_000
3238 : 16_000 ;
33- const isOpus4_1Model = modelName . includes ( 'opus-4.1' ) ;
34- const model = anthropic ( isOpus4_1Model ? 'claude-opus-4-1' : 'claude-sonnet-4-5' ) ;
39+ let apiModelName : Parameters < typeof anthropic > [ 0 ] = 'claude-sonnet-4-5' ;
40+ if ( modelName . includes ( 'opus-4.1' ) ) {
41+ apiModelName = 'claude-opus-4-1' ;
42+ } else if ( modelName . includes ( 'opus-4.5' ) ) {
43+ apiModelName = 'claude-opus-4.5' ;
44+ }
45+ const model = anthropic ( apiModelName ) ;
3546 return {
3647 model : thinkingEnabled
3748 ? wrapLanguageModel ( {
0 commit comments