This is an automated email from the ASF dual-hosted git repository.

wenjin272 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-agents.git


The following commit(s) were added to refs/heads/main by this push:
     new 97ec93d3 [integrations][anthropic] Update the stale default model to 
claude-sonnet-4-6 (#1039)
97ec93d3 is described below

commit 97ec93d35d7517ee3e3791ca8d6628f76be462df
Author: Weiqing Yang <[email protected]>
AuthorDate: Mon Aug 31 02:01:24 2026 -0700

    [integrations][anthropic] Update the stale default model to 
claude-sonnet-4-6 (#1039)
    
    Generated-by: Claude Code 2.1.251 (Claude Opus 5)
    
    ---------
    
    Co-authored-by: weiqingy <[email protected]>
---
 docs/content/docs/development/chat_models.md              | 15 +++++++--------
 .../integration/test/ChatModelIntegrationAgent.java       |  2 +-
 .../chatmodels/anthropic/AnthropicChatModelSetup.java     |  6 +++---
 .../anthropic/AnthropicChatModelConnectionTest.java       |  5 ++++-
 .../chatmodels/anthropic/AnthropicChatModelSetupTest.java |  2 +-
 .../chat_models/anthropic/anthropic_chat_model.py         |  4 ++--
 .../anthropic/tests/test_anthropic_chat_model.py          |  3 +--
 .../anthropic/tests/test_anthropic_response_parsing.py    |  3 ++-
 8 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/docs/content/docs/development/chat_models.md 
b/docs/content/docs/development/chat_models.md
index 9152136f..d9a21f96 100644
--- a/docs/content/docs/development/chat_models.md
+++ b/docs/content/docs/development/chat_models.md
@@ -287,7 +287,7 @@ Anthropic provides cloud-based chat models featuring the 
Claude family, known fo
 | Parameter | Type | Default | Description |
 |-----------|------|---------|-------------|
 | `connection` | str | Required | Reference to connection method name |
-| `model` | str | `"claude-sonnet-4-20250514"` | Name of the chat model to use 
|
+| `model` | str | `"claude-sonnet-4-6"` | Name of the chat model to use |
 | `prompt` | Prompt \| str | None | Prompt template or reference to prompt 
resource |
 | `tools` | List[str] | None | List of tool names available to the model |
 | `max_tokens` | int | `1024` | Maximum number of tokens to generate |
@@ -302,7 +302,7 @@ Anthropic provides cloud-based chat models featuring the 
Claude family, known fo
 | Parameter | Type | Default | Description |
 |-----------|------|---------|-------------|
 | `connection` | String | Required | Reference to connection method name |
-| `model` | String | `"claude-sonnet-4-20250514"` | Name of the chat model to 
use |
+| `model` | String | `"claude-sonnet-4-6"` | Name of the chat model to use |
 | `prompt` | Prompt \| String | None | Prompt template or reference to prompt 
resource |
 | `tools` | List<String> | None | List of tool names available to the model |
 | `max_tokens` | long | `1024` | Maximum number of tokens to generate |
@@ -339,7 +339,7 @@ class MyAgent(Agent):
         return ResourceDescriptor(
             clazz=ResourceName.ChatModel.ANTHROPIC_SETUP,
             connection="anthropic_connection",
-            model="claude-sonnet-4-20250514",
+            model="claude-sonnet-4-6",
             max_tokens=2048,
             temperature=0.7
         )
@@ -364,7 +364,7 @@ public class MyAgent extends Agent {
     public static ResourceDescriptor anthropicChatModel() {
         return 
ResourceDescriptor.Builder.newBuilder(ResourceName.ChatModel.ANTHROPIC_SETUP)
                 .addInitialArgument("connection", "anthropicConnection")
-                .addInitialArgument("model", "claude-sonnet-4-20250514")
+                .addInitialArgument("model", "claude-sonnet-4-6")
                 .addInitialArgument("temperature", 0.7d)
                 .addInitialArgument("max_tokens", 2048)
                 .build();
@@ -382,10 +382,9 @@ public class MyAgent extends Agent {
 Visit the [Anthropic Models 
documentation](https://docs.anthropic.com/en/docs/about-claude/models) for the 
complete and up-to-date list of available chat models.
 
 Some popular options include:
-- **Claude Sonnet 4.5** (claude-sonnet-4-5-20250929)
-- **Claude Sonnet 4** (claude-sonnet-4-20250514)
-- **Claude Sonnet 3.7** (claude-3-7-sonnet-20250219)
-- **Claude Opus 4.1** (claude-opus-4-1-20250805)
+- **Claude Opus 4.6** (claude-opus-4-6)
+- **Claude Sonnet 4.6** (claude-sonnet-4-6)
+- **Claude Haiku 4.5** (claude-haiku-4-5)
 
 {{< hint warning >}}
 Model availability and specifications may change. Always check the official 
Anthropic documentation for the latest information before implementing in 
production.
diff --git 
a/e2e-test/flink-agents-end-to-end-tests-integration/src/test/java/org/apache/flink/agents/integration/test/ChatModelIntegrationAgent.java
 
b/e2e-test/flink-agents-end-to-end-tests-integration/src/test/java/org/apache/flink/agents/integration/test/ChatModelIntegrationAgent.java
index 2ad6bacf..8dcaf9ef 100644
--- 
a/e2e-test/flink-agents-end-to-end-tests-integration/src/test/java/org/apache/flink/agents/integration/test/ChatModelIntegrationAgent.java
+++ 
b/e2e-test/flink-agents-end-to-end-tests-integration/src/test/java/org/apache/flink/agents/integration/test/ChatModelIntegrationAgent.java
@@ -123,7 +123,7 @@ public class ChatModelIntegrationAgent extends Agent {
         } else if (provider.equals("ANTHROPIC")) {
             return 
ResourceDescriptor.Builder.newBuilder(ResourceName.ChatModel.ANTHROPIC_SETUP)
                     .addInitialArgument("connection", "chatModelConnection")
-                    .addInitialArgument("model", "claude-sonnet-4-20250514")
+                    .addInitialArgument("model", "claude-sonnet-4-6")
                     .addInitialArgument(
                             "tools",
                             List.of("calculateBMI", "convertTemperature", 
"createRandomNumber"))
diff --git 
a/integrations/chat-models/anthropic/src/main/java/org/apache/flink/agents/integrations/chatmodels/anthropic/AnthropicChatModelSetup.java
 
b/integrations/chat-models/anthropic/src/main/java/org/apache/flink/agents/integrations/chatmodels/anthropic/AnthropicChatModelSetup.java
index b7636f8f..d58befb6 100644
--- 
a/integrations/chat-models/anthropic/src/main/java/org/apache/flink/agents/integrations/chatmodels/anthropic/AnthropicChatModelSetup.java
+++ 
b/integrations/chat-models/anthropic/src/main/java/org/apache/flink/agents/integrations/chatmodels/anthropic/AnthropicChatModelSetup.java
@@ -37,7 +37,7 @@ import java.util.Optional;
  *
  * <ul>
  *   <li><b>connection</b> (required): Name of the 
AnthropicChatModelConnection resource
- *   <li><b>model</b> (optional): Model name (default: 
claude-sonnet-4-20250514)
+ *   <li><b>model</b> (optional): Model name (default: claude-sonnet-4-6)
  *   <li><b>temperature</b> (optional): Sampling temperature 0.0-1.0 (default: 
0.1)
  *   <li><b>max_tokens</b> (optional): Maximum tokens in response (default: 
1024)
  *   <li><b>json_prefill</b> (optional): When true, prefills assistant 
response with "{" to enforce
@@ -60,7 +60,7 @@ import java.util.Optional;
  *   public static ResourceDesc anthropic() {
  *     return 
ResourceDescriptor.Builder.newBuilder(AnthropicChatModelSetup.class.getName())
  *             .addInitialArgument("connection", "myAnthropicConnection")
- *             .addInitialArgument("model", "claude-sonnet-4-20250514")
+ *             .addInitialArgument("model", "claude-sonnet-4-6")
  *             .addInitialArgument("temperature", 0.3d)
  *             .addInitialArgument("max_tokens", 2048)
  *             .addInitialArgument("strict_tools", true)
@@ -75,7 +75,7 @@ import java.util.Optional;
  */
 public class AnthropicChatModelSetup extends BaseChatModelSetup {
 
-    private static final String DEFAULT_MODEL = "claude-sonnet-4-20250514";
+    private static final String DEFAULT_MODEL = "claude-sonnet-4-6";
     private static final double DEFAULT_TEMPERATURE = 0.1d;
     private static final long DEFAULT_MAX_TOKENS = 1024L;
     private static final boolean DEFAULT_JSON_PREFILL = false;
diff --git 
a/integrations/chat-models/anthropic/src/test/java/org/apache/flink/agents/integrations/chatmodels/anthropic/AnthropicChatModelConnectionTest.java
 
b/integrations/chat-models/anthropic/src/test/java/org/apache/flink/agents/integrations/chatmodels/anthropic/AnthropicChatModelConnectionTest.java
index 003052da..bc63533d 100644
--- 
a/integrations/chat-models/anthropic/src/test/java/org/apache/flink/agents/integrations/chatmodels/anthropic/AnthropicChatModelConnectionTest.java
+++ 
b/integrations/chat-models/anthropic/src/test/java/org/apache/flink/agents/integrations/chatmodels/anthropic/AnthropicChatModelConnectionTest.java
@@ -216,7 +216,10 @@ class AnthropicChatModelConnectionTest {
      */
     private static final String CAPABLE_MODEL = "claude-sonnet-4-5";
 
-    /** The connection's own default model, which predates the 
structured-output cutoff. */
+    /**
+     * A model the provider does not document native structured-output support 
for, predating the
+     * cutoff.
+     */
     private static final String INCAPABLE_MODEL = "claude-sonnet-4-20250514";
 
     /**
diff --git 
a/integrations/chat-models/anthropic/src/test/java/org/apache/flink/agents/integrations/chatmodels/anthropic/AnthropicChatModelSetupTest.java
 
b/integrations/chat-models/anthropic/src/test/java/org/apache/flink/agents/integrations/chatmodels/anthropic/AnthropicChatModelSetupTest.java
index 8cd126ab..f5e6ddf6 100644
--- 
a/integrations/chat-models/anthropic/src/test/java/org/apache/flink/agents/integrations/chatmodels/anthropic/AnthropicChatModelSetupTest.java
+++ 
b/integrations/chat-models/anthropic/src/test/java/org/apache/flink/agents/integrations/chatmodels/anthropic/AnthropicChatModelSetupTest.java
@@ -43,7 +43,7 @@ class AnthropicChatModelSetupTest {
         Map<String, Object> params =
                 new AnthropicChatModelSetup(base().build(), 
NOOP).getParameters();
 
-        assertThat(params).containsEntry("model", "claude-sonnet-4-20250514");
+        assertThat(params).containsEntry("model", "claude-sonnet-4-6");
         assertThat(params).containsEntry("temperature", 0.1d);
         assertThat(params).containsEntry("max_tokens", 1024L);
         assertThat(params).containsEntry("strict_tools", false);
diff --git 
a/python/flink_agents/integrations/chat_models/anthropic/anthropic_chat_model.py
 
b/python/flink_agents/integrations/chat_models/anthropic/anthropic_chat_model.py
index 563c3c21..dde0a894 100644
--- 
a/python/flink_agents/integrations/chat_models/anthropic/anthropic_chat_model.py
+++ 
b/python/flink_agents/integrations/chat_models/anthropic/anthropic_chat_model.py
@@ -467,7 +467,7 @@ class AnthropicChatModelConnection(BaseChatModelConnection):
                 self._client = None
 
 
-DEFAULT_ANTHROPIC_MODEL = "claude-sonnet-4-20250514"
+DEFAULT_ANTHROPIC_MODEL = "claude-sonnet-4-6"
 DEFAULT_MAX_TOKENS = 1024
 DEFAULT_TEMPERATURE = 0.1
 DEFAULT_JSON_PREFILL = False
@@ -481,7 +481,7 @@ class AnthropicChatModelSetup(BaseChatModelSetup):
     connection : str
         Name of the referenced connection. (Inherited from BaseChatModelSetup)
     model : str
-        Specifies the Anthropic model to use. Defaults to 
claude-sonnet-4-20250514
+        Specifies the Anthropic model to use. Defaults to 
``DEFAULT_ANTHROPIC_MODEL``
         when omitted via ``__init__``. (Inherited from BaseChatModelSetup)
     prompt : Optional[Union[Prompt, str]
         Prompt template or string for the model. (Inherited from 
BaseChatModelSetup)
diff --git 
a/python/flink_agents/integrations/chat_models/anthropic/tests/test_anthropic_chat_model.py
 
b/python/flink_agents/integrations/chat_models/anthropic/tests/test_anthropic_chat_model.py
index c6a6e8f5..fc0fe066 100644
--- 
a/python/flink_agents/integrations/chat_models/anthropic/tests/test_anthropic_chat_model.py
+++ 
b/python/flink_agents/integrations/chat_models/anthropic/tests/test_anthropic_chat_model.py
@@ -25,7 +25,6 @@ from flink_agents.api.resource import Resource, ResourceType
 from flink_agents.api.resource_context import ResourceContext
 from flink_agents.api.tools.tool import Tool
 from flink_agents.integrations.chat_models.anthropic.anthropic_chat_model 
import (
-    DEFAULT_ANTHROPIC_MODEL,
     AnthropicChatModelConnection,
     AnthropicChatModelSetup,
 )
@@ -116,4 +115,4 @@ def test_model_field_roundtrip() -> None:
 def test_default_model_when_omitted() -> None:
     """Verify per-integration default applies when `model` is omitted from 
__init__."""
     setup = AnthropicChatModelSetup(connection="conn")
-    assert setup.model == DEFAULT_ANTHROPIC_MODEL
+    assert setup.model == "claude-sonnet-4-6"
diff --git 
a/python/flink_agents/integrations/chat_models/anthropic/tests/test_anthropic_response_parsing.py
 
b/python/flink_agents/integrations/chat_models/anthropic/tests/test_anthropic_response_parsing.py
index 22c98b3d..0577a32f 100644
--- 
a/python/flink_agents/integrations/chat_models/anthropic/tests/test_anthropic_response_parsing.py
+++ 
b/python/flink_agents/integrations/chat_models/anthropic/tests/test_anthropic_response_parsing.py
@@ -200,7 +200,8 @@ class _Labelled(BaseModel):
 # even with the output_config suppression removed.
 _CAPABLE_MODEL = "claude-sonnet-4-5"
 
-# The default model this integration ships with, which predates the cutoff.
+# A model the provider does not document native structured-output support for,
+# predating the cutoff.
 _INCAPABLE_MODEL = "claude-sonnet-4-20250514"
 
 # The models the provider documents native structured-output support for, in 
the order

Reply via email to