Environment
-
Model:
gemini-2.5-flash-native-audio-preview-12-2025 -
API: Gemini Live API (WebSocket)
-
SDK:
@google/genai(npm)
-
Platform: React Native mobile app (iOS/Android)
-
Configuration: Ephemeral tokens with locked tool definitions,
functionCallingConfig: { mode: 'ANY' }or
mode: 'AUTO'
Issue Description
I’m experiencing intermittent WebSocket disconnections with close code 1008 when the model attempts to generate a function call. The error message is:
"Operation is not implemented, or supported, or enabled."
The issue occurs specifically when:
-
User requests an action that requires a function call.
-
The model begins processing and attempts to generate a function call
-
The connection is abruptly terminated before the function call is delivered to the client
Debug Information
From WebSocket close event logs:
json
{
“code”: 1008,
“reason”: “Operation is not implemented, or supported, or enabled.”,
“wasClean”: false
}
The last 5 messages received before the drop all show
hasToolCall: false
, indicating the function call never reached the client. The connection is terminated server-side during the generation phase.
What I’ve Verified
-
Tool definitions are correctly formatted and locked in the ephemeral token -
Audio format is correct (16-bit PCM, 16kHz, mono) -
Tool responses are properly formatted when sent back -
No client-side errors before disconnection -
Same configuration works successfully on other requests (issue is intermittent) -
Token is valid and not expired
What I’ve Tried
-
Switched to older model version
gemini-2.5-flash-native-audio-preview-09-2025→ This model doesn’t follow my instruction very well, specially tool calling. Tested with my ios app development build, the model did not make any tool calls, though claimed that AI made tool calls but no tool calling logs. so not a viable workaround.
-
Changed function calling mode from
AUTOto
ANY→ Same error occurs
-
Reduced system instruction size → No improvement
-
Added client-side error handling and timeout mechanisms → Confirms the issue is server-side
Reproducibility
-
Frequency: Approximately 1 in 5-10 function call attempts
-
Pattern: Can happen anytime, connection instantly drop before tool call even happened (AI announces plan to make a tool call)
-
Workaround: Reconnecting and retrying sometimes works, but user experience is degraded
Expected Behavior
The model should successfully return function calls without terminating the WebSocket connection.
Request
Could the team please investigate this issue? Is there a known limitation with the native audio preview models and function calling in Live API? Are there any recommended workarounds or alternative model versions that have stable function calling support?
Thank you for your help!