From 890fee10aa1f831cf9d9ea8a35b9768acc627d3d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Aug 2026 18:14:59 +0000 Subject: [PATCH 1/2] docs: add stream_idle_timeout_secs parameter to Google LLM services Added documentation for the new stream_idle_timeout_secs parameter in GoogleLLMService and GoogleVertexLLMService. This parameter controls how long to wait for the next chunk of a streamed response before timing out. Also updated the on_completion_timeout event handler description to note it fires for both DeadlineExceeded and stream idle timeouts. --- .../server/services/llm/google-vertex.mdx | 10 ++++++++++ api-reference/server/services/llm/google.mdx | 18 ++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/api-reference/server/services/llm/google-vertex.mdx b/api-reference/server/services/llm/google-vertex.mdx index c1deb075..d30ac771 100644 --- a/api-reference/server/services/llm/google-vertex.mdx +++ b/api-reference/server/services/llm/google-vertex.mdx @@ -124,6 +124,16 @@ Before using Google Vertex AI LLM services, you need: HTTP options for the Google AI client. + + How long to wait for the next chunk of a streamed response before giving up on + it. Bounds the wait when the API accepts a request and then stops producing + without closing the stream. This is a gap between chunks, not a limit on how + long a response may take overall. The first chunk is the slowest, since its + wait spans the whole round trip including any thinking the model does before it + emits anything; raise this for models configured to think at length. Set to + `None` to wait indefinitely. Inherited from `GoogleLLMService`. + + ## Usage ### Basic Setup diff --git a/api-reference/server/services/llm/google.mdx b/api-reference/server/services/llm/google.mdx index 520823a9..7b0ec67d 100644 --- a/api-reference/server/services/llm/google.mdx +++ b/api-reference/server/services/llm/google.mdx @@ -100,6 +100,16 @@ Before using Google Gemini LLM services, you need: HTTP options for the Google API client. + + How long to wait for the next chunk of a streamed response before giving up on + it. Bounds the wait when the API accepts a request and then stops producing + without closing the stream. This is a gap between chunks, not a limit on how + long a response may take overall. The first chunk is the slowest, since its + wait spans the whole round trip including any thinking the model does before it + emits anything; raise this for models configured to think at length. Set to + `None` to wait indefinitely. + + ### Settings Runtime-configurable settings passed via the `settings` constructor argument using `GoogleLLMService.Settings(...)`. These can be updated mid-conversation with `LLMUpdateSettingsFrame`. See [Service Settings](/pipecat/fundamentals/service-settings) for details. @@ -272,10 +282,10 @@ await worker.queue_frame( `GoogleLLMService` supports the following event handlers, inherited from [LLMService](/api-reference/server/events/service-events): -| Event | Description | -| --------------------------- | --------------------------------------------------------------------------- | -| `on_completion_timeout` | Called when an LLM completion request times out (Google `DeadlineExceeded`) | -| `on_function_calls_started` | Called when function calls are received and execution is about to start | +| Event | Description | +| --------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `on_completion_timeout` | Called when an LLM completion request times out (Google `DeadlineExceeded` or stream idle timeout reached) | +| `on_function_calls_started` | Called when function calls are received and execution is about to start | ```python @llm.event_handler("on_completion_timeout") From ced97d3c7f57ade025cefd91b07a1305483ffe8e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Aug 2026 18:15:43 +0000 Subject: [PATCH 2/2] chore: format with Prettier --- api-reference/server/services/llm/google-vertex.mdx | 4 ++-- api-reference/server/services/llm/google.mdx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api-reference/server/services/llm/google-vertex.mdx b/api-reference/server/services/llm/google-vertex.mdx index d30ac771..f6b83379 100644 --- a/api-reference/server/services/llm/google-vertex.mdx +++ b/api-reference/server/services/llm/google-vertex.mdx @@ -129,8 +129,8 @@ Before using Google Vertex AI LLM services, you need: it. Bounds the wait when the API accepts a request and then stops producing without closing the stream. This is a gap between chunks, not a limit on how long a response may take overall. The first chunk is the slowest, since its - wait spans the whole round trip including any thinking the model does before it - emits anything; raise this for models configured to think at length. Set to + wait spans the whole round trip including any thinking the model does before + it emits anything; raise this for models configured to think at length. Set to `None` to wait indefinitely. Inherited from `GoogleLLMService`. diff --git a/api-reference/server/services/llm/google.mdx b/api-reference/server/services/llm/google.mdx index 7b0ec67d..260861f5 100644 --- a/api-reference/server/services/llm/google.mdx +++ b/api-reference/server/services/llm/google.mdx @@ -105,8 +105,8 @@ Before using Google Gemini LLM services, you need: it. Bounds the wait when the API accepts a request and then stops producing without closing the stream. This is a gap between chunks, not a limit on how long a response may take overall. The first chunk is the slowest, since its - wait spans the whole round trip including any thinking the model does before it - emits anything; raise this for models configured to think at length. Set to + wait spans the whole round trip including any thinking the model does before + it emits anything; raise this for models configured to think at length. Set to `None` to wait indefinitely.