big-author-39928
11/27/2025, 10:59 AMsession.generate_reply()
(Doing this instead works await session.generate_reply(_instructions_=" ") )
I just discovered it works fine if we pass instructions, so maybe some bug/issue have crept in here?
(example where you guys do the same)
We are using Gemini realtime + Elevenlabs. This is working in 1.2.x but consistently happening in 1.3.1-1.3.5.
We are passing in chat_history, so ideally we don't want to pass another instructions.
./venv/bin/python main.py console
Agents Starting console mode 🚀
11:43:43 DEBUG asyncio Using selector: KqueueSelector
INFO livekit.agents starting worker {"version": "1.3.1", "rtc-version": "1.0.19"}
INFO livekit.agents initializing job runner {"tid": 51365078}
DEBUG asyncio Using selector: KqueueSelector
INFO livekit.agents job runner initialized {"tid": 51365078, "elapsed_time": 0.0}
INFO livekit-agent No metadata found, using test defaults
INFO livekit-agent Running in console mode, call_id: console-20251127-114343
DEBUG livekit.plugins… connecting to Gemini Realtime API...
DEBUG livekit.agents using audio io: `Console` -> `AgentSession` -> `Console`
WARNI… livekit.agents resume_false_interruption is enabled but audio output {"audio_output": "Console"}
does not support pause, it will be ignored
DEBUG livekit.agents using transcript io: `AgentSession` -> (none)
11:43:50 ERROR livekit.agents Error in _realtime_reply_task
Traceback (most recent call last):
File
"/Users/jensa/Development/projects/giant/livekit/livekit-agent/venv/lib/python3.1
3/site-packages/livekit/agents/utils/log.py", line 16, in async_fn_logs
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/jensa/Development/projects/giant/livekit/livekit-agent/venv/lib/python3.1
3/site-packages/livekit/agents/voice/agent_activity.py", line 2058, in
_realtime_reply_task
generation_ev = await self._rt_session.generate_reply(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
instructions=instructions or NOT_GIVEN
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
livekit.agents.llm.realtime.RealtimeError: generate_reply timed out waiting for
generation_created event.big-author-39928
11/27/2025, 11:04 AM2:03:23.886 WARNI… opentelemetry.a… Attribute websocket: Invalid type {"pid": 89065, "job_id":
ClientConnection for attribute value. "AJ_fnLp7T9rawga", "room_id":
Expected one of ['NoneType', 'bool', "RM_waiox5wEB3sb"}
'bytes', 'int', 'float', 'str',
'Sequence', 'Mapping'] or a sequence
of those types
12:03:23.937 WARNI… opentelemetry.a… Attribute websocket: Invalid type {"pid": 89065, "job_id":
ClientConnection for attribute value. "AJ_fnLp7T9rawga", "room_id":
Expected one of ['NoneType', 'bool', "RM_waiox5wEB3sb"}
'bytes', 'int', 'float', 'str',
'Sequence', 'Mapping'] or a sequence
of those types
12:03:23.987 WARNI… opentelemetry.a… Attribute websocket: Invalid type {"pid": 89065, "job_id":
ClientConnection for attribute value. "AJ_fnLp7T9rawga", "room_id":
Expected one of ['NoneType', 'bool', "RM_waiox5wEB3sb"}
'bytes', 'int', 'float', 'str',
'Sequence', 'Mapping'] or a sequence
of those typestall-morning-86835
11/30/2025, 4:41 AMtall-morning-86835
11/30/2025, 1:35 PMlivekit.agents.llm.realtime.RealtimeError: generate_reply timed out waiting for generation_created event.
2025-11-30 19:00:36,595 - ERROR asyncio - Task exception was never retrieved
future: <Task finished name='AgentActivity.realtime_reply' coro=<AgentActivity._create_speech_task.<locals>._context_aware_coro() done, defined at /Users/mohammedhasan/Github/Personal/agents/livekit-agents/livekit/agents/voice/agent_activity.py:367> exception=RealtimeError('generate_reply timed out waiting for generation_created event.')>
Traceback (most recent call last):
File "/Users/mohammedhasan/Github/Personal/agents/livekit-agents/livekit/agents/voice/agent_activity.py", line 371, in _context_aware_coro
return await coro
^^^^^^^^^^
File "/Users/mohammedhasan/Github/Personal/agents/livekit-agents/livekit/agents/utils/log.py", line 16, in async_fn_logs
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mohammedhasan/Github/Personal/agents/livekit-agents/livekit/agents/voice/agent_activity.py", line 1942, in _realtime_reply_task
generation_ev = await self._rt_session.generate_reply(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
instructions=instructions or NOT_GIVEN
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
livekit.agents.llm.realtime.RealtimeError: generate_reply timed out waiting for generation_created event.
[Audio] cBook Air Microphone [-61.32 dBFS] [####--------------------------]%big-author-39928
12/01/2025, 7:18 AM" " ie empty string with space, just empty string will get evaluated as NOT_GIVENtall-morning-86835
12/01/2025, 7:31 AMtall-morning-86835
12/01/2025, 7:32 AM