Repository navigation
fix(elevenlabs): set a request timeout on batch STT recognize - #8647
Merged
Merged
Conversation
longcw
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Batch
recognize()in the ElevenLabs STT posted without a timeout, so it used the session default (5 minutes for the sharedhttp_contextsession) andconn_options.timeouthad no effect. This applies the same timeout as the plugin's TTS:aiohttp.ClientTimeout(total=30, sock_connect=conn_options.timeout).Fixes #8646
post()inSTT._recognize_impltest_recognize_sets_a_request_timeout(fails without the change)Testing:
pytest tests/test_plugin_elevenlabs_stt.py --plugin elevenlabs: 132 passedruff check,ruff format --check,mypyon the plugin: cleanrecognize()returned after 40.0 s, after, it raisesAPITimeoutErrorafter 30.6 s. Not run against the live ElevenLabs API.tests/test_plugin_elevenlabs_tts.py::test_prewarm_stops_on_non_retryable_api_errorfails locally onmaintoo, without this change.