@@ -25,7 +25,7 @@ vi.mock("@aws-sdk/client-bedrock-runtime", () => {
2525
2626import  {  AwsBedrockHandler  }  from  "../bedrock" 
2727import  {  ConverseStreamCommand ,  BedrockRuntimeClient  }  from  "@aws-sdk/client-bedrock-runtime" 
28- import  {  BEDROCK_CLAUDE_SONNET_4_MODEL_ID  }  from  "@roo-code/types" 
28+ import  {  BEDROCK_1M_CONTEXT_MODEL_IDS  }  from  "@roo-code/types" 
2929
3030import  type  {  Anthropic  }  from  "@anthropic-ai/sdk" 
3131
@@ -569,7 +569,7 @@ describe("AwsBedrockHandler", () => {
569569	describe ( "1M context beta feature" ,  ( )  =>  { 
570570		it ( "should enable 1M context window when awsBedrock1MContext is true for Claude Sonnet 4" ,  ( )  =>  { 
571571			const  handler  =  new  AwsBedrockHandler ( { 
572- 				apiModelId : BEDROCK_CLAUDE_SONNET_4_MODEL_ID , 
572+ 				apiModelId : BEDROCK_1M_CONTEXT_MODEL_IDS [ 0 ] , 
573573				awsAccessKey : "test" , 
574574				awsSecretKey : "test" , 
575575				awsRegion : "us-east-1" , 
@@ -584,7 +584,7 @@ describe("AwsBedrockHandler", () => {
584584
585585		it ( "should use default context window when awsBedrock1MContext is false for Claude Sonnet 4" ,  ( )  =>  { 
586586			const  handler  =  new  AwsBedrockHandler ( { 
587- 				apiModelId : BEDROCK_CLAUDE_SONNET_4_MODEL_ID , 
587+ 				apiModelId : BEDROCK_1M_CONTEXT_MODEL_IDS [ 0 ] , 
588588				awsAccessKey : "test" , 
589589				awsSecretKey : "test" , 
590590				awsRegion : "us-east-1" , 
@@ -614,7 +614,7 @@ describe("AwsBedrockHandler", () => {
614614
615615		it ( "should include anthropic_beta parameter when 1M context is enabled" ,  async  ( )  =>  { 
616616			const  handler  =  new  AwsBedrockHandler ( { 
617- 				apiModelId : BEDROCK_CLAUDE_SONNET_4_MODEL_ID , 
617+ 				apiModelId : BEDROCK_1M_CONTEXT_MODEL_IDS [ 0 ] , 
618618				awsAccessKey : "test" , 
619619				awsSecretKey : "test" , 
620620				awsRegion : "us-east-1" , 
@@ -644,7 +644,7 @@ describe("AwsBedrockHandler", () => {
644644
645645		it ( "should not include anthropic_beta parameter when 1M context is disabled" ,  async  ( )  =>  { 
646646			const  handler  =  new  AwsBedrockHandler ( { 
647- 				apiModelId : BEDROCK_CLAUDE_SONNET_4_MODEL_ID , 
647+ 				apiModelId : BEDROCK_1M_CONTEXT_MODEL_IDS [ 0 ] , 
648648				awsAccessKey : "test" , 
649649				awsSecretKey : "test" , 
650650				awsRegion : "us-east-1" , 
@@ -698,7 +698,7 @@ describe("AwsBedrockHandler", () => {
698698
699699		it ( "should enable 1M context window with cross-region inference for Claude Sonnet 4" ,  ( )  =>  { 
700700			const  handler  =  new  AwsBedrockHandler ( { 
701- 				apiModelId : BEDROCK_CLAUDE_SONNET_4_MODEL_ID , 
701+ 				apiModelId : BEDROCK_1M_CONTEXT_MODEL_IDS [ 0 ] , 
702702				awsAccessKey : "test" , 
703703				awsSecretKey : "test" , 
704704				awsRegion : "us-east-1" , 
@@ -711,12 +711,12 @@ describe("AwsBedrockHandler", () => {
711711			// Should have 1M context window even with cross-region prefix 
712712			expect ( model . info . contextWindow ) . toBe ( 1_000_000 ) 
713713			// Model ID should have cross-region prefix 
714- 			expect ( model . id ) . toBe ( `us.${ BEDROCK_CLAUDE_SONNET_4_MODEL_ID }  ) 
714+ 			expect ( model . id ) . toBe ( `us.${ BEDROCK_1M_CONTEXT_MODEL_IDS [ 0 ] }  ) 
715715		} ) 
716716
717717		it ( "should include anthropic_beta parameter with cross-region inference for Claude Sonnet 4" ,  async  ( )  =>  { 
718718			const  handler  =  new  AwsBedrockHandler ( { 
719- 				apiModelId : BEDROCK_CLAUDE_SONNET_4_MODEL_ID , 
719+ 				apiModelId : BEDROCK_1M_CONTEXT_MODEL_IDS [ 0 ] , 
720720				awsAccessKey : "test" , 
721721				awsSecretKey : "test" , 
722722				awsRegion : "us-east-1" , 
@@ -746,7 +746,7 @@ describe("AwsBedrockHandler", () => {
746746			// Should not include anthropic_version since thinking is not enabled 
747747			expect ( commandArg . additionalModelRequestFields . anthropic_version ) . toBeUndefined ( ) 
748748			// Model ID should have cross-region prefix 
749- 			expect ( commandArg . modelId ) . toBe ( `us.${ BEDROCK_CLAUDE_SONNET_4_MODEL_ID }  ) 
749+ 			expect ( commandArg . modelId ) . toBe ( `us.${ BEDROCK_1M_CONTEXT_MODEL_IDS [ 0 ] }  ) 
750750		} ) 
751751	} ) 
752752} ) 
0 commit comments