#22477: fix(voice-call): hardcode thinkLevel to off for latency-sensitive voice responses (#22423)
channel: voice-call
size: S
experienced-contributor
Cluster:
Elevated Default Configuration Fixes
## Summary
- **Bug**: Voice call responses use the global `thinkingDefault` instead of always disabling extended thinking
- **Root cause**: `generateVoiceResponse` in `response-generator.ts` called `resolveThinkingDefault()` which returns the user's global config default (e.g. `medium`)
- **Fix**: Hardcode `thinkLevel = "off"` for voice calls since they are latency-sensitive
Fixes #22423
## Problem
Voice calls are latency-sensitive — users expect near-instant spoken responses. However, `generateVoiceResponse()` was calling `deps.resolveThinkingDefault({ cfg, provider, model })` to determine the thinking level, which returns whatever the user configured globally (e.g. `"medium"`). This caused the LLM to spend time on extended thinking during voice calls, adding unnecessary latency.
**Before fix:**
```
thinkLevel = deps.resolveThinkingDefault({ cfg, provider, model })
// Returns "medium" (or whatever global default is) → slow voice responses
```
## Changes
- `extensions/voice-call/src/response-generator.ts` — Replace `resolveThinkingDefault()` call with hardcoded `"off" as const`
- `extensions/voice-call/src/response-generator.test.ts` — Add regression test verifying thinkLevel is always `"off"`
- `CHANGELOG.md` — Add fix entry
**After fix:**
```
thinkLevel = "off" as const
// Always "off" for voice calls → fast responses
```
## Test plan
- [x] New test: verifies `thinkLevel` passed to `runEmbeddedPiAgent` is `"off"` even when global default is `"medium"`
- [x] Test passes on fix branch
- [x] Test fails on main (confirmed bug: `expected 'medium' to be 'off'`)
- [x] Format check passes
- [x] Lint passes
## Effect on User Experience
**Before:** Voice call responses could be slow because the LLM spent time on extended thinking (e.g. `medium` level), adding latency to an inherently real-time interaction.
**After:** Voice calls always use `thinkLevel: "off"`, ensuring the fastest possible response time for phone conversations.
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Hardcoded `thinkLevel` to `"off"` in voice call responses to eliminate latency from extended thinking. The fix replaces a dynamic call to `resolveThinkingDefault()` (which returned user's global config like `"medium"`) with a hardcoded constant, ensuring voice calls always use the fastest response mode. Added regression test confirming `thinkLevel` is always `"off"` even when global default is `"medium"`.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- The fix is a single-line change with clear intent, well-documented rationale, and comprehensive test coverage. The change correctly addresses the latency issue by hardcoding `thinkLevel` to `"off"` for voice calls. The test validates the fix and would catch any regression. No syntax errors, no security concerns, and the change aligns with the stated goal of optimizing voice call latency.
- No files require special attention.
<sub>Last reviewed commit: 7a53a5e</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#18852: fix: Voice-call state persistence is fire-and-forget, causing silen...
by coygeek · 2026-02-17
72.4%
#21614: fix: warn when thinking level xhigh falls back for unsupported models
by lbo728 · 2026-02-20
71.9%
#18193: fix: default elevatedDefault to 'off' instead of 'on' (#18177)
by lailoo · 2026-02-16
71.4%
#10998: fix(agents): pass session thinking/reasoning levels to session_stat...
by wony2 · 2026-02-07
70.9%
#15606: LLM Task: add explicit thinking level wiring
by xadenryan · 2026-02-13
70.2%
#5992: Fix: /status shows correct think level when used with /think (fixes...
by simran122 · 2026-02-01
69.7%
#19595: fix: elevatedDefault should default to off when tools.elevated.enab...
by guirguispierre · 2026-02-18
69.4%
#23291: fix(tts): respect config auto=off over user prefs override
by SidQin-cyber · 2026-02-22
69.4%
#8251: fix(voice-call): remove redundant transcript from extraSystemPrompt
by geodeterra · 2026-02-03
69.2%
#23071: fix(tts): make config auto=off a hard-disable that overrides user p...
by hydro13 · 2026-02-22
68.9%