You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases, an empty message is sent to the LLM but Anthropic's Claude does not allow that. It returns messages.12: all messages must have non-empty content except for the optional final assistant message error.
2025-01-21 15:40:05,457 - ERROR livekit.agents.pipeline - Error in _stream_synthesis_task
Traceback (most recent call last):
File "/Users/noah/livekit-cartesia-claude-deepgram/venv/lib/python3.13/site-packages/livekit/agents/utils/log.py", line 16, in async_fn_logs
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/noah/livekit-cartesia-claude-deepgram/venv/lib/python3.13/site-packages/livekit/agents/pipeline/agent_output.py", line 273, in _stream_synthesis_task
async for seg in tts_source:
...<9 lines>...
tts_stream.push_text(seg)
File "/Users/noah/livekit-cartesia-claude-deepgram/venv/lib/python3.13/site-packages/livekit/agents/utils/aio/itertools.py", line 47, in tee_peer
item = await iterator.__anext__()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/noah/livekit-cartesia-claude-deepgram/venv/lib/python3.13/site-packages/livekit/agents/pipeline/pipeline_agent.py", line 1055, in _llm_stream_to_str_generator
async for chunk in stream:
...<7 lines>...
yield content
File "/Users/noah/livekit-cartesia-claude-deepgram/venv/lib/python3.13/site-packages/livekit/agents/llm/llm.py", line 239, in __anext__
raise exc from None
File "/Users/noah/livekit-cartesia-claude-deepgram/venv/lib/python3.13/site-packages/livekit/agents/llm/llm.py", line 149, in _main_task
return await self._run()
^^^^^^^^^^^^^^^^^
File "/Users/noah/livekit-cartesia-claude-deepgram/venv/lib/python3.13/site-packages/livekit/plugins/anthropic/llm.py", line 234, in _run
raise APIStatusError(
...<4 lines>...
)
livekit.agents._exceptions.APIStatusError: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'messages.12: all messages must have non-empty content except for the optional final assistant message'}} {"pid": 9123, "job_id": "AJ_zFDs8T7P9A59"}
How to reproduce
It seems to be more easily reproducible when there is a lot of background noise. See details in this Slack thread.
The text was updated successfully, but these errors were encountered:
Description
In some cases, an empty message is sent to the LLM but Anthropic's Claude does not allow that. It returns
messages.12: all messages must have non-empty content except for the optional final assistant message
error.How to reproduce
It seems to be more easily reproducible when there is a lot of background noise. See details in this Slack thread.
The text was updated successfully, but these errors were encountered: