RoutingLLMPromptExecutor

Parameters

clientRouter

Router responsible for selecting appropriate clients for each request

fallback

Optional fallback configuration when no client is available for the requested model

This class remains open for source and binary compatibility with existing subclasses. For new custom prompt executors, prefer extending ai.koog.prompt.executor.model.DynamicPromptExecutor. If you subclass this class, prefer overriding the ResolvedModel-based overloads. Override the LLModel-based overloads only when you intentionally take over the full model-resolution and execution flow.


Creates executor with a map of providers to their client lists. Uses RoundRobinRouter for load distribution.

Parameters

llmClients

Map of providers to lists of clients for each provider

fallback

Optional fallback configuration


constructor(vararg llmClients: LLMClient, fallback: RoutingLLMPromptExecutor.FallbackPromptExecutorSettings? = null)(source)

Creates executor with a list of clients. Clients are grouped by provider and routed using RoundRobinRouter.

Parameters

llmClients

Vararg clients to use

fallback

Optional fallback configuration