mirror of https://github.com/openclaw/openclaw.git
Adds support for template variables in `messages.responsePrefix` that
resolve dynamically at runtime with the actual model used (including
after fallback).
Supported variables (case-insensitive):
- {model} - short model name (e.g., "claude-opus-4-5", "gpt-4o")
- {modelFull} - full model identifier (e.g., "anthropic/claude-opus-4-5")
- {provider} - provider name (e.g., "anthropic", "openai")
- {thinkingLevel} or {think} - thinking level ("high", "low", "off")
- {identity.name} or {identityName} - agent identity name
Example: "[{model} | think:{thinkingLevel}]" → "[claude-opus-4-5 | think:high]"
Variables show the actual model used after fallback, not the intended
model. Unresolved variables remain as literal text.
Implementation:
- New module: src/auto-reply/reply/response-prefix-template.ts
- Template interpolation in normalize-reply.ts via context provider
- onModelSelected callback in agent-runner-execution.ts
- Updated all 6 provider message handlers (web, signal, discord,
telegram, slack, imessage)
- 27 unit tests covering all variables and edge cases
- Documentation in docs/gateway/configuration.md and JSDoc
Fixes #923
|
||
|---|---|---|
| .. | ||
| _layouts | ||
| assets | ||
| automation | ||
| channels | ||
| cli | ||
| concepts | ||
| experiments | ||
| gateway | ||
| images | ||
| install | ||
| nodes | ||
| platforms | ||
| plugins | ||
| providers | ||
| refactor | ||
| reference | ||
| start | ||
| tools | ||
| web | ||
| CNAME | ||
| _config.yml | ||
| bedrock.md | ||
| broadcast-groups.md | ||
| compaction.md | ||
| debugging.md | ||
| docs.json | ||
| environment.md | ||
| index.md | ||
| logging.md | ||
| multi-agent-sandbox-tools.md | ||
| plugin.md | ||
| scripts.md | ||
| testing.md | ||
| token-use.md | ||
| tui.md | ||
| whatsapp-clawd.jpg | ||