I’m building a real-time voice-driven live agent using the Gemini Live API via the Python ADK (google-genai). I’ve run into a persistent and confusing issue regarding function calling.
Problem
When the model decides to call one of my Pydantic tools, the WebSocket connection instantly crashes and closes with the following error:
google.genai.errors.APIError: 1008 None. Operation is not implemented, or supported, or enabled.
websockets.exceptions.ConnectionClosedError: received 1008 (policy violation) Operation is not implemented, or supported, or enabled.; then sent 1008 (policy violation) Operation is not implemented, or supported, or enabled.
This crash happens exactly at the moment the Gemini server attempts to dispatch the tool call back to our backend.
from pydantic import BaseModel, Field
# This schema causes a 1008 Crash during invocation
class ProcessActionSchema(BaseModel):
item_id: str = Field(description="The unique ID of the target item")
action_type: str = Field(description="The customization or action being performed")
quantity: int = Field(default=1, description="Quantity to process")
-
Is this a known limitation or bug with the current experimental Gemini Live API / ADK when sending or receiving specific tool call payloads over the real-time WebSocket?
-
Is there a specific configuration flag, connection parameter, or
system_instructionformatting rule I might be missing to properly enable robust function calling? -
How can I debug this further, given that the error message simply says “Operation is not implemented”?