Skip to content

Commit 889283c

Browse files
committed
🔧 chore(context): change default model from qwen-turbo to qwen-flash
- Updated default model to "qwen:qwen-flash" in context.py and documentation files - Modified README and CLAUDE.md to reflect new default model name - Removed references to TestModels with specific model names in tests - Adjusted test code to use context with default model without explicit test model overrides - Ensured consistency across internationalized README_CN.md and README.md files
1 parent 4860b3b commit 889283c

File tree

7 files changed

+12
-20
lines changed

7 files changed

+12
-20
lines changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ make dev_ui # Start LangGraph development server with UI
6060
- **Model Providers**: `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `DASHSCOPE_API_KEY` (for Qwen models)
6161
- **Optional**: `REGION` (set to `prc` or `international` for Qwen API endpoints)
6262
- **Optional**: `ENABLE_DEEPWIKI=true` to enable DeepWiki MCP documentation tools
63-
- **Default Model**: Uses `qwen:qwen-turbo` as default model (configurable via `MODEL` environment variable)
63+
- **Default Model**: Uses `qwen:qwen-flash` as default model (configurable via `MODEL` environment variable)
6464

6565
## Key Files and Their Purposes
6666

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ The primary [search tool](./src/common/tools.py) uses [Tavily](https://tavily.co
119119

120120
## Model Configuration
121121

122-
The template uses `qwen:qwen-turbo` as the default model, defined in [`src/common/context.py`](./src/common/context.py). You can configure different models in three ways:
122+
The template uses `qwen:qwen-flash` as the default model, defined in [`src/common/context.py`](./src/common/context.py). You can configure different models in three ways:
123123

124124
1. **Runtime Context** (recommended for programmatic usage)
125125
2. **Environment Variables**
@@ -240,7 +240,7 @@ In LangGraph Studio, configure models through [Assistant management](https://doc
240240
"openai:gpt-4o"
241241

242242
# Qwen models (with regional support)
243-
"qwen:qwen-turbo" # Default model
243+
"qwen:qwen-flash" # Default model
244244
"qwen:qwen-plus" # Balanced performance
245245
"qwen:qwq-32b-preview" # Reasoning model
246246
"qwen:qvq-72b-preview" # Multimodal reasoning

README_CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ ENABLE_DEEPWIKI=true
130130

131131
## 模型配置
132132

133-
模板使用 `qwen:qwen-turbo` 作为默认模型,定义在 [`src/common/context.py`](./src/common/context.py) 中。您可以通过三种方式配置不同的模型:
133+
模板使用 `qwen:qwen-flash` 作为默认模型,定义在 [`src/common/context.py`](./src/common/context.py) 中。您可以通过三种方式配置不同的模型:
134134

135135
1. **运行时上下文**(编程使用推荐)
136136
2. **环境变量**
@@ -175,7 +175,7 @@ MODEL=anthropic:claude-3.5-haiku
175175
"openai:gpt-4o"
176176

177177
# 通义千问模型(支持区域配置)
178-
"qwen:qwen-turbo" # 默认模型
178+
"qwen:qwen-flash" # 默认模型
179179
"qwen:qwen-plus" # 平衡性能
180180
"qwen:qwq-32b-preview" # 推理模型
181181
"qwen:qvq-72b-preview" # 多模态推理

src/common/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Context:
2121
)
2222

2323
model: Annotated[str, {"__template_metadata__": {"kind": "llm"}}] = field(
24-
default="qwen:qwen-turbo",
24+
default="qwen:qwen-flash",
2525
metadata={
2626
"description": "The name of the language model to use for the agent's main interactions. "
2727
"Should be in the form: provider:model-name."

tests/e2e_tests/test_deepwiki.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
import pytest
44

5-
from tests.test_data import TestModels
65

76

87
@pytest.fixture
98
async def assistant_deepwiki_disabled(langgraph_client):
109
"""Create an assistant with deepwiki explicitly disabled."""
1110
config = {
1211
"configurable": {
13-
"model": TestModels.QWEN_TURBO,
1412
"enable_deepwiki": False,
1513
"system_prompt": "You are a helpful AI assistant.",
1614
}
@@ -27,7 +25,6 @@ async def assistant_deepwiki_enabled(langgraph_client):
2725
"""Create an assistant with deepwiki explicitly enabled."""
2826
config = {
2927
"configurable": {
30-
"model": TestModels.QWEN_TURBO,
3128
"enable_deepwiki": True,
3229
"system_prompt": "You are a helpful AI assistant with access to deepwiki tools. When asked to use deepwiki tools, you must use them to get current documentation.",
3330
}
@@ -317,7 +314,6 @@ async def test_deepwiki_configuration_persistence_e2e(
317314
input_data = {
318315
"messages": [{"role": "human", "content": "Hello, please keep it brief"}],
319316
"configurable": {
320-
"model": TestModels.QWEN_PLUS,
321317
"enable_deepwiki": True,
322318
"max_search_results": 3,
323319
"system_prompt": "You are a helpful AI assistant with deepwiki access.",

tests/integration_tests/test_deepwiki.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from common.context import Context
99
from common.mcp import MCP_SERVERS, clear_mcp_cache, get_deepwiki_tools
10-
from tests.test_data import TestModels
1110

1211

1312
class TestMCPIntegration:
@@ -29,15 +28,15 @@ def test_mcp_cache_management(self) -> None:
2928
@patch.dict(os.environ, {"ENABLE_DEEPWIKI": "false"}, clear=True)
3029
def test_context_with_deepwiki_disabled(self) -> None:
3130
"""Test context creation with deepwiki explicitly disabled."""
32-
context = Context(enable_deepwiki=False, model=TestModels.QWEN_PLUS)
31+
context = Context(enable_deepwiki=False)
3332
# Environment variable overrides explicit setting only if explicit value equals default
3433
# Since we explicitly set enable_deepwiki=False and default is False, no override should occur
3534
assert not context.enable_deepwiki
3635

3736
@patch.dict(os.environ, {"ENABLE_DEEPWIKI": "true"}, clear=False)
3837
def test_context_with_deepwiki_enabled_via_env(self) -> None:
3938
"""Test context creation with deepwiki enabled via environment."""
40-
context = Context(model=TestModels.QWEN_PLUS)
39+
context = Context()
4140
# Environment variable should be converted to boolean when current value equals default
4241
assert context.enable_deepwiki
4342

@@ -57,13 +56,13 @@ class TestDeepWikiConfiguration:
5756

5857
def test_deepwiki_context_field_exists(self) -> None:
5958
"""Test that the enable_deepwiki field exists in Context."""
60-
context = Context(model=TestModels.QWEN_PLUS)
59+
context = Context()
6160
assert hasattr(context, "enable_deepwiki")
6261

6362
def test_deepwiki_can_be_configured(self) -> None:
6463
"""Test that deepwiki can be explicitly enabled and disabled."""
65-
context_disabled = Context(enable_deepwiki=False, model=TestModels.QWEN_PLUS)
66-
context_enabled = Context(enable_deepwiki=True, model=TestModels.QWEN_PLUS)
64+
context_disabled = Context(enable_deepwiki=False)
65+
context_enabled = Context(enable_deepwiki=True)
6766

6867
# These should not be the same
6968
assert context_disabled.enable_deepwiki != context_enabled.enable_deepwiki

tests/integration_tests/test_graph.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
from common.context import Context
22
from react_agent import graph
3-
from tests.test_data import TestModels
43

54

65
async def test_react_agent_simple_passthrough() -> None:
76
"""Test that the agent can answer a simple question about LangChain founder."""
87
res = await graph.ainvoke(
98
{"messages": [("user", "Who is the founder of LangChain?")]}, # type: ignore
10-
context=Context(
11-
model=TestModels.QWEN_TURBO, system_prompt="You are a helpful AI assistant."
12-
),
9+
context=Context(system_prompt="You are a helpful AI assistant."),
1310
)
1411

1512
# Should have user message + AI response

0 commit comments

Comments
 (0)