From 779545d6616e887987aa9de104ece526ceb118b4 Mon Sep 17 00:00:00 2001 From: Shahin Saadati Date: Thu, 20 Aug 2026 09:31:26 -0700 Subject: [PATCH 1/2] Show maxLlmCalls in the RunConfig Kotlin tabs Two groups on the RunConfig page had a Kotlin tab that set only streamingMode while the Python, TypeScript and Java siblings also set max_llm_calls. The tab existed and every symbol in it was valid, so neither a symbol diff nor a missing-tab scan could see the gap - only comparing a tab's contents against its siblings. Also corrects the runtime-limits prose, which described the overflow error purely in Python terms. Kotlin rejects Int.MAX_VALUE the same way. The audio and speech group is deliberately left without a Kotlin tab: Kotlin's RunConfig carries only streamingMode, maxLlmCalls and customMetadata, so there is no speechConfig or responseModalities to show. --- docs/runtime/runconfig.md | 3 ++- examples/kotlin/snippets/runtime/RunConfigExample.kt | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/runtime/runconfig.md b/docs/runtime/runconfig.md index bd9a79c261..c29cda0836 100644 --- a/docs/runtime/runconfig.md +++ b/docs/runtime/runconfig.md @@ -322,7 +322,8 @@ Use these parameters to control runtime guardrails and debugging: - `max_llm_calls`: Caps the total number of LLM calls per run (default: 500). Set to 0 or negative for unlimited calls, though this is not recommended for - production. Values at or above `sys.maxsize` raises an error. + production. Passing your language's largest integer raises an error: + `sys.maxsize` in Python, `Int.MAX_VALUE` in Kotlin. - `save_input_blobs_as_artifacts`: When `True`, saves input blobs (e.g., uploaded files) as run artifacts for debugging and auditing. Deprecated in Python in favor of `SaveFilesAsArtifactsPlugin`. diff --git a/examples/kotlin/snippets/runtime/RunConfigExample.kt b/examples/kotlin/snippets/runtime/RunConfigExample.kt index 2aa3a397d5..56d20458ae 100644 --- a/examples/kotlin/snippets/runtime/RunConfigExample.kt +++ b/examples/kotlin/snippets/runtime/RunConfigExample.kt @@ -33,6 +33,8 @@ import kotlinx.coroutines.runBlocking val config = RunConfig( streamingMode = StreamingMode.SSE, + // Cap the LLM calls a single run may make. Defaults to 500. + maxLlmCalls = 200, ) // Pass it to runner.runAsync @@ -68,9 +70,11 @@ val metadataConfig = // --8<-- [end:custom_metadata] // --8<-- [start:streaming_config] +// Kotlin has no supportCfc equivalent; the other tabs set it alongside these. val streamingConfig = RunConfig( streamingMode = StreamingMode.SSE, + maxLlmCalls = 150, ) // --8<-- [end:streaming_config] From dfc4b3e0773c34bb5fdf1ca60e81e220ad1da113 Mon Sep 17 00:00:00 2001 From: Joe Fernandez <931947+joefernandez@users.noreply.github.com> Date: Fri, 28 Aug 2026 17:11:37 -0700 Subject: [PATCH 2/2] Update examples/kotlin/snippets/runtime/RunConfigExample.kt --- examples/kotlin/snippets/runtime/RunConfigExample.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/kotlin/snippets/runtime/RunConfigExample.kt b/examples/kotlin/snippets/runtime/RunConfigExample.kt index 56d20458ae..6ff9f7d258 100644 --- a/examples/kotlin/snippets/runtime/RunConfigExample.kt +++ b/examples/kotlin/snippets/runtime/RunConfigExample.kt @@ -70,7 +70,7 @@ val metadataConfig = // --8<-- [end:custom_metadata] // --8<-- [start:streaming_config] -// Kotlin has no supportCfc equivalent; the other tabs set it alongside these. +// Note: Kotlin currently has no supportCfc equivalent val streamingConfig = RunConfig( streamingMode = StreamingMode.SSE,