Gemini Realtime API error: 1007 None. The audio content type (CONTENT_TYPE_AUDIO) is not supported for this model

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)

5. Error I see in LiveKit’s session’s logs

1 session —

2 session —

3 session —

4 session —

Thank you in advance

One thing worth ruling out before you keep digging: this isn’t audio leaking into the chat context. _provider_format/google.py drops AudioContent outright (elif isinstance(content, llm.AudioContent): pass), so the re-seeded turns are text-only by construction. Worth knowing, since that’s the obvious suspect for an audio-content-type error and it’s a dead end.

The question that would split this cleanly: does the 1007 land immediately after a connecting to Gemini Realtime API… line, or mid-stream during a turn?
The plugin re-seeds the whole chat context via send_client_content on every connect (realtime_api.py ~L947), so a failure at that point is a completely different path from one on live audio input. Your screenshots show the error but not what precedes it that one line above it decides which half to look at.

If it is the re-seed, #5985 is worth reading. Different model and different message, but the same mechanism: the re-seed is redundant since session_resumption is always sent and the server restores context anyway, and it turns a routine reconnect into a 1007 loop.

Also worth confirming your actual installed version ~=1.5 allows anything in 1.x, so pip show livekit-agents livekit-plugins-google would tell us whether you’re on 1.7.0 or still back where #5985 was filed.

I’m also wondering exactly how to reproduce this? That error is coming from the model