2026-04-25 — ChatContext.messages() + SynthesizeStream/ChunkedStream tts+conn_options init
Description
Two more livekit-agents 1.5+ API drift fixes surfaced after PR-K's sync-method fix deployed:
File "/app/custom_plugins/bedrock_mistral_llm.py", line 122, in _build_messages
for msg in chat_ctx.messages:
TypeError: 'method' object is not iterable
File "/app/custom_plugins/voxtral_tts.py", line 206, in __init__
super().__init__()
TypeError: SynthesizeStream.__init__() missing 2 required keyword-only arguments: 'tts' and 'conn_options'What changed
voice/agent/custom_plugins/bedrock_mistral_llm.py
_build_messages:chat_ctx.messages→chat_ctx.messages(). ChatContext.messages was a list-attribute pre-1.5; it's now a regular method (filters items to ChatMessage instances). Verified atlivekit/agents/llm/chat_context.py:403— it has no@propertydecorator, just a plaindef messages(self) -> list[ChatMessage].
voice/agent/custom_plugins/voxtral_tts.py
VoxtralChunkedStream.__init__: acceptstts: Any, conn_options: Any(keyword-only, required) and forwardssuper().__init__(tts=tts, input_text=text, conn_options=conn_options). Parenttts.ChunkedStream.__init__(*, tts: TTS, input_text: str, conn_options: APIConnectOptions)requires all three.VoxtralSynthesizeStream.__init__: acceptstts: Any, conn_options: Anyand forwardssuper().__init__(tts=tts, conn_options=conn_options). Parenttts.SynthesizeStream.__init__(*, tts: TTS, conn_options: APIConnectOptions)requires both.VoxtralTTS.synthesize: same sync-fix as PR-K'sstream(wasasync def synthesize(self, text: str), nowdef synthesize(self, text, *, conn_options=None, **kwargs)). Forwardstts=self, conn_options=conn_optionstoVoxtralChunkedStream. Body otherwise unchanged.VoxtralTTS.stream: now also forwardstts=self, conn_options=conn_optionstoVoxtralSynthesizeStream(PR-K added theconn_optionsaccept; this PR adds the forwarding to satisfy the parent init).
voice/tests/conftest.py
_ChunkedStream.__init__: now acceptstts=None, input_text="", conn_options=None, **kwargsto match the new parent signature. Body unchanged (still mocks event channel)._SynthesizeStream.__init__: now acceptstts=None, conn_options=None, **kwargs. Body unchanged.
voice/tests/test_bedrock_mistral_llm.py
_make_chat_contexthelper:ctx.messages = [...](list attribute) →ctx.messages = lambda: msg_list(callable). Mirrors the newChatContext.messages()method shape so the test's stub matches what the production code now expects.
voice/tests/test_voxtral_tts.py
TestVoxtralSynthesizeStreamInit(3 tests): direct instantiations ofVoxtralSynthesizeStream(...)now also passtts=None, conn_options=Noneto satisfy the new required kwargs.
Cross-check (read-only)
Source of truth confirmed in the running container:
livekit/agents/llm/chat_context.py:387–410—class ChatContextwith@property def itemsand plaindef messages(self) -> list[ChatMessage]livekit/agents/tts/tts.py:174—ChunkedStream.__init__(*, tts: TTS, input_text: str, conn_options: APIConnectOptions)livekit/agents/tts/tts.py:422—SynthesizeStream.__init__(*, tts: TTS, conn_options: APIConnectOptions)
Why now
Surfaced during R-10 #670 E2E re-probe right after PR-K (#694, sync chat/stream) deployed. With LLM/TTS now sync, the framework reaches the actual call path and immediately hits both bugs. Same class of API drift as PR-I/J/K.
Test plan
- CI: 4 BedrockMistralLLM tests + 3 VoxtralSynthesizeStream tests still pass with the new signatures.
- Image rebuild + recreate on EC2.
- R-10 Probe 2 re-run: no
'method' object is not iterable, noSynthesizeStream.__init__() missing 2 required keyword-only arguments. Pipeline runs LLM call (Bedrock streaming) and TTS synth (Voxtral) to completion. - Probe receives non-silent audio response from the actual TTS pipeline (not framework placeholder). Pipeline log shows
output_guardstage firing on the LLM output.
Rollout / reversibility
Reversible via revert. EC2 rebuild + recreate (~10 s combined).
Out of scope
turn_detection= deprecation warning, production wiring — same as previous PRs in this series.
2026-04-25 — voxtral_tts.yaml stage-0 override moved to repo SSOT
Captures the EC2-live /models/voxtral-tts-config/voxtral_tts.yaml into voice/config/voxtral_tts.yaml and adds the bind-mount to vllm-voxtral. PR-D deliberately deferred this; with Tier-1 verification of the live file vs the upstream default, it is now safe to commit.
2026-04-25 — HF_TOKEN rotation
Rotated the leaked HF_TOKEN on EC2 (closes SSOT-10 #654). Old token revoked, replacement written to voice/.env on EC2 mode 600, voice-agent restarted clean and registered a fresh LiveKit worker without auth errors. Scrub-vs-accept on PR #631 history defaulted to Accept per the private-repo rationale in the issue body.