From 550937734443b98800a66e99ac4ae7ecb06a37e9 Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Fri, 8 May 2026 16:54:15 -0400 Subject: [PATCH] fix(gemini-live-vertex): disable NON_BLOCKING tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GeminiLiveVertexLLMService overrides _supports_non_blocking_tools to return False — Vertex AI's Gemini Live endpoint doesn't yet accept the NON_BLOCKING behavior field on function declarations or the scheduling field on FunctionResponse, and sending either breaks tool calling. Effect: function declarations sent to Vertex no longer carry NON_BLOCKING; FunctionResponses no longer carry scheduling: WHEN_IDLE. Users registering a function with cancel_on_interruption=False against Vertex get the same one-time logger.error + push_error the base class surfaces on Gemini 3.x. --- .../services/google/gemini_live/vertex/llm.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/pipecat/services/google/gemini_live/vertex/llm.py b/src/pipecat/services/google/gemini_live/vertex/llm.py index b02c18a60..42bd34f9a 100644 --- a/src/pipecat/services/google/gemini_live/vertex/llm.py +++ b/src/pipecat/services/google/gemini_live/vertex/llm.py @@ -238,6 +238,20 @@ class GeminiLiveVertexLLMService(GeminiLiveLLMService): "When using Vertex AI, the recommended approach is to use Google Cloud Storage for file handling. The Gemini File API is not directly supported in this context." ) + @property + def _supports_non_blocking_tools(self) -> bool: + """Vertex AI's Gemini Live endpoint does not yet support NON_BLOCKING tool calls. + + Override the base ``GeminiLiveLLMService`` getter to disable the + NON_BLOCKING ``behavior`` field on function declarations and the + ``scheduling`` field on FunctionResponse for Vertex sessions — + sending either appears to break tool calling against Vertex. + Users hitting this on a function registered with + ``cancel_on_interruption=False`` will see the same one-time + warning the base class surfaces for unsupported models. + """ + return False + @staticmethod def _get_credentials( credentials: str | None, credentials_path: str | None