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 e204cb294 [api][integrations] Use DashScope naming consistently (#1201)
e204cb294 is described below

commit e204cb294bdf5d2ae46937bae5bca6d7a48e582c
Author: Wenjin Xie <[email protected]>
AuthorDate: Wed Oct 7 20:15:54 2026 +0800

    [api][integrations] Use DashScope naming consistently (#1201)
    
    Generated-by: Codex 0.153.4 (GPT-6)
    
    Co-authored-by: Codex <[email protected]>
---
 .../flink/agents/api/resource/ResourceName.java    | 20 ++---
 .../org/apache/flink/agents/api/yaml/Aliases.java  |  8 +-
 docs/content/docs/development/chat_models.md       | 28 +++----
 docs/content/docs/development/embedding_models.md  | 28 +++----
 docs/content/docs/development/yaml.md              |  4 +-
 docs/content/docs/faq/faq.md                       |  4 +-
 .../openai/OpenAIEmbeddingModelConnection.java     |  2 +-
 python/flink_agents/api/resource.py                | 12 +--
 python/flink_agents/api/yaml/aliases.py            |  8 +-
 .../chat_model_integration_agent.py                | 22 +++---
 .../chat_model_multi_provider_remote_test.py       | 10 +--
 ...ongyi_chat_model.py => dashscope_chat_model.py} | 36 ++++-----
 ..._chat_model.py => test_dashscope_chat_model.py} | 42 +++++-----
 ... => test_dashscope_native_structured_output.py} | 14 ++--
 .../tests/test_output_schema_param_declared.py     |  7 +-
 ...dding_model.py => dashscope_embedding_model.py} | 14 ++--
 .../embedding_models/openai_embedding_model.py     |  2 +-
 ..._model.py => test_dashscope_embedding_model.py} | 90 +++++++++++-----------
 18 files changed, 177 insertions(+), 174 deletions(-)

diff --git 
a/api/src/main/java/org/apache/flink/agents/api/resource/ResourceName.java 
b/api/src/main/java/org/apache/flink/agents/api/resource/ResourceName.java
index 5ff585871..8d75af813 100644
--- a/api/src/main/java/org/apache/flink/agents/api/resource/ResourceName.java
+++ b/api/src/main/java/org/apache/flink/agents/api/resource/ResourceName.java
@@ -128,11 +128,11 @@ public final class ResourceName {
             public static final String OPENAI_COMPLETIONS_SETUP =
                     
"flink_agents.integrations.chat_models.openai.openai_chat_model.OpenAIChatModelSetup";
 
-            // Tongyi
-            public static final String TONGYI_CONNECTION =
-                    
"flink_agents.integrations.chat_models.tongyi_chat_model.TongyiChatModelConnection";
-            public static final String TONGYI_SETUP =
-                    
"flink_agents.integrations.chat_models.tongyi_chat_model.TongyiChatModelSetup";
+            // DashScope
+            public static final String DASHSCOPE_CONNECTION =
+                    
"flink_agents.integrations.chat_models.dashscope_chat_model.DashScopeChatModelConnection";
+            public static final String DASHSCOPE_SETUP =
+                    
"flink_agents.integrations.chat_models.dashscope_chat_model.DashScopeChatModelSetup";
 
             // vLLM (OpenAI-compatible)
             public static final String VLLM_CONNECTION =
@@ -187,11 +187,11 @@ public final class ResourceName {
             public static final String OPENAI_SETUP =
                     
"flink_agents.integrations.embedding_models.openai_embedding_model.OpenAIEmbeddingModelSetup";
 
-            // Tongyi
-            public static final String TONGYI_CONNECTION =
-                    
"flink_agents.integrations.embedding_models.tongyi_embedding_model.TongyiEmbeddingModelConnection";
-            public static final String TONGYI_SETUP =
-                    
"flink_agents.integrations.embedding_models.tongyi_embedding_model.TongyiEmbeddingModelSetup";
+            // DashScope
+            public static final String DASHSCOPE_CONNECTION =
+                    
"flink_agents.integrations.embedding_models.dashscope_embedding_model.DashScopeEmbeddingModelConnection";
+            public static final String DASHSCOPE_SETUP =
+                    
"flink_agents.integrations.embedding_models.dashscope_embedding_model.DashScopeEmbeddingModelSetup";
 
             private Python() {}
         }
diff --git a/api/src/main/java/org/apache/flink/agents/api/yaml/Aliases.java 
b/api/src/main/java/org/apache/flink/agents/api/yaml/Aliases.java
index ff14a798a..8b54cfc4e 100644
--- a/api/src/main/java/org/apache/flink/agents/api/yaml/Aliases.java
+++ b/api/src/main/java/org/apache/flink/agents/api/yaml/Aliases.java
@@ -88,7 +88,7 @@ public final class Aliases {
         chatConnPython.put("ollama", 
ResourceName.ChatModel.Python.OLLAMA_CONNECTION);
         chatConnPython.put("openai", 
ResourceName.ChatModel.Python.OPENAI_COMPLETIONS_CONNECTION);
         chatConnPython.put("anthropic", 
ResourceName.ChatModel.Python.ANTHROPIC_CONNECTION);
-        chatConnPython.put("tongyi", 
ResourceName.ChatModel.Python.TONGYI_CONNECTION);
+        chatConnPython.put("dashscope", 
ResourceName.ChatModel.Python.DASHSCOPE_CONNECTION);
         chatConnPython.put("azure_openai", 
ResourceName.ChatModel.Python.AZURE_OPENAI_CONNECTION);
         chatConnPython.put("vllm", 
ResourceName.ChatModel.Python.VLLM_CONNECTION);
         chatConnPython.put("watsonx", 
ResourceName.ChatModel.Python.WATSONX_CONNECTION);
@@ -109,7 +109,7 @@ public final class Aliases {
         chatPython.put("ollama", ResourceName.ChatModel.Python.OLLAMA_SETUP);
         chatPython.put("openai", 
ResourceName.ChatModel.Python.OPENAI_COMPLETIONS_SETUP);
         chatPython.put("anthropic", 
ResourceName.ChatModel.Python.ANTHROPIC_SETUP);
-        chatPython.put("tongyi", ResourceName.ChatModel.Python.TONGYI_SETUP);
+        chatPython.put("dashscope", 
ResourceName.ChatModel.Python.DASHSCOPE_SETUP);
         chatPython.put("azure_openai", 
ResourceName.ChatModel.Python.AZURE_OPENAI_SETUP);
         chatPython.put("vllm", ResourceName.ChatModel.Python.VLLM_SETUP);
         chatPython.put("watsonx", ResourceName.ChatModel.Python.WATSONX_SETUP);
@@ -123,7 +123,7 @@ public final class Aliases {
         Map<String, String> embConnPython = new HashMap<>();
         embConnPython.put("ollama", 
ResourceName.EmbeddingModel.Python.OLLAMA_CONNECTION);
         embConnPython.put("openai", 
ResourceName.EmbeddingModel.Python.OPENAI_CONNECTION);
-        embConnPython.put("tongyi", 
ResourceName.EmbeddingModel.Python.TONGYI_CONNECTION);
+        embConnPython.put("dashscope", 
ResourceName.EmbeddingModel.Python.DASHSCOPE_CONNECTION);
         ca.put(
                 ResourceType.EMBEDDING_MODEL_CONNECTION,
                 buildLangBuckets(embConnJava, embConnPython));
@@ -136,7 +136,7 @@ public final class Aliases {
         Map<String, String> embPython = new HashMap<>();
         embPython.put("ollama", 
ResourceName.EmbeddingModel.Python.OLLAMA_SETUP);
         embPython.put("openai", 
ResourceName.EmbeddingModel.Python.OPENAI_SETUP);
-        embPython.put("tongyi", 
ResourceName.EmbeddingModel.Python.TONGYI_SETUP);
+        embPython.put("dashscope", 
ResourceName.EmbeddingModel.Python.DASHSCOPE_SETUP);
         ca.put(ResourceType.EMBEDDING_MODEL, buildLangBuckets(embJava, 
embPython));
 
         // VECTOR_STORE
diff --git a/docs/content/docs/development/chat_models.md 
b/docs/content/docs/development/chat_models.md
index 5329c2716..6b144d7b8 100644
--- a/docs/content/docs/development/chat_models.md
+++ b/docs/content/docs/development/chat_models.md
@@ -1119,26 +1119,26 @@ Some popular options include:
 Model availability and specifications may change. Always check the official 
OpenAI documentation for the latest information before implementing in 
production.
 {{< /hint >}}
 
-### Tongyi (DashScope)
+### Alibaba Cloud Model Studio (DashScope)
 
-Tongyi provides cloud-based chat models from Alibaba Cloud, offering powerful 
Chinese and English language capabilities.
+This integration connects to Alibaba Cloud Model Studio (Bailian) through the 
DashScope SDK to access chat models.
 
 {{< hint info >}}
-Tongyi is only supported in Python currently. To use Tongyi from Java agents, 
see [Using Cross-Language Providers](#using-cross-language-providers).
+The DashScope integration is currently supported in the Python API only. To 
use it from Java agents, see [Using Cross-Language 
Providers](#using-cross-language-providers).
 {{< /hint >}}
 
 #### Prerequisites
 
-1. Get an API key from [Alibaba Cloud DashScope](https://dashscope.aliyun.com/)
+1. Get an API key from [Alibaba Cloud Model 
Studio](https://dashscope.aliyun.com/)
 
-#### TongyiChatModelConnection Parameters
+#### DashScopeChatModelConnection Parameters
 
 | Parameter | Type | Default | Description |
 |-----------|------|---------|-------------|
 | `api_key` | str | `$DASHSCOPE_API_KEY` | DashScope API key for 
authentication |
 | `request_timeout` | float | `60.0` | HTTP request timeout in seconds |
 
-#### TongyiChatModelSetup Parameters
+#### DashScopeChatModelSetup Parameters
 
 | Parameter | Type | Default | Description |
 |-----------|------|---------|-------------|
@@ -1157,19 +1157,19 @@ class MyAgent(Agent):
 
     @chat_model_connection
     @staticmethod
-    def tongyi_connection() -> ResourceDescriptor:
+    def dashscope_connection() -> ResourceDescriptor:
         return ResourceDescriptor(
-            clazz=ResourceName.ChatModel.TONGYI_CONNECTION,
+            clazz=ResourceName.ChatModel.DASHSCOPE_CONNECTION,
             api_key="your-api-key-here",  # Or set DASHSCOPE_API_KEY env var
             request_timeout=60.0
         )
 
     @chat_model_setup
     @staticmethod
-    def tongyi_chat_model() -> ResourceDescriptor:
+    def dashscope_chat_model() -> ResourceDescriptor:
         return ResourceDescriptor(
-            clazz=ResourceName.ChatModel.TONGYI_SETUP,
-            connection="tongyi_connection",
+            clazz=ResourceName.ChatModel.DASHSCOPE_SETUP,
+            connection="dashscope_connection",
             model="qwen-plus",
             temperature=0.7,
             extract_reasoning=True
@@ -1180,7 +1180,7 @@ class MyAgent(Agent):
 
 #### Available Models
 
-Visit the [DashScope Models 
documentation](https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction)
 for the complete and up-to-date list of available chat models.
+Visit the [Alibaba Cloud Model Studio models 
documentation](https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction)
 for the complete and up-to-date list of available chat models.
 
 Some popular options include:
 - **qwen-plus**
@@ -1189,7 +1189,7 @@ Some popular options include:
 - **qwen-long**
 
 {{< hint warning >}}
-Model availability and specifications may change. Always check the official 
DashScope documentation for the latest information before implementing in 
production.
+Model availability and specifications may change. Always check the official 
Alibaba Cloud Model Studio documentation for the latest information before 
implementing in production.
 {{< /hint >}}
 
 ### vLLM
@@ -1466,7 +1466,7 @@ Model availability and specifications may change. Always 
check the official IBM
 
 ## Using Cross-Language Providers
 
-Flink Agents supports cross-language chat model integration, allowing you to 
use chat models implemented in one language (Java or Python) from agents 
written in the other language. This is particularly useful when a chat model 
provider is only available in one language (e.g., Tongyi is currently 
Python-only).
+Flink Agents supports cross-language chat model integration, allowing you to 
use chat models implemented in one language (Java or Python) from agents 
written in the other language. This is particularly useful when a chat model 
provider is only available in one language (e.g., the DashScope integration for 
Alibaba Cloud Model Studio is currently Python-only).
 
 {{< hint warning >}}
 **Limitations:**
diff --git a/docs/content/docs/development/embedding_models.md 
b/docs/content/docs/development/embedding_models.md
index 16ccf0377..c26c1ee93 100644
--- a/docs/content/docs/development/embedding_models.md
+++ b/docs/content/docs/development/embedding_models.md
@@ -566,17 +566,17 @@ Current popular models include:
 Model availability and specifications may change. Always check the official 
OpenAI documentation for the latest information before implementing in 
production.
 {{< /hint >}}
 
-### Tongyi (DashScope)
+### Alibaba Cloud Model Studio (DashScope)
 
-Tongyi provides cloud-based embedding models from Alibaba Cloud, with strong 
support for Chinese and English text.
+This integration connects to Alibaba Cloud Model Studio (Bailian) through the 
DashScope SDK to access embedding models.
 
 {{< hint info >}}
-Tongyi embedding models are currently supported in the Python API only. To use 
Tongyi from Java agents, see [Using Cross-Language 
Providers](#using-cross-language-providers).
+The DashScope integration is currently supported in the Python API only. To 
use it from Java agents, see [Using Cross-Language 
Providers](#using-cross-language-providers).
 {{< /hint >}}
 
 #### Prerequisites
 
-1. Get an API key from [Alibaba Cloud 
DashScope](https://dashscope.console.aliyun.com/)
+1. Get an API key from [Alibaba Cloud Model 
Studio](https://dashscope.console.aliyun.com/)
 
 #### Usage Example
 
@@ -585,32 +585,32 @@ class MyAgent(Agent):
 
     @embedding_model_connection
     @staticmethod
-    def tongyi_connection() -> ResourceDescriptor:
+    def dashscope_connection() -> ResourceDescriptor:
         return ResourceDescriptor(
-            clazz=ResourceName.EmbeddingModel.TONGYI_CONNECTION,
+            clazz=ResourceName.EmbeddingModel.DASHSCOPE_CONNECTION,
             api_key="your-api-key-here",  # Or set DASHSCOPE_API_KEY env var
             request_timeout=30.0
         )
 
     @embedding_model_setup
     @staticmethod
-    def tongyi_embedding() -> ResourceDescriptor:
+    def dashscope_embedding() -> ResourceDescriptor:
         return ResourceDescriptor(
-            clazz=ResourceName.EmbeddingModel.TONGYI_SETUP,
-            connection="tongyi_connection",
+            clazz=ResourceName.EmbeddingModel.DASHSCOPE_SETUP,
+            connection="dashscope_connection",
             model="text-embedding-v4",
             text_type="query"
         )
 ```
 
-#### TongyiEmbeddingModelConnection Parameters
+#### DashScopeEmbeddingModelConnection Parameters
 
 | Parameter | Type | Default | Description |
 |-----------|------|---------|-------------|
 | `api_key` | str | `$DASHSCOPE_API_KEY` | DashScope API key for 
authentication |
 | `request_timeout` | float | `30.0` | HTTP request timeout in seconds |
 
-#### TongyiEmbeddingModelSetup Parameters
+#### DashScopeEmbeddingModelSetup Parameters
 
 | Parameter | Type | Default | Description |
 |-----------|------|---------|-------------|
@@ -622,7 +622,7 @@ class MyAgent(Agent):
 
 #### Available Models
 
-Visit the [DashScope Embedding Models 
documentation](https://help.aliyun.com/zh/dashscope/developer-reference/text-embedding-api-details)
 for the complete and up-to-date list of available embedding models.
+Visit the [Alibaba Cloud Model Studio embedding models 
documentation](https://help.aliyun.com/zh/dashscope/developer-reference/text-embedding-api-details)
 for the complete and up-to-date list of available embedding models.
 
 Some popular options include:
 - **text-embedding-v4** (default, recommended)
@@ -631,12 +631,12 @@ Some popular options include:
 - **text-embedding-v1**
 
 {{< hint warning >}}
-Model availability and specifications may change. Always check the official 
DashScope documentation for the latest information before implementing in 
production.
+Model availability and specifications may change. Always check the official 
Alibaba Cloud Model Studio documentation for the latest information before 
implementing in production.
 {{< /hint >}}
 
 ## Using Cross-Language Providers
 
-Flink Agents supports cross-language embedding model integration, allowing you 
to use embedding models implemented in one language (Java or Python) from 
agents written in the other language. This is particularly useful when an 
embedding model provider is only available in one language (e.g., Tongyi 
embedding is currently Python-only).
+Flink Agents supports cross-language embedding model integration, allowing you 
to use embedding models implemented in one language (Java or Python) from 
agents written in the other language. This is particularly useful when an 
embedding model provider is only available in one language (e.g., the DashScope 
embedding integration for Alibaba Cloud Model Studio is currently Python-only).
 
 {{< hint warning >}}
 **Limitations:**
diff --git a/docs/content/docs/development/yaml.md 
b/docs/content/docs/development/yaml.md
index ddb766d5c..81c275149 100644
--- a/docs/content/docs/development/yaml.md
+++ b/docs/content/docs/development/yaml.md
@@ -576,7 +576,7 @@ Common chat-model aliases:
 | `gemini`             | —                           | Gemini (Java)           
    |
 | `azure_openai`       | Azure OpenAI (Python)       | Azure OpenAI (Java)     
    |
 | `bedrock`            | —                           | Bedrock (Java)          
    |
-| `tongyi`             | Tongyi (Python)             | —                       
    |
+| `dashscope`          | Alibaba Cloud Model Studio (DashScope, Python) | —    
                       |
 | `vllm`               | vLLM (Python)               | vLLM (Java)             
    |
 | `watsonx`            | IBM watsonx.ai (Python)     | IBM watsonx.ai (Java)   
    |
 
@@ -586,7 +586,7 @@ Embedding-model aliases (apply to both 
`embedding_model_connections` and `embedd
 | --------- | -------------- | -------------- |
 | `ollama`  | Ollama         | Ollama         |
 | `openai`  | OpenAI         | OpenAI (Java)  |
-| `tongyi`  | Tongyi         | —              |
+| `dashscope` | Alibaba Cloud Model Studio (DashScope) | —              |
 | `bedrock` | —              | Bedrock (Java) |
 
 Vector-store aliases:
diff --git a/docs/content/docs/faq/faq.md b/docs/content/docs/faq/faq.md
index b26367de4..c12031dbd 100644
--- a/docs/content/docs/faq/faq.md
+++ b/docs/content/docs/faq/faq.md
@@ -103,7 +103,7 @@ Flink Agents provides built-in integrations for many 
ecosystem providers. Some i
 | [Gemini]({{< ref "docs/development/chat_models#gemini" >}}) | ❌ | ✅ |
 | [Ollama]({{< ref "docs/development/chat_models#ollama" >}}) | ✅ | ✅ |
 | [OpenAI]({{< ref "docs/development/chat_models#openai" >}}) | ✅ | ✅ |
-| [Tongyi (DashScope)]({{< ref "docs/development/chat_models#tongyi-dashscope" 
>}}) | ✅ | ❌ |
+| [Alibaba Cloud Model Studio (DashScope)]({{< ref 
"docs/development/chat_models#alibaba-cloud-model-studio-dashscope" >}}) | ✅ | 
❌ |
 | [vLLM]({{< ref "docs/development/chat_models#vllm" >}}) | ✅ | ✅ |
 | [Watsonx (IBM watsonx.ai)]({{< ref 
"docs/development/chat_models#watsonx-ibm-watsonxai" >}}) | ✅ | ✅ |
 
@@ -114,7 +114,7 @@ Flink Agents provides built-in integrations for many 
ecosystem providers. Some i
 | [Amazon Bedrock]({{< ref "docs/development/embedding_models#amazon-bedrock" 
>}}) | ❌ | ✅ |
 | [Ollama]({{< ref "docs/development/embedding_models#ollama" >}}) | ✅ | ✅ |
 | [OpenAI]({{< ref "docs/development/embedding_models#openai" >}}) | ✅ | ✅ |
-| [Tongyi (DashScope)]({{< ref 
"docs/development/embedding_models#tongyi-dashscope" >}}) | ✅ | ❌ |
+| [Alibaba Cloud Model Studio (DashScope)]({{< ref 
"docs/development/embedding_models#alibaba-cloud-model-studio-dashscope" >}}) | 
✅ | ❌ |
 
 **Vector Stores**
 
diff --git 
a/integrations/embedding-models/openai/src/main/java/org/apache/flink/agents/integrations/embeddingmodels/openai/OpenAIEmbeddingModelConnection.java
 
b/integrations/embedding-models/openai/src/main/java/org/apache/flink/agents/integrations/embeddingmodels/openai/OpenAIEmbeddingModelConnection.java
index c58aa9529..b56a42762 100644
--- 
a/integrations/embedding-models/openai/src/main/java/org/apache/flink/agents/integrations/embeddingmodels/openai/OpenAIEmbeddingModelConnection.java
+++ 
b/integrations/embedding-models/openai/src/main/java/org/apache/flink/agents/integrations/embeddingmodels/openai/OpenAIEmbeddingModelConnection.java
@@ -509,7 +509,7 @@ public class OpenAIEmbeddingModelConnection extends 
BaseEmbeddingModelConnection
 
     /**
      * Tolerates servers that omit {@code usage} or some of its fields. 
Embedding requests have no
-     * completion tokens, so a missing side of the usage equals the other side 
(as the Tongyi
+     * completion tokens, so a missing side of the usage equals the other side 
(as the DashScope
      * connection does) rather than being reported as zero.
      */
     private static EmbeddingTokenUsage 
extractTokenUsage(CreateEmbeddingResponse response) {
diff --git a/python/flink_agents/api/resource.py 
b/python/flink_agents/api/resource.py
index acc4af2a5..3f8dcc4e5 100644
--- a/python/flink_agents/api/resource.py
+++ b/python/flink_agents/api/resource.py
@@ -329,9 +329,9 @@ class ResourceName:
         OPENAI_COMPLETIONS_CONNECTION = 
"flink_agents.integrations.chat_models.openai.openai_chat_model.OpenAIChatModelConnection"
         OPENAI_COMPLETIONS_SETUP = 
"flink_agents.integrations.chat_models.openai.openai_chat_model.OpenAIChatModelSetup"
 
-        # Tongyi
-        TONGYI_CONNECTION = 
"flink_agents.integrations.chat_models.tongyi_chat_model.TongyiChatModelConnection"
-        TONGYI_SETUP = 
"flink_agents.integrations.chat_models.tongyi_chat_model.TongyiChatModelSetup"
+        # DashScope
+        DASHSCOPE_CONNECTION = 
"flink_agents.integrations.chat_models.dashscope_chat_model.DashScopeChatModelConnection"
+        DASHSCOPE_SETUP = 
"flink_agents.integrations.chat_models.dashscope_chat_model.DashScopeChatModelSetup"
 
         # vLLM (OpenAI-compatible)
         VLLM_CONNECTION = 
"flink_agents.integrations.chat_models.vllm.vllm_chat_model.VLLMChatModelConnection"
@@ -390,9 +390,9 @@ class ResourceName:
         OPENAI_CONNECTION = 
"flink_agents.integrations.embedding_models.openai_embedding_model.OpenAIEmbeddingModelConnection"
         OPENAI_SETUP = 
"flink_agents.integrations.embedding_models.openai_embedding_model.OpenAIEmbeddingModelSetup"
 
-        # Tongyi
-        TONGYI_CONNECTION = 
"flink_agents.integrations.embedding_models.tongyi_embedding_model.TongyiEmbeddingModelConnection"
-        TONGYI_SETUP = 
"flink_agents.integrations.embedding_models.tongyi_embedding_model.TongyiEmbeddingModelSetup"
+        # DashScope
+        DASHSCOPE_CONNECTION = 
"flink_agents.integrations.embedding_models.dashscope_embedding_model.DashScopeEmbeddingModelConnection"
+        DASHSCOPE_SETUP = 
"flink_agents.integrations.embedding_models.dashscope_embedding_model.DashScopeEmbeddingModelSetup"
 
         class Java:
             """Java implementations of EmbeddingModel."""
diff --git a/python/flink_agents/api/yaml/aliases.py 
b/python/flink_agents/api/yaml/aliases.py
index a15b10cba..550ec71eb 100644
--- a/python/flink_agents/api/yaml/aliases.py
+++ b/python/flink_agents/api/yaml/aliases.py
@@ -64,7 +64,7 @@ CLAZZ_ALIASES: Dict[ResourceType, Dict[str, Dict[str, str]]] 
= {
             "ollama": ResourceName.ChatModel.OLLAMA_CONNECTION,
             "openai": ResourceName.ChatModel.OPENAI_COMPLETIONS_CONNECTION,
             "anthropic": ResourceName.ChatModel.ANTHROPIC_CONNECTION,
-            "tongyi": ResourceName.ChatModel.TONGYI_CONNECTION,
+            "dashscope": ResourceName.ChatModel.DASHSCOPE_CONNECTION,
             "azure_openai": ResourceName.ChatModel.AZURE_OPENAI_CONNECTION,
             "vllm": ResourceName.ChatModel.VLLM_CONNECTION,
             "watsonx": ResourceName.ChatModel.WATSONX_CONNECTION,
@@ -86,7 +86,7 @@ CLAZZ_ALIASES: Dict[ResourceType, Dict[str, Dict[str, str]]] 
= {
             "ollama": ResourceName.ChatModel.OLLAMA_SETUP,
             "openai": ResourceName.ChatModel.OPENAI_COMPLETIONS_SETUP,
             "anthropic": ResourceName.ChatModel.ANTHROPIC_SETUP,
-            "tongyi": ResourceName.ChatModel.TONGYI_SETUP,
+            "dashscope": ResourceName.ChatModel.DASHSCOPE_SETUP,
             "azure_openai": ResourceName.ChatModel.AZURE_OPENAI_SETUP,
             "vllm": ResourceName.ChatModel.VLLM_SETUP,
             "watsonx": ResourceName.ChatModel.WATSONX_SETUP,
@@ -107,7 +107,7 @@ CLAZZ_ALIASES: Dict[ResourceType, Dict[str, Dict[str, 
str]]] = {
         "python": {
             "ollama": ResourceName.EmbeddingModel.OLLAMA_CONNECTION,
             "openai": ResourceName.EmbeddingModel.OPENAI_CONNECTION,
-            "tongyi": ResourceName.EmbeddingModel.TONGYI_CONNECTION,
+            "dashscope": ResourceName.EmbeddingModel.DASHSCOPE_CONNECTION,
         },
         "java": {
             "ollama": ResourceName.EmbeddingModel.Java.OLLAMA_CONNECTION,
@@ -119,7 +119,7 @@ CLAZZ_ALIASES: Dict[ResourceType, Dict[str, Dict[str, 
str]]] = {
         "python": {
             "ollama": ResourceName.EmbeddingModel.OLLAMA_SETUP,
             "openai": ResourceName.EmbeddingModel.OPENAI_SETUP,
-            "tongyi": ResourceName.EmbeddingModel.TONGYI_SETUP,
+            "dashscope": ResourceName.EmbeddingModel.DASHSCOPE_SETUP,
         },
         "java": {
             "ollama": ResourceName.EmbeddingModel.Java.OLLAMA_SETUP,
diff --git 
a/python/flink_agents/e2e_tests/e2e_tests_integration/chat_model_integration_agent.py
 
b/python/flink_agents/e2e_tests/e2e_tests_integration/chat_model_integration_agent.py
index 8934c77e5..260d5ce33 100644
--- 
a/python/flink_agents/e2e_tests/e2e_tests_integration/chat_model_integration_agent.py
+++ 
b/python/flink_agents/e2e_tests/e2e_tests_integration/chat_model_integration_agent.py
@@ -60,9 +60,9 @@ class ChatModelTestAgent(Agent):
 
     @chat_model_connection
     @staticmethod
-    def tongyi_connection() -> ResourceDescriptor:
-        """ChatModelConnection responsible for tongyi model service 
connection."""
-        return 
ResourceDescriptor(clazz=ResourceName.ChatModel.TONGYI_CONNECTION)
+    def dashscope_connection() -> ResourceDescriptor:
+        """ChatModelConnection responsible for dashscope model service 
connection."""
+        return 
ResourceDescriptor(clazz=ResourceName.ChatModel.DASHSCOPE_CONNECTION)
 
     @chat_model_connection
     @staticmethod
@@ -77,11 +77,11 @@ class ChatModelTestAgent(Agent):
     def math_chat_model() -> ResourceDescriptor:
         """ChatModel which focus on math, and reuse ChatModelConnection."""
         model_provider = os.environ.get("MODEL_PROVIDER")
-        if model_provider == "Tongyi":
+        if model_provider == "DashScope":
             return ResourceDescriptor(
-                clazz=ResourceName.ChatModel.TONGYI_SETUP,
-                connection="tongyi_connection",
-                model=os.environ.get("TONGYI_CHAT_MODEL", "qwen-plus"),
+                clazz=ResourceName.ChatModel.DASHSCOPE_SETUP,
+                connection="dashscope_connection",
+                model=os.environ.get("DASHSCOPE_CHAT_MODEL", "qwen-plus"),
                 tools=["add"],
             )
         elif model_provider == "Ollama":
@@ -115,11 +115,11 @@ class ChatModelTestAgent(Agent):
     def creative_chat_model() -> ResourceDescriptor:
         """ChatModel which focus on text generate, and reuse 
ChatModelConnection."""
         model_provider = os.environ.get("MODEL_PROVIDER")
-        if model_provider == "Tongyi":
+        if model_provider == "DashScope":
             return ResourceDescriptor(
-                clazz=ResourceName.ChatModel.TONGYI_SETUP,
-                connection="tongyi_connection",
-                model=os.environ.get("TONGYI_CHAT_MODEL", "qwen-plus"),
+                clazz=ResourceName.ChatModel.DASHSCOPE_SETUP,
+                connection="dashscope_connection",
+                model=os.environ.get("DASHSCOPE_CHAT_MODEL", "qwen-plus"),
             )
         elif model_provider == "Ollama":
             return ResourceDescriptor(
diff --git 
a/python/flink_agents/e2e_tests/e2e_tests_integration/chat_model_multi_provider_remote_test.py
 
b/python/flink_agents/e2e_tests/e2e_tests_integration/chat_model_multi_provider_remote_test.py
index 374b89aca..f9438de19 100644
--- 
a/python/flink_agents/e2e_tests/e2e_tests_integration/chat_model_multi_provider_remote_test.py
+++ 
b/python/flink_agents/e2e_tests/e2e_tests_integration/chat_model_multi_provider_remote_test.py
@@ -39,7 +39,7 @@ from 
flink_agents.e2e_tests.e2e_tests_integration.chat_model_integration_agent i
 
 current_dir = Path(__file__).parent
 
-TONGYI_MODEL = os.environ.get("TONGYI_CHAT_MODEL", "qwen-plus")
+DASHSCOPE_MODEL = os.environ.get("DASHSCOPE_CHAT_MODEL", "qwen-plus")
 OPENAI_MODEL = os.environ.get("OPENAI_CHAT_MODEL", "gpt-3.5-turbo")
 AZURE_OPENAI_MODEL = os.environ.get("AZURE_OPENAI_CHAT_MODEL", "gpt-5")
 AZURE_OPENAI_API_VERSION = os.environ.get(
@@ -57,9 +57,9 @@ os.environ["PYTHONPATH"] = sysconfig.get_paths()["purelib"]
     "model_provider",
     [
         pytest.param(
-            "Tongyi",
+            "DashScope",
             marks=pytest.mark.skipif(
-                not DASHSCOPE_API_KEY, reason="Tongyi api key is not set."
+                not DASHSCOPE_API_KEY, reason="DashScope api key is not set."
             ),
         ),
         pytest.param(
@@ -81,11 +81,11 @@ def test_chat_model_integration_remote(
 ) -> None:
     """Non-Ollama providers answer math and creative prompts on the remote 
path.
 
-    Covers the three credential-gated providers (Tongyi/OpenAI/AzureOpenAI) and
+    Covers the three credential-gated providers (DashScope/OpenAI/AzureOpenAI) 
and
     drives the agent through a real StreamExecutionEnvironment with a 
FileSource
     and file sink. Each parameter skips cleanly when its credential is absent.
     """
-    monkeypatch.setenv("TONGYI_CHAT_MODEL", TONGYI_MODEL)
+    monkeypatch.setenv("DASHSCOPE_CHAT_MODEL", DASHSCOPE_MODEL)
     monkeypatch.setenv("OPENAI_CHAT_MODEL", OPENAI_MODEL)
     monkeypatch.setenv("AZURE_OPENAI_CHAT_MODEL", AZURE_OPENAI_MODEL)
     monkeypatch.setenv("AZURE_OPENAI_API_VERSION", AZURE_OPENAI_API_VERSION)
diff --git a/python/flink_agents/integrations/chat_models/tongyi_chat_model.py 
b/python/flink_agents/integrations/chat_models/dashscope_chat_model.py
similarity index 94%
rename from python/flink_agents/integrations/chat_models/tongyi_chat_model.py
rename to python/flink_agents/integrations/chat_models/dashscope_chat_model.py
index bc72760dc..9eb993994 100644
--- a/python/flink_agents/integrations/chat_models/tongyi_chat_model.py
+++ b/python/flink_agents/integrations/chat_models/dashscope_chat_model.py
@@ -126,15 +126,15 @@ def to_dashscope_tool(
     }
 
 
-class TongyiChatModelConnection(BaseChatModelConnection):
-    """Tongyi ChatModelConnection which manages the connection to the Tongyi 
API server.
+class DashScopeChatModelConnection(BaseChatModelConnection):
+    """Manage the connection to the DashScope API server.
 
     Attributes:
     ----------
     api_key : str
         Your DashScope API key.
     request_timeout : float
-        The timeout for making http request to Tongyi API server.
+        The timeout for making http request to DashScope API server.
     """
 
     api_key: str = Field(
@@ -143,7 +143,7 @@ class TongyiChatModelConnection(BaseChatModelConnection):
     )
     request_timeout: float = Field(
         default=DEFAULT_REQUEST_TIMEOUT,
-        description="The timeout for making http request to Tongyi API 
server.",
+        description="The timeout for making http request to DashScope API 
server.",
     )
 
     def __init__(
@@ -231,9 +231,9 @@ class TongyiChatModelConnection(BaseChatModelConnection):
         ChatMessage
             Model response message.
         """
-        tongyi_messages = self.__convert_to_tongyi_messages(messages)
+        dashscope_messages = self.__convert_to_dashscope_messages(messages)
 
-        tongyi_tools: List[Dict[str, Any]] | None = (
+        dashscope_tools: List[Dict[str, Any]] | None = (
             [to_dashscope_tool(tool.metadata) for tool in tools] if tools else 
None
         )
 
@@ -278,8 +278,8 @@ class TongyiChatModelConnection(BaseChatModelConnection):
 
         response = Generation.call(
             model=model_name,
-            messages=tongyi_messages,
-            tools=tongyi_tools,
+            messages=dashscope_messages,
+            tools=dashscope_tools,
             result_format="message",
             timeout=self.request_timeout,
             api_key=req_api_key,
@@ -336,10 +336,10 @@ class TongyiChatModelConnection(BaseChatModelConnection):
         )
 
     @staticmethod
-    def __convert_to_tongyi_messages(
+    def __convert_to_dashscope_messages(
         messages: Sequence[ChatMessage],
     ) -> List[Dict[str, Any]]:
-        tongyi_messages: List[Dict[str, Any]] = []
+        dashscope_messages: List[Dict[str, Any]] = []
         for message in messages:
             msg_dict: Dict[str, Any] = {
                 "role": message.role.value,
@@ -370,8 +370,8 @@ class TongyiChatModelConnection(BaseChatModelConnection):
                 # The tool call action records the provider's call id here.
                 msg_dict["tool_call_id"] = 
str(message.extra_args["external_id"])
 
-            tongyi_messages.append(msg_dict)
-        return cast("List[Dict[str, Any]]", tongyi_messages)
+            dashscope_messages.append(msg_dict)
+        return cast("List[Dict[str, Any]]", dashscope_messages)
 
 
 def _provider_tool_call_id(tool_call: Dict[str, Any]) -> str:
@@ -382,9 +382,9 @@ def _provider_tool_call_id(tool_call: Dict[str, Any]) -> 
str:
     return str(original_id) if original_id else str(tool_call.get("id", ""))
 
 
-class TongyiChatModelSetup(BaseChatModelSetup):
-    """Tongyi chat model setup which manages chat configuration and will 
internally
-    call Tongyi chat model connection to do chat.
+class DashScopeChatModelSetup(BaseChatModelSetup):
+    """DashScope chat model setup which manages chat configuration and will 
internally
+    call DashScope chat model connection to do chat.
 
     Attributes:
     ----------
@@ -400,7 +400,7 @@ class TongyiChatModelSetup(BaseChatModelSetup):
     temperature : float
         The temperature to use for sampling.
     additional_kwargs : Dict[str, Any]
-        Additional model parameters for the Tongyi API.
+        Additional model parameters for the DashScope API.
     extract_reasoning : bool
         If True, extracts reasoning content from the response and stores it
         in additional_kwargs.
@@ -414,7 +414,7 @@ class TongyiChatModelSetup(BaseChatModelSetup):
     )
     additional_kwargs: Dict[str, Any] = Field(
         default_factory=dict,
-        description="Additional model parameters for the Tongyi API.",
+        description="Additional model parameters for the DashScope API.",
     )
     extract_reasoning: bool = Field(
         default=False,
@@ -444,7 +444,7 @@ class TongyiChatModelSetup(BaseChatModelSetup):
 
     @property
     def model_kwargs(self) -> Dict[str, Any]:
-        """Return Tongyi model configuration."""
+        """Return DashScope model configuration."""
         base_kwargs = {
             "model": self.model,
             "temperature": self.temperature,
diff --git 
a/python/flink_agents/integrations/chat_models/tests/test_tongyi_chat_model.py 
b/python/flink_agents/integrations/chat_models/tests/test_dashscope_chat_model.py
similarity index 86%
rename from 
python/flink_agents/integrations/chat_models/tests/test_tongyi_chat_model.py
rename to 
python/flink_agents/integrations/chat_models/tests/test_dashscope_chat_model.py
index aef71f5ab..dd467e9c6 100644
--- 
a/python/flink_agents/integrations/chat_models/tests/test_tongyi_chat_model.py
+++ 
b/python/flink_agents/integrations/chat_models/tests/test_dashscope_chat_model.py
@@ -24,24 +24,24 @@ import pytest
 from flink_agents.api.chat_message import ChatMessage, MessageRole
 from flink_agents.api.resource import Resource, ResourceType
 from flink_agents.api.resource_context import ResourceContext
-from flink_agents.integrations.chat_models.tongyi_chat_model import (
+from flink_agents.integrations.chat_models.dashscope_chat_model import (
     DEFAULT_MODEL,
-    TongyiChatModelConnection,
-    TongyiChatModelSetup,
+    DashScopeChatModelConnection,
+    DashScopeChatModelSetup,
 )
 from flink_agents.plan.function import PythonFunction
 from flink_agents.plan.tools.function_tool import FunctionTool
 
 pytestmark = pytest.mark.integration
 
-test_model = os.environ.get("TONGYI_CHAT_MODEL", "qwen-plus")
+test_model = os.environ.get("DASHSCOPE_CHAT_MODEL", "qwen-plus")
 api_key_available = "DASHSCOPE_API_KEY" in os.environ
 
 
 @pytest.mark.skipif(not api_key_available, reason="DashScope API key is not 
set")
-def test_tongyi_chat() -> None:
-    """Test basic chat functionality of TongyiChatModelConnection."""
-    connection = TongyiChatModelConnection()
+def test_dashscope_chat() -> None:
+    """Test basic chat functionality of DashScopeChatModelConnection."""
+    connection = DashScopeChatModelConnection()
     response = connection.chat(
         [ChatMessage.of(MessageRole.USER, "Hello!")], model=test_model
     )
@@ -75,9 +75,9 @@ def get_tool(name: str, type: ResourceType) -> FunctionTool:
 
 
 @pytest.mark.skipif(not api_key_available, reason="DashScope API key is not 
set")
-def test_tongyi_chat_with_tools() -> None:
+def test_dashscope_chat_with_tools() -> None:
     """Test chat functionality with tool calling."""
-    connection = TongyiChatModelConnection()
+    connection = DashScopeChatModelConnection()
 
     def get_resource(name: str, type: ResourceType) -> Resource:
         if type == ResourceType.TOOL:
@@ -88,9 +88,9 @@ def test_tongyi_chat_with_tools() -> None:
     mock_ctx = MagicMock(spec=ResourceContext)
     mock_ctx.get_resource = get_resource
 
-    llm = TongyiChatModelSetup(
+    llm = DashScopeChatModelSetup(
         model=test_model,
-        connection="tongyi",
+        connection="dashscope",
         tools=["add"],
         resource_context=mock_ctx,
     )
@@ -112,7 +112,7 @@ def test_tongyi_chat_with_tools() -> None:
     assert add(**tool_call["function"]["arguments"]) == 3
 
 
-def test_tongyi_chat_with_extract_reasoning(monkeypatch: pytest.MonkeyPatch) 
-> None:
+def test_dashscope_chat_with_extract_reasoning(monkeypatch: 
pytest.MonkeyPatch) -> None:
     """Test that extract_reasoning functionality works correctly (mock 
DashScope)."""
     content = "The meaning of life is often considered to be 42, according to 
the Hitchhiker's Guide to the Galaxy."
     reasoning_content = (
@@ -140,11 +140,11 @@ def test_tongyi_chat_with_extract_reasoning(monkeypatch: 
pytest.MonkeyPatch) ->
     mock_call = MagicMock(return_value=mocked_response)
 
     monkeypatch.setattr(
-        
"flink_agents.integrations.chat_models.tongyi_chat_model.Generation.call",
+        
"flink_agents.integrations.chat_models.dashscope_chat_model.Generation.call",
         mock_call,
     )
 
-    connection = TongyiChatModelConnection(
+    connection = DashScopeChatModelConnection(
         api_key=os.environ.get("DASHSCOPE_API_KEY", "fake-key"),
     )
 
@@ -154,9 +154,9 @@ def test_tongyi_chat_with_extract_reasoning(monkeypatch: 
pytest.MonkeyPatch) ->
     mock_ctx = MagicMock(spec=ResourceContext)
     mock_ctx.get_resource = get_resource
 
-    llm = TongyiChatModelSetup(
+    llm = DashScopeChatModelSetup(
         model=test_model,
-        connection="tongyi",
+        connection="dashscope",
         extract_reasoning=True,
         resource_context=mock_ctx,
     )
@@ -180,14 +180,14 @@ def test_tongyi_chat_with_extract_reasoning(monkeypatch: 
pytest.MonkeyPatch) ->
 
 def test_model_field_roundtrip() -> None:
     """Verify `model` is preserved through pydantic dump/validate 
round-trip."""
-    setup = TongyiChatModelSetup(connection="conn", model="test-model")
-    restored = TongyiChatModelSetup.model_validate(setup.model_dump())
+    setup = DashScopeChatModelSetup(connection="conn", model="test-model")
+    restored = DashScopeChatModelSetup.model_validate(setup.model_dump())
     assert restored.model == "test-model"
 
 
 def test_default_model_when_omitted() -> None:
     """Verify per-integration default applies when `model` is omitted from 
__init__."""
-    setup = TongyiChatModelSetup(connection="conn")
+    setup = DashScopeChatModelSetup(connection="conn")
     assert setup.model == DEFAULT_MODEL
 
 
@@ -219,10 +219,10 @@ def test_tool_call_ids_round_trip(monkeypatch: 
pytest.MonkeyPatch) -> None:
     )
     mock_call = MagicMock(return_value=tool_call_response)
     monkeypatch.setattr(
-        
"flink_agents.integrations.chat_models.tongyi_chat_model.Generation.call",
+        
"flink_agents.integrations.chat_models.dashscope_chat_model.Generation.call",
         mock_call,
     )
-    connection = TongyiChatModelConnection(api_key="fake-key")
+    connection = DashScopeChatModelConnection(api_key="fake-key")
 
     response = connection.chat(
         [ChatMessage.of(MessageRole.USER, "What is 1 + 2?")], model=test_model
diff --git 
a/python/flink_agents/integrations/chat_models/tests/test_tongyi_native_structured_output.py
 
b/python/flink_agents/integrations/chat_models/tests/test_dashscope_native_structured_output.py
similarity index 96%
rename from 
python/flink_agents/integrations/chat_models/tests/test_tongyi_native_structured_output.py
rename to 
python/flink_agents/integrations/chat_models/tests/test_dashscope_native_structured_output.py
index 046109411..9d17a533b 100644
--- 
a/python/flink_agents/integrations/chat_models/tests/test_tongyi_native_structured_output.py
+++ 
b/python/flink_agents/integrations/chat_models/tests/test_dashscope_native_structured_output.py
@@ -25,8 +25,8 @@ from pyflink.common.typeinfo import Types
 
 from flink_agents.api.agents.types import OutputSchema
 from flink_agents.api.chat_message import ChatMessage, MessageRole
-from flink_agents.integrations.chat_models.tongyi_chat_model import (
-    TongyiChatModelConnection,
+from flink_agents.integrations.chat_models.dashscope_chat_model import (
+    DashScopeChatModelConnection,
 )
 
 # The models DashScope documents native structured output for on the
@@ -68,8 +68,8 @@ class Unrenderable(BaseModel):
     cb: Callable[[int], int]
 
 
-def _connection() -> TongyiChatModelConnection:
-    return TongyiChatModelConnection(api_key="fake-key")
+def _connection() -> DashScopeChatModelConnection:
+    return DashScopeChatModelConnection(api_key="fake-key")
 
 
 def _messages() -> list[ChatMessage]:
@@ -103,7 +103,7 @@ def _patched_call(monkeypatch: pytest.MonkeyPatch) -> 
MagicMock:
     """
     mock_call = MagicMock(return_value=_mocked_response())
     monkeypatch.setattr(
-        
"flink_agents.integrations.chat_models.tongyi_chat_model.Generation.call",
+        
"flink_agents.integrations.chat_models.dashscope_chat_model.Generation.call",
         mock_call,
     )
     return mock_call
@@ -268,7 +268,7 @@ def 
test_row_type_info_leaves_a_caller_response_format_alone(monkeypatch) -> Non
 _DEFAULT_MODEL = "qwen-plus"
 
 
-def _judging_connection() -> tuple[TongyiChatModelConnection, list[str | 
None]]:
+def _judging_connection() -> tuple[DashScopeChatModelConnection, list[str | 
None]]:
     """A connection recording every model its request path judges for 
capability.
 
     Subclassing keeps the predicate itself under test rather than standing a 
stub in
@@ -276,7 +276,7 @@ def _judging_connection() -> 
tuple[TongyiChatModelConnection, list[str | None]]:
     """
     judged: list[str | None] = []
 
-    class _JudgingConnection(TongyiChatModelConnection):
+    class _JudgingConnection(DashScopeChatModelConnection):
         def supports_native_structured_output(
             self, effective_model: str | None
         ) -> bool:
diff --git 
a/python/flink_agents/integrations/chat_models/tests/test_output_schema_param_declared.py
 
b/python/flink_agents/integrations/chat_models/tests/test_output_schema_param_declared.py
index 604eb3e2e..d5ef7beba 100644
--- 
a/python/flink_agents/integrations/chat_models/tests/test_output_schema_param_declared.py
+++ 
b/python/flink_agents/integrations/chat_models/tests/test_output_schema_param_declared.py
@@ -28,7 +28,10 @@ from flink_agents.e2e_tests.e2e_tests_integration import (
     mock_chat_model_agent,
     tool_parameter_injection_agent,
 )
-from flink_agents.integrations.chat_models import ollama_chat_model, 
tongyi_chat_model
+from flink_agents.integrations.chat_models import (
+    dashscope_chat_model,
+    ollama_chat_model,
+)
 from flink_agents.integrations.chat_models.anthropic import 
anthropic_chat_model
 from flink_agents.integrations.chat_models.azure import azure_openai_chat_model
 from flink_agents.integrations.chat_models.openai import openai_chat_model
@@ -45,7 +48,7 @@ _MODULES_DEFINING_CONNECTIONS = (
     mock_chat_model_agent,
     ollama_chat_model,
     openai_chat_model,
-    tongyi_chat_model,
+    dashscope_chat_model,
     tool_parameter_injection_agent,
     watsonx_chat_model,
 )
diff --git 
a/python/flink_agents/integrations/embedding_models/tongyi_embedding_model.py 
b/python/flink_agents/integrations/embedding_models/dashscope_embedding_model.py
similarity index 93%
rename from 
python/flink_agents/integrations/embedding_models/tongyi_embedding_model.py
rename to 
python/flink_agents/integrations/embedding_models/dashscope_embedding_model.py
index bea3075bd..0e52e3c20 100644
--- 
a/python/flink_agents/integrations/embedding_models/tongyi_embedding_model.py
+++ 
b/python/flink_agents/integrations/embedding_models/dashscope_embedding_model.py
@@ -46,8 +46,8 @@ def _get_usage_value(obj: Any, *names: str) -> int | None:
     return None
 
 
-class TongyiEmbeddingModelConnection(BaseEmbeddingModelConnection):
-    """Tongyi Embedding Model Connection which manages connection to DashScope 
API.
+class DashScopeEmbeddingModelConnection(BaseEmbeddingModelConnection):
+    """DashScope Embedding Model Connection which manages connection to 
DashScope API.
 
     Visit https://dashscope.console.aliyun.com/ to get your API key.
 
@@ -56,7 +56,7 @@ class 
TongyiEmbeddingModelConnection(BaseEmbeddingModelConnection):
     api_key : str
         DashScope API key for authentication.
     request_timeout : float
-        The timeout for making http request to Tongyi API server.
+        The timeout for making http request to DashScope API server.
     """
 
     api_key: str | None = Field(
@@ -65,7 +65,7 @@ class 
TongyiEmbeddingModelConnection(BaseEmbeddingModelConnection):
     )
     request_timeout: float = Field(
         default=DEFAULT_REQUEST_TIMEOUT,
-        description="The timeout for making http request to Tongyi API 
server.",
+        description="The timeout for making http request to DashScope API 
server.",
     )
 
     def __init__(
@@ -147,8 +147,8 @@ class 
TongyiEmbeddingModelConnection(BaseEmbeddingModelConnection):
         )
 
 
-class TongyiEmbeddingModelSetup(BaseEmbeddingModelSetup):
-    """The settings for Tongyi embedding model.
+class DashScopeEmbeddingModelSetup(BaseEmbeddingModelSetup):
+    """The settings for DashScope embedding model.
 
     Attributes:
     ----------
@@ -205,7 +205,7 @@ class TongyiEmbeddingModelSetup(BaseEmbeddingModelSetup):
 
     @property
     def model_kwargs(self) -> Dict[str, Any]:
-        """Return Tongyi embedding model configuration."""
+        """Return DashScope embedding model configuration."""
         base_kwargs: Dict[str, Any] = {
             "model": self.model,
         }
diff --git 
a/python/flink_agents/integrations/embedding_models/openai_embedding_model.py 
b/python/flink_agents/integrations/embedding_models/openai_embedding_model.py
index b8cd0256e..8a07870e8 100644
--- 
a/python/flink_agents/integrations/embedding_models/openai_embedding_model.py
+++ 
b/python/flink_agents/integrations/embedding_models/openai_embedding_model.py
@@ -373,7 +373,7 @@ class 
OpenAIEmbeddingModelConnection(BaseEmbeddingModelConnection):
             prompt_tokens = _usage_count(getattr(usage, "prompt_tokens", None))
             total_tokens = _usage_count(getattr(usage, "total_tokens", None))
             # Embedding requests have no completion tokens, so a missing side 
of the
-            # usage equals the other side (as the Tongyi connection does).
+            # usage equals the other side (as the DashScope connection does).
             if prompt_tokens is None:
                 prompt_tokens = total_tokens
             if prompt_tokens is not None:
diff --git 
a/python/flink_agents/integrations/embedding_models/tests/test_tongyi_embedding_model.py
 
b/python/flink_agents/integrations/embedding_models/tests/test_dashscope_embedding_model.py
similarity index 75%
rename from 
python/flink_agents/integrations/embedding_models/tests/test_tongyi_embedding_model.py
rename to 
python/flink_agents/integrations/embedding_models/tests/test_dashscope_embedding_model.py
index 6262d4bd6..b8725285c 100644
--- 
a/python/flink_agents/integrations/embedding_models/tests/test_tongyi_embedding_model.py
+++ 
b/python/flink_agents/integrations/embedding_models/tests/test_dashscope_embedding_model.py
@@ -24,14 +24,14 @@ import pytest
 
 from flink_agents.api.resource import Resource, ResourceType
 from flink_agents.api.resource_context import ResourceContext
-from flink_agents.integrations.embedding_models.tongyi_embedding_model import (
-    TongyiEmbeddingModelConnection,
-    TongyiEmbeddingModelSetup,
+from flink_agents.integrations.embedding_models.dashscope_embedding_model 
import (
+    DashScopeEmbeddingModelConnection,
+    DashScopeEmbeddingModelSetup,
 )
 
 pytestmark = pytest.mark.integration
 
-test_model = os.environ.get("TONGYI_EMBEDDING_MODEL", "text-embedding-v4")
+test_model = os.environ.get("DASHSCOPE_EMBEDDING_MODEL", "text-embedding-v4")
 api_key_available = "DASHSCOPE_API_KEY" in os.environ
 
 
@@ -42,9 +42,9 @@ def _make_ctx(get_resource) -> ResourceContext:
 
 
 @pytest.mark.skipif(not api_key_available, reason="DashScope API key is not 
set")
-def test_tongyi_embedding_model() -> None:
-    """Test basic embedding functionality of TongyiEmbeddingModelConnection."""
-    connection = TongyiEmbeddingModelConnection(name="tongyi")
+def test_dashscope_embedding_model() -> None:
+    """Test basic embedding functionality of 
DashScopeEmbeddingModelConnection."""
+    connection = DashScopeEmbeddingModelConnection(name="dashscope")
 
     def get_resource(name: str, type: ResourceType) -> Resource:
         if type == ResourceType.EMBEDDING_MODEL_CONNECTION:
@@ -53,10 +53,10 @@ def test_tongyi_embedding_model() -> None:
             msg = f"Unknown resource type: {type}"
             raise ValueError(msg)
 
-    embedding_model = TongyiEmbeddingModelSetup(
-        name="tongyi",
+    embedding_model = DashScopeEmbeddingModelSetup(
+        name="dashscope",
         model=test_model,
-        connection="tongyi",
+        connection="dashscope",
         resource_context=_make_ctx(get_resource),
     )
     embedding_model.open()
@@ -71,9 +71,9 @@ def test_tongyi_embedding_model() -> None:
 
 
 @pytest.mark.skipif(not api_key_available, reason="DashScope API key is not 
set")
-def test_tongyi_embedding_with_text_type() -> None:
+def test_dashscope_embedding_with_text_type() -> None:
     """Test embedding with text_type parameter."""
-    connection = TongyiEmbeddingModelConnection(name="tongyi")
+    connection = DashScopeEmbeddingModelConnection(name="dashscope")
 
     def get_resource(name: str, type: ResourceType) -> Resource:
         if type == ResourceType.EMBEDDING_MODEL_CONNECTION:
@@ -82,10 +82,10 @@ def test_tongyi_embedding_with_text_type() -> None:
             msg = f"Unknown resource type: {type}"
             raise ValueError(msg)
 
-    embedding_model_query = TongyiEmbeddingModelSetup(
-        name="tongyi",
+    embedding_model_query = DashScopeEmbeddingModelSetup(
+        name="dashscope",
         model=test_model,
-        connection="tongyi",
+        connection="dashscope",
         text_type="query",
         resource_context=_make_ctx(get_resource),
     )
@@ -96,10 +96,10 @@ def test_tongyi_embedding_with_text_type() -> None:
     assert isinstance(response_query, list)
     assert len(response_query) > 0
 
-    embedding_model_doc = TongyiEmbeddingModelSetup(
-        name="tongyi",
+    embedding_model_doc = DashScopeEmbeddingModelSetup(
+        name="dashscope",
         model=test_model,
-        connection="tongyi",
+        connection="dashscope",
         text_type="document",
         resource_context=_make_ctx(get_resource),
     )
@@ -111,7 +111,7 @@ def test_tongyi_embedding_with_text_type() -> None:
     assert len(response_doc) > 0
 
 
-def test_tongyi_embedding_mock(monkeypatch: pytest.MonkeyPatch) -> None:
+def test_dashscope_embedding_mock(monkeypatch: pytest.MonkeyPatch) -> None:
     """Test embedding functionality with mocked DashScope API."""
     mock_embedding = [0.1, 0.2, 0.3, 0.4, 0.5]
 
@@ -124,12 +124,12 @@ def test_tongyi_embedding_mock(monkeypatch: 
pytest.MonkeyPatch) -> None:
     mock_call = MagicMock(return_value=mocked_response)
 
     monkeypatch.setattr(
-        
"flink_agents.integrations.embedding_models.tongyi_embedding_model.dashscope.TextEmbedding.call",
+        
"flink_agents.integrations.embedding_models.dashscope_embedding_model.dashscope.TextEmbedding.call",
         mock_call,
     )
 
-    connection = TongyiEmbeddingModelConnection(
-        name="tongyi",
+    connection = DashScopeEmbeddingModelConnection(
+        name="dashscope",
         api_key="fake-key",
     )
 
@@ -140,10 +140,10 @@ def test_tongyi_embedding_mock(monkeypatch: 
pytest.MonkeyPatch) -> None:
             msg = f"Unknown resource type: {type}"
             raise ValueError(msg)
 
-    embedding_model = TongyiEmbeddingModelSetup(
-        name="tongyi",
+    embedding_model = DashScopeEmbeddingModelSetup(
+        name="dashscope",
         model=test_model,
-        connection="tongyi",
+        connection="dashscope",
         resource_context=_make_ctx(get_resource),
     )
     embedding_model.open()
@@ -155,7 +155,7 @@ def test_tongyi_embedding_mock(monkeypatch: 
pytest.MonkeyPatch) -> None:
     assert len(response) == 5
 
 
-def test_tongyi_embedding_returns_token_usage(
+def test_dashscope_embedding_returns_token_usage(
     monkeypatch: pytest.MonkeyPatch,
 ) -> None:
     """Test DashScope embedding usage is recorded as model token metrics."""
@@ -170,12 +170,12 @@ def test_tongyi_embedding_returns_token_usage(
     )
     mock_call = MagicMock(return_value=mocked_response)
     monkeypatch.setattr(
-        
"flink_agents.integrations.embedding_models.tongyi_embedding_model.dashscope.TextEmbedding.call",
+        
"flink_agents.integrations.embedding_models.dashscope_embedding_model.dashscope.TextEmbedding.call",
         mock_call,
     )
 
-    connection = TongyiEmbeddingModelConnection(
-        name="tongyi",
+    connection = DashScopeEmbeddingModelConnection(
+        name="dashscope",
         api_key="fake-key",
     )
 
@@ -186,10 +186,10 @@ def test_tongyi_embedding_returns_token_usage(
             msg = f"Unknown resource type: {type}"
             raise ValueError(msg)
 
-    embedding_model = TongyiEmbeddingModelSetup(
-        name="tongyi",
+    embedding_model = DashScopeEmbeddingModelSetup(
+        name="dashscope",
         model=test_model,
-        connection="tongyi",
+        connection="dashscope",
         resource_context=_make_ctx(get_resource),
     )
     embedding_model.open()
@@ -201,7 +201,7 @@ def test_tongyi_embedding_returns_token_usage(
     assert result.token_usage.total_tokens == 6
 
 
-def test_tongyi_embedding_batch_mock(monkeypatch: pytest.MonkeyPatch) -> None:
+def test_dashscope_embedding_batch_mock(monkeypatch: pytest.MonkeyPatch) -> 
None:
     """Test batch embedding functionality with mocked DashScope API."""
     mock_embeddings = [[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]]
 
@@ -219,12 +219,12 @@ def test_tongyi_embedding_batch_mock(monkeypatch: 
pytest.MonkeyPatch) -> None:
     mock_call = MagicMock(return_value=mocked_response)
 
     monkeypatch.setattr(
-        
"flink_agents.integrations.embedding_models.tongyi_embedding_model.dashscope.TextEmbedding.call",
+        
"flink_agents.integrations.embedding_models.dashscope_embedding_model.dashscope.TextEmbedding.call",
         mock_call,
     )
 
-    connection = TongyiEmbeddingModelConnection(
-        name="tongyi",
+    connection = DashScopeEmbeddingModelConnection(
+        name="dashscope",
         api_key="fake-key",
     )
 
@@ -235,10 +235,10 @@ def test_tongyi_embedding_batch_mock(monkeypatch: 
pytest.MonkeyPatch) -> None:
             msg = f"Unknown resource type: {type}"
             raise ValueError(msg)
 
-    embedding_model = TongyiEmbeddingModelSetup(
-        name="tongyi",
+    embedding_model = DashScopeEmbeddingModelSetup(
+        name="dashscope",
         model=test_model,
-        connection="tongyi",
+        connection="dashscope",
         resource_context=_make_ctx(get_resource),
     )
     embedding_model.open()
@@ -250,7 +250,7 @@ def test_tongyi_embedding_batch_mock(monkeypatch: 
pytest.MonkeyPatch) -> None:
     assert len(response) == 2
 
 
-def test_tongyi_embedding_error_handling(monkeypatch: pytest.MonkeyPatch) -> 
None:
+def test_dashscope_embedding_error_handling(monkeypatch: pytest.MonkeyPatch) 
-> None:
     """Test error handling when API call fails."""
     mocked_response = SimpleNamespace(
         status_code=HTTPStatus.BAD_REQUEST,
@@ -260,12 +260,12 @@ def test_tongyi_embedding_error_handling(monkeypatch: 
pytest.MonkeyPatch) -> Non
     mock_call = MagicMock(return_value=mocked_response)
 
     monkeypatch.setattr(
-        
"flink_agents.integrations.embedding_models.tongyi_embedding_model.dashscope.TextEmbedding.call",
+        
"flink_agents.integrations.embedding_models.dashscope_embedding_model.dashscope.TextEmbedding.call",
         mock_call,
     )
 
-    connection = TongyiEmbeddingModelConnection(
-        name="tongyi",
+    connection = DashScopeEmbeddingModelConnection(
+        name="dashscope",
         api_key="invalid-key",
     )
 
@@ -273,7 +273,7 @@ def test_tongyi_embedding_error_handling(monkeypatch: 
pytest.MonkeyPatch) -> Non
         connection.embed("Test text", model=test_model)
 
 
-def test_tongyi_embedding_without_api_key() -> None:
+def test_dashscope_embedding_without_api_key() -> None:
     """Test that ValueError is raised when API key is not provided."""
     original_api_key = os.environ.get("DASHSCOPE_API_KEY")
 
@@ -282,7 +282,7 @@ def test_tongyi_embedding_without_api_key() -> None:
 
     try:
         with pytest.raises(ValueError, match="DashScope API key is not 
provided"):
-            TongyiEmbeddingModelConnection(name="tongyi")
+            DashScopeEmbeddingModelConnection(name="dashscope")
     finally:
         if original_api_key is not None:
             os.environ["DASHSCOPE_API_KEY"] = original_api_key

Reply via email to