openclaw - ✅(Solved) Fix [Bug]: voice-call responseModel config ignored — LiveSessionModelSwitchError overrides to global default [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#60118Fetched 2026-04-08 02:36:02
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
referenced ×3cross-referenced ×1

Error Message

[voice-call] Response generation failed: LiveSessionModelSwitchError: Live session model switch requested: anthropic/claude-opus-4-6

Root Cause

In response-generator.ts:219-224, the responseModel is correctly resolved:

const modelRef = voiceConfig.responseModel || `${agentRuntime.defaults.provider}/${agentRuntime.defaults.model}`;

But runEmbeddedPiAgent() internally calls resolveLiveSessionModelSelection() which reads from the session store or global defaults — not from the passed provider/model parameters. When it detects a mismatch, it aborts with LiveSessionModelSwitchError.

Fix Action

Workaround

Manually pin the session's providerOverride and modelOverride in the session store before calling runEmbeddedPiAgent():

if (voiceConfig.responseModel && sessionEntry) {
  sessionEntry.providerOverride = provider;
  sessionEntry.modelOverride = model;
  await agentRuntime.session.saveSessionStore(storePath, sessionStore);
}

PR fix notes

PR #60119: fix(voice-call): pin session model to responseModel to prevent LiveSessionModelSwitchError

Description (problem / solution / changelog)

Summary

Fixes #60118

When the voice-call plugin's responseModel config is set to a fast model (e.g., openai/gpt-4o-mini or openai/gpt-4.1-nano) but the global agent default is a different model (e.g., anthropic/claude-opus-4-6), the embedded PI runner throws LiveSessionModelSwitchError and voice responses silently fail.

Root Cause

runEmbeddedPiAgent() internally calls resolveLiveSessionModelSelection() which resolves the global default model from the session store. When this differs from the provider/model parameters passed by voice-call's response generator, it throws LiveSessionModelSwitchError.

Fix

Before calling runEmbeddedPiAgent(), write providerOverride and modelOverride into the voice session entry so the live session model selection matches the configured responseModel.

Impact

  • Voice calls now correctly use the configured responseModel regardless of the global default
  • Enables using fast models (gpt-4o-mini, gpt-4.1-nano) for voice responses while keeping heavier models as the global default
  • Critical for voice call usability — the latency difference between claude-opus (~5-7s) and gpt-4.1-nano (~0.3s) makes or breaks phone conversations

Testing

  1. Set global default to anthropic/claude-opus-4-6
  2. Set responseModel: "openai/gpt-4.1-nano" in voice-call config
  3. Make an outbound conversation call
  4. Verify: caller speaks → STT transcribes → agent responds with voice (no LiveSessionModelSwitchError in logs)

Changed files

  • extensions/voice-call/src/response-generator.ts (modified, +7/-0)

Code Example

[voice-call] Response generation failed: LiveSessionModelSwitchError: Live session model switch requested: anthropic/claude-opus-4-6

---

const modelRef = voiceConfig.responseModel || `${agentRuntime.defaults.provider}/${agentRuntime.defaults.model}`;

---

if (voiceConfig.responseModel && sessionEntry) {
  sessionEntry.providerOverride = provider;
  sessionEntry.modelOverride = model;
  await agentRuntime.session.saveSessionStore(storePath, sessionStore);
}
RAW_BUFFERClick to expand / collapse

Bug Description

The voice-call plugin's responseModel config option is ignored at runtime. When responseModel is set to a fast model (e.g., openai/gpt-4o-mini or openai/gpt-4.1-nano) but the global agent default model is different (e.g., anthropic/claude-opus-4-6), the embedded PI runner throws LiveSessionModelSwitchError and the voice response is never generated.

Steps to Reproduce

  1. Set global default model to anthropic/claude-opus-4-6 in openclaw.json
  2. Configure voice-call plugin with responseModel: "openai/gpt-4o-mini"
  3. Enable streaming (STT + TTS)
  4. Make an outbound call in conversation mode
  5. Caller speaks — STT transcribes successfully
  6. Response generation fails with:
[voice-call] Response generation failed: LiveSessionModelSwitchError: Live session model switch requested: anthropic/claude-opus-4-6

Expected Behavior

The voice-call plugin should use the model specified in responseModel config for generating voice responses, regardless of the global default model. Voice conversations need fast models (gpt-4o-mini, gpt-4.1-nano) for acceptable latency — forcing claude-opus adds 3-5 seconds per turn, making phone calls unusable.

Actual Behavior

resolveLiveSessionModelSelection() in live-model-switch.ts resolves the global default model (claude-opus), detects a mismatch with the responseModel passed to runEmbeddedPiAgent(), and throws LiveSessionModelSwitchError. The response is never generated, and the caller hears silence.

Root Cause Analysis

In response-generator.ts:219-224, the responseModel is correctly resolved:

const modelRef = voiceConfig.responseModel || `${agentRuntime.defaults.provider}/${agentRuntime.defaults.model}`;

But runEmbeddedPiAgent() internally calls resolveLiveSessionModelSelection() which reads from the session store or global defaults — not from the passed provider/model parameters. When it detects a mismatch, it aborts with LiveSessionModelSwitchError.

Workaround

Manually pin the session's providerOverride and modelOverride in the session store before calling runEmbeddedPiAgent():

if (voiceConfig.responseModel && sessionEntry) {
  sessionEntry.providerOverride = provider;
  sessionEntry.modelOverride = model;
  await agentRuntime.session.saveSessionStore(storePath, sessionStore);
}

Environment

  • OpenClaw version: 2026.3.28 (f9b1079)
  • macOS (Apple Silicon)
  • Voice-call plugin with Twilio provider
  • Streaming enabled (OpenAI Realtime STT + ElevenLabs TTS)

Impact

This bug makes voice calls practically unusable when the global default model is a high-latency model like claude-opus. Users cannot use fast models for voice responses even though the responseModel config exists for exactly this purpose.

Suggested priority: p1 — voice-call is non-functional for users with non-OpenAI default models.

extent analysis

TL;DR

Manually pinning the session's providerOverride and modelOverride in the session store before calling runEmbeddedPiAgent() may resolve the issue.

Guidance

  • Verify that the responseModel config option is correctly set in the voice-call plugin configuration.
  • Check the session store to ensure that the providerOverride and modelOverride are being set correctly before calling runEmbeddedPiAgent().
  • Apply the provided workaround by manually setting sessionEntry.providerOverride and sessionEntry.modelOverride based on the voiceConfig.responseModel before saving the session store.
  • Test the voice-call functionality with the workaround to ensure that the response is generated correctly.

Example

if (voiceConfig.responseModel && sessionEntry) {
  sessionEntry.providerOverride = provider;
  sessionEntry.modelOverride = model;
  await agentRuntime.session.saveSessionStore(storePath, sessionStore);
}

Notes

The provided workaround may not be a permanent solution and may need to be revisited in future updates. Additionally, this issue may be specific to the OpenClaw version (2026.3.28) and the voice-call plugin with Twilio provider.

Recommendation

Apply the workaround to manually pin the session's providerOverride and modelOverride in the session store before calling runEmbeddedPiAgent(), as this is the most direct way to resolve the issue given the current information.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: voice-call responseModel config ignored — LiveSessionModelSwitchError overrides to global default [1 pull requests, 1 participants]