@@ -116,7 +116,7 @@ void testMessageHistory() {
116116 SystemPromptTemplate systemPromptTemplate = new SystemPromptTemplate (this .systemResource );
117117 Message systemMessage = systemPromptTemplate .createMessage (Map .of ("name" , "Bob" , "voice" , "pirate" ));
118118 Prompt prompt = new Prompt (List .of (userMessage , systemMessage ),
119- AnthropicChatOptions .builder ().model ("claude-3-5-sonnet-latest" ).build ());
119+ AnthropicChatOptions .builder ().model (AnthropicApi . ChatModel . CLAUDE_3_7_SONNET ).build ());
120120
121121 ChatResponse response = this .chatModel .call (prompt );
122122 assertThat (response .getResult ().getOutput ().getText ()).containsAnyOf ("Blackbeard" , "Bartholomew" );
@@ -269,7 +269,7 @@ void multiModalityPdfTest() throws IOException {
269269 .build ();
270270
271271 var response = this .chatModel .call (new Prompt (List .of (userMessage ),
272- ToolCallingChatOptions .builder ().model (AnthropicApi .ChatModel .CLAUDE_3_5_SONNET .getName ()).build ()));
272+ ToolCallingChatOptions .builder ().model (AnthropicApi .ChatModel .CLAUDE_3_7_SONNET .getName ()).build ()));
273273
274274 assertThat (response .getResult ().getOutput ().getText ()).containsAnyOf ("Spring AI" , "portable API" );
275275 }
@@ -315,7 +315,7 @@ void streamFunctionCallTest() {
315315 List <Message > messages = new ArrayList <>(List .of (userMessage ));
316316
317317 var promptOptions = AnthropicChatOptions .builder ()
318- .model (AnthropicApi .ChatModel .CLAUDE_3_5_SONNET .getName ())
318+ .model (AnthropicApi .ChatModel .CLAUDE_3_7_SONNET .getName ())
319319 .toolCallbacks (FunctionToolCallback .builder ("getCurrentWeather" , new MockWeatherService ())
320320 .description (
321321 "Get the weather in location. Return temperature in 36°F or 36°C format. Use multi-turn if needed." )
@@ -345,7 +345,7 @@ void streamFunctionCallUsageTest() {
345345 List <Message > messages = new ArrayList <>(List .of (userMessage ));
346346
347347 var promptOptions = AnthropicChatOptions .builder ()
348- .model (AnthropicApi .ChatModel .CLAUDE_3_5_SONNET .getName ())
348+ .model (AnthropicApi .ChatModel .CLAUDE_3_7_SONNET .getName ())
349349 .toolCallbacks (FunctionToolCallback .builder ("getCurrentWeather" , new MockWeatherService ())
350350 .description (
351351 "Get the weather in location. Return temperature in 36°F or 36°C format. Use multi-turn if needed." )
@@ -381,7 +381,7 @@ void validateCallResponseMetadata() {
381381
382382 @ Test
383383 void validateStreamCallResponseMetadata () {
384- String model = AnthropicApi .ChatModel .CLAUDE_3_5_SONNET .getName ();
384+ String model = AnthropicApi .ChatModel .CLAUDE_3_7_SONNET .getName ();
385385 // @formatter:off
386386 ChatResponse response = ChatClient .create (this .chatModel ).prompt ()
387387 .options (AnthropicChatOptions .builder ().model (model ).build ())
@@ -499,7 +499,7 @@ void testToolChoiceAny() {
499499 List <Message > messages = new ArrayList <>(List .of (userMessage ));
500500
501501 var promptOptions = AnthropicChatOptions .builder ()
502- .model (AnthropicApi .ChatModel .CLAUDE_3_5_SONNET .getName ())
502+ .model (AnthropicApi .ChatModel .CLAUDE_3_7_SONNET .getName ())
503503 .toolChoice (new AnthropicApi .ToolChoiceAny ())
504504 .internalToolExecutionEnabled (false )
505505 .toolCallbacks (FunctionToolCallback .builder ("getCurrentWeather" , new MockWeatherService ())
@@ -528,7 +528,7 @@ void testToolChoiceTool() {
528528 List <Message > messages = new ArrayList <>(List .of (userMessage ));
529529
530530 var promptOptions = AnthropicChatOptions .builder ()
531- .model (AnthropicApi .ChatModel .CLAUDE_3_5_SONNET .getName ())
531+ .model (AnthropicApi .ChatModel .CLAUDE_3_7_SONNET .getName ())
532532 .toolChoice (new AnthropicApi .ToolChoiceTool ("getFunResponse" , true ))
533533 .internalToolExecutionEnabled (false )
534534 .toolCallbacks (FunctionToolCallback .builder ("getCurrentWeather" , new MockWeatherService ())
@@ -566,7 +566,7 @@ void testToolChoiceNone() {
566566 List <Message > messages = new ArrayList <>(List .of (userMessage ));
567567
568568 var promptOptions = AnthropicChatOptions .builder ()
569- .model (AnthropicApi .ChatModel .CLAUDE_3_5_SONNET .getName ())
569+ .model (AnthropicApi .ChatModel .CLAUDE_3_7_SONNET .getName ())
570570 .toolChoice (new AnthropicApi .ToolChoiceNone ())
571571 .toolCallbacks (FunctionToolCallback .builder ("getCurrentWeather" , new MockWeatherService ())
572572 .description (
0 commit comments