1. Error
Hi, I had reported this exact same error a while back (Kindly view here)and since then it was working temporarily
2. Context
- My observations remain same that I am still not able to figure out when and due to what this error occurs but recently tokay(from past 6 hours) I have been rigorously testing my application and it occurred in 95% of the sessions(mainly within 1-3 message exchanges)! I’m kinda burnt out, lol
- The only model I am using is → REALTIME_MODEL = “gemini-2.5-flash-native-audio-preview-12-2025”
- My application allows both TEXT and real time AUDIO input/conversation using Gemini Live Api and LiveKit
3. My pyproject.toml
requires-python = ">=3.10,<3.14"
dependencies = [
"livekit-agents[google]~=1.5",
"google-genai>=1.30.0",
"python-dotenv>=1.0.0",
"flask>=3.1.3",
"livekit-api>=1.1.0",
"flask-cors>=6.0.2",
"llama-index-vector-stores-qdrant>=0.10.1",
"qdrant-client>=1.18.0",
"fastembed>=0.8.0",
]
- NOTE: I am no more using qdrant or fastembed. My application consists of only one agent.py file
4. Here is my entrypoint/session code
server = AgentServer()
@server.rtc_session(agent_name="agent-xyz")
async def entrypoint(ctx: agents.JobContext):
await ctx.connect()
participant = await ctx.wait_for_participant()
web_identity = participant.identity
logger.info(f"Frontend participant connected: {web_identity}")
session = AgentSession(
llm=google.realtime.RealtimeModel(
model=REALTIME_MODEL,
voice="Puck",
),
)
agent = MyAgentClass(room=ctx.room, web_identity=web_identity, agent_session=session)
# logger.info(f"Model: {REALTIME_MODEL}")
logger.info("Starting AUDIO native session")
# agent.start(ctx.room, participant)
await session.start(
room=ctx.room,
agent=agent,
)
# try:
# await session.generate_reply(
# instructions="Greet the user"
# )
# except Exception as exc:
# logger.warning("Initial greeting failed: %s", exc)
if __name__ == "__main__":
agents.cli.run_app(server)



