Skip to content

fix(voice): apply max_unrecoverable_errors tolerance to STT errors#5666

Open
AKomplished-bug wants to merge 1 commit intolivekit:mainfrom
AKomplished-bug:fix/stt-error-tolerance-5665
Open

fix(voice): apply max_unrecoverable_errors tolerance to STT errors#5666
AKomplished-bug wants to merge 1 commit intolivekit:mainfrom
AKomplished-bug:fix/stt-error-tolerance-5665

Conversation

@AKomplished-bug
Copy link
Copy Markdown

Fixes #5665

Problem

AgentSession._on_error applies max_unrecoverable_errors tolerance for llm_error and tts_error but not stt_error, which causes the session to close immediately on the first non-recoverable STT error.

Fix

Add _stt_error_counts following the same pattern as _llm_error_counts and _tts_error_counts — initialised in __init__, reset in _aclose_impl and when agent state transitions to speaking, and checked in _on_error before tearing down the session.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: STT errors close AgentSession immediately, lacking the tolerance counter that LLM and TTS errors have

1 participant