You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify voice-only scoping of maxTokens and SOUL.md config
Add inline comments and explicit default agent to config examples
making it unmistakable that the 512-token cap only applies to the
voice-assistant channel. Other channels (Telegram, WhatsApp, Discord)
are completely unaffected and keep the standard 8192 default.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: RASPBERRY-PI-SETUP.md
+19-4Lines changed: 19 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -477,11 +477,13 @@ Speech rules:
477
477
478
478
Add the following to `~/.openclaw/openclaw.json`:
479
479
480
-
```json
480
+
```json5
481
481
{
482
482
"agents": {
483
483
"defaults": {
484
484
"models": {
485
+
// Voice-only model key — only used by voice-agent below.
486
+
// Other agents (Telegram, WhatsApp, etc.) are NOT affected.
485
487
"anthropic/claude-sonnet-4-5-voice": {
486
488
"params": {
487
489
"maxTokens":512
@@ -490,6 +492,14 @@ Add the following to `~/.openclaw/openclaw.json`:
490
492
}
491
493
},
492
494
"list": [
495
+
// Default agent — used by Telegram, WhatsApp, Discord, etc.
496
+
// No model override → uses the global default (8192 maxTokens).
497
+
{
498
+
"id":"main",
499
+
"default":true
500
+
},
501
+
// Voice-only agent — ONLY used when channel matches "voice-assistant".
502
+
// Gets the 512-token cap via the dedicated model key above.
493
503
{
494
504
"id":"voice-agent",
495
505
"workspace":"~/.openclaw/workspaces/voice-agent",
@@ -498,6 +508,8 @@ Add the following to `~/.openclaw/openclaw.json`:
498
508
]
499
509
},
500
510
"bindings": [
511
+
// This binding scopes voice-agent to the voice-assistant channel ONLY.
512
+
// All other channels fall through to the default "main" agent.
501
513
{
502
514
"agentId":"voice-agent",
503
515
"match": {
@@ -508,11 +520,14 @@ Add the following to `~/.openclaw/openclaw.json`:
508
520
}
509
521
```
510
522
511
-
This routes all voice-assistant messages to the `voice-agent` (with the conversational SOUL.md), while Telegram and other channels continue using the default agent with normal rich-text responses.
523
+
**Scoping:** The 512-token limit ONLY applies to the voice channel. Here's why:
512
524
513
-
**Why a separate model key?** OpenClaw's `maxTokens` is set per-model, not per-agent. By creating a dedicated model key (`anthropic/claude-sonnet-4-5-voice`), the voice agent gets a hard 512-token ceiling while other channels keep their default limit (8192). Both keys route to the same underlying Anthropic model — the key is just OpenClaw's internal routing identifier. Combined with the SOUL.md conciseness instructions, this ensures voice responses stay short and natural for TTS.
525
+
1. The model key `anthropic/claude-sonnet-4-5-voice` (with `maxTokens: 512`) is just an entry in the model catalog — it does nothing unless an agent explicitly references it.
526
+
2. Only `voice-agent` sets `"model": "anthropic/claude-sonnet-4-5-voice"`.
527
+
3. Only the `voice-assistant` channel is bound to `voice-agent` (via the binding).
528
+
4. The default `main` agent (used by Telegram, WhatsApp, Discord, etc.) has no model override, so it uses the global default model with the standard 8192 maxTokens.
514
529
515
-
> **Tip:** If 512 tokens feels too restrictive (responses getting cut off), bump it to `768` or `1024`. For most spoken responses, 512 tokens (~3–5 sentences) is the sweet spot.
530
+
> **Tip:** If 512 tokens feels too restrictive (responses getting cut off), bump it to `768` or `1024`. For most spoken responses, 512 tokens (~3-5 sentences) is the sweet spot.
The dedicated model key (`-voice` suffix) inherits the same underlying model but gets its own `maxTokens`. Other channels keep their default limit. Start with 512 tokens and adjust up if responses feel cut off.
145
+
The 512-token cap ONLY applies to the voice channel. The model key is just a catalog entry — it does nothing unless an agent explicitly references it. Only `voice-agent` does, and only the `voice-assistant` channel is bound to it. All other channels fall through to the default `main` agent with its standard 8192 maxTokens. Start with 512 tokens and adjust up if responses feel cut off.
0 commit comments