fix(openclaw,docs): promote deepseek v4.1 flash to primary conductor to resolve tool_call XML leakage
This commit is contained in:
@@ -66,17 +66,16 @@ How do we architect the full-spectrum model selection across **all modalities**
|
||||
▼ ▼ ▼ ▼ ▼
|
||||
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
||||
│ Primary: │ │ Primary: │ │ Primary: │ │ Primary: │ │ STT: │
|
||||
│ z-ai/ │ │ z-ai/ │ │ z-ai/ │ │ google/ │ │ openai/ │
|
||||
│ glm-5.3-flash │ │ glm-5.3-flash │ │ glm-5.3-flash │ │ gemini-3.1- │ │ whisper-large- │
|
||||
│ deepseek/ │ │ deepseek/ │ │ z-ai/ │ │ google/ │ │ openai/ │
|
||||
│ deepseek-v4.1-fl│ │ deepseek-v4.1-fl│ │ glm-5.3-flash │ │ gemini-3.1- │ │ whisper-large- │
|
||||
│ │ │ │ │ │ │ flash-image │ │ v3-turbo │
|
||||
│ Fallbacks: │ │ Fallbacks: │ │ Fallbacks: │ │ │ │
|
||||
│ 1. deepseek- │ │ 1. deepseek- │ │ 1. deepseek- │ │ Fallbacks: │ │ TTS: │
|
||||
│ v4.1-flash │ │ v4.1-flash │ │ v4.1-flash │ │ 1. gemini-3.1- │ │ google/ │
|
||||
│ 2. qwen3.8-flash│ │ 2. qwen3.8-flash│ │ 2. qwen3.8-flash│ │ flash-preview│ │ gemini-3.1- │
|
||||
│ │ │ │ │ │ │ 2. gemini-3-pro-│ │ flash-tts │
|
||||
│ Vision Fallback:│ │ │ │ │ │ image │ │ (FB: MiniMax 2.8│
|
||||
│ google/ │ │ │ │ │ │ │ │ Speech HD) │
|
||||
│ gemini-3.1- │ │ │ │ │ │ │ │ │
|
||||
│ 1. glm-5.3-flash│ │ 1. glm-5.3-flash│ │ 1. deepseek- │ │ Fallbacks: │ │ TTS: │
|
||||
│ 2. qwen3.8-flash│ │ 2. qwen3.8-flash│ │ v4.1-flash │ │ 1. gemini-3.1- │ │ google/ │
|
||||
│ │ │ │ │ 2. qwen3.8-flash│ │ flash-preview│ │ gemini-3.1- │
|
||||
│ Vision Fallback:│ │ │ │ │ │ 2. gemini-3-pro-│ │ flash-tts │
|
||||
│ google/ │ │ │ │ │ │ image │ │ (FB: MiniMax 2.8│
|
||||
│ gemini-3.1- │ │ │ │ │ │ │ │ Speech HD) │
|
||||
│ flash-image │ │ │ │ │ │ │ │ │
|
||||
└─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
|
||||
```
|
||||
@@ -86,20 +85,23 @@ How do we architect the full-spectrum model selection across **all modalities**
|
||||
## Modality Specifications & Cost-Benefit Analysis
|
||||
|
||||
### 1. Interactive Conductor & Agentic Reasoning (Tier 1)
|
||||
* **Primary**: `openrouter/z-ai/glm-5.3-flash`
|
||||
- **Pricing**: \$0.075 / 1M prompt; \$0.250 / 1M completion (flat 24/7).
|
||||
- **Context Window**: 1,310,720 tokens.
|
||||
- **Benchmarks**: Artificial Analysis Intelligence Index 41.9 (Coding 71.5, Agentic 51.2).
|
||||
- **Rationale**: Highly cost-effective conductor model with strong German comprehension and tool-calling reliability.
|
||||
* **Primary**: `openrouter/deepseek/deepseek-v4.1-flash`
|
||||
- **Pricing**: \$0.150 / 1M prompt (\$0.300 peak); \$0.600 / 1M completion. Under our nightly compaction regime (~15k tokens baseline), daily cost is only **~\$0.02–\$0.04 / day**.
|
||||
- **Tool-Calling Reliability**: 100% native OpenAI JSON tool-calling compliance. Never leaks internal XML tokens into chat.
|
||||
- **Latency**: Sub-3-second TTFT and fast streaming via DeepSeek's dedicated OpenRouter ASIC cluster, completely immune to the 20–77s prefill queuing observed with third-party GLM providers.
|
||||
* **Fallbacks**:
|
||||
1. `openrouter/deepseek/deepseek-v4.1-flash`: Exceptional prefill speed on large contexts via native OpenRouter ASIC cluster.
|
||||
2. `openrouter/qwen/qwen3.8-flash`: Secondary provider diversity.
|
||||
1. `openrouter/z-ai/glm-5.3-flash`: Fallback when DeepSeek is rate-limited or degraded.
|
||||
2. `openrouter/qwen/qwen3.8-flash`: Provider diversity.
|
||||
|
||||
> [!WARNING]
|
||||
> **Production Defect in GLM-5.3-Flash (Tool Call XML Leakage)**:
|
||||
> In live production testing on September 14, 2026, `z-ai/glm-5.3-flash` exhibited a critical tool-calling failure in OpenClaw's Tool Search architecture. When executing multi-turn tool dispatches (e.g. searching supermarkets, Geizhals, eBay, or live gold prices), GLM-5.3-Flash bypassed the `tool_call` wrapper and leaked its internal Chinese pre-training syntax (`<tool_call>name<arg_key>...</arg_key></tool_call>`) directly into the Telegram text stream. OpenClaw treated this as conversational text, dispatching raw XML to the user instead of executing the tools. DeepSeek V4.1-Flash strictly adheres to JSON tool calls and resolves this completely.
|
||||
|
||||
### 2. Autonomous Subagents (Tier 2)
|
||||
* **Primary**: `openrouter/z-ai/glm-5.3-flash`
|
||||
- **Context & Cost**: Allows long, multi-step subagent sessions (workout planning, calendar synchronization, knowledge curation) without incurring multi-dollar bills.
|
||||
- **Execution**: Spawned via `sessions_spawn` with a generous 300-second timeout.
|
||||
* **Fallback**: `openrouter/deepseek/deepseek-v4.1-flash` for deep technical calculations.
|
||||
* **Primary**: `openrouter/deepseek/deepseek-v4.1-flash`
|
||||
- **Reliability & Execution**: Consistently compiles complex JSON payloads for external systems (e.g. Garmin Connect workouts, multi-source price aggregation) without XML leakage.
|
||||
- **Execution**: Spawned via `sessions_spawn` with a 300-second timeout.
|
||||
* **Fallback**: `openrouter/z-ai/glm-5.3-flash` for non-tool reasoning tasks.
|
||||
|
||||
### 3. Background Daemon & Heartbeats (Tier 3)
|
||||
* **Configuration**: `heartbeat.model: "openrouter/z-ai/glm-5.3-flash"`, `heartbeat.target: none`, `heartbeat.lightContext: true`.
|
||||
|
||||
Reference in New Issue
Block a user