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..6ff9f7d258 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] +// Note: Kotlin currently has no supportCfc equivalent val streamingConfig = RunConfig( streamingMode = StreamingMode.SSE, + maxLlmCalls = 150, ) // --8<-- [end:streaming_config]