Struct ModelProviderRuntimeOptions
pub struct ModelProviderRuntimeOptions {Show 26 fields
pub auth_profile_override: Option<String>,
pub provider_kind: Option<String>,
pub provider_api_url: Option<String>,
pub zeroclaw_dir: Option<PathBuf>,
pub secrets_encrypt: bool,
pub reasoning_enabled: Option<bool>,
pub reasoning_effort: Option<String>,
pub reasoning_effort_passthrough: bool,
pub provider_timeout_secs: Option<u64>,
pub extra_headers: HashMap<String, String>,
pub api_path: Option<String>,
pub provider_max_tokens: Option<u32>,
pub merge_system_into_user: bool,
pub provider_extra: Option<Value>,
pub replay_assistant_reasoning: Option<bool>,
pub thinking_passthrough: bool,
pub cache_passthrough: bool,
pub cache_ttl: Option<CacheTtl>,
pub native_tools: Option<bool>,
pub wire_api: Option<String>,
pub think: Option<bool>,
pub vision: Option<bool>,
pub chat_template_kwargs: Option<Value>,
pub tls_ca_cert_path: Option<String>,
pub multimodal: MultimodalConfig,
pub tool_result_image_policy: ToolResultImagePolicy,
}Fields§
§auth_profile_override: Option<String>§provider_kind: Option<String>Explicit provider implementation from [providers.models.<family>.<alias>].kind.
When unset, provider resolution falls back to the configured family.
provider_api_url: Option<String>§zeroclaw_dir: Option<PathBuf>§secrets_encrypt: bool§reasoning_enabled: Option<bool>§reasoning_effort: Option<String>§reasoning_effort_passthrough: boolForward the runtime-configured reasoning_effort to every model on
OpenAI-compatible providers, bypassing the OpenAI-reasoning-family
name filter. Propagated from
ModelProviderConfig::reasoning_effort_passthrough.
provider_timeout_secs: Option<u64>HTTP request timeout in seconds for LLM model_provider API calls.
None uses the model_provider’s built-in default (120s for compatible model_providers).
extra_headers: HashMap<String, String>Extra HTTP headers to include in model_provider API requests.
api_path: Option<String>Custom API path suffix for OpenAI-compatible model_providers (e.g. “/v2/generate” instead of the default “/chat/completions”).
provider_max_tokens: Option<u32>Maximum output tokens for LLM model_provider API requests.
None uses the model_provider’s built-in default.
merge_system_into_user: boolWhen true, system messages are merged into the first user message before
sending. Propagated from ModelProviderConfig::merge_system_into_user.
provider_extra: Option<Value>Extra JSON parameters merged into API request bodies at the top level.
Propagated from ModelProviderConfig::provider_extra.
replay_assistant_reasoning: Option<bool>When Some(false), strip assistant reasoning fields from outbound
history replay. None honours provider default.
thinking_passthrough: boolForward Anthropic extended thinking through OpenAI-compatible
providers: inject the runtime thinking params as an Anthropic-shaped
thinking request object and normalize gateway thinking responses
for replay. Propagated from ModelProviderConfig::thinking_passthrough.
cache_passthrough: boolForward Anthropic prompt caching through OpenAI-compatible providers:
inject cache_control breakpoints (system prompt; rolling last
message) into request bodies and capture gateway-reported cache
usage. Propagated from ModelProviderConfig::cache_passthrough.
cache_ttl: Option<CacheTtl>Prompt-cache entry lifetime for providers that place Anthropic
cache markers (native Anthropic; compatible ones behind
cache_passthrough). None keeps the 5-minute default.
Propagated from ModelProviderConfig::cache_ttl.
native_tools: Option<bool>When set, the provider is asked to use its native tool-calling schema instead of OpenAI-compat tool calls. Generic across families.
wire_api: Option<String>Wire protocol to use for this provider.
Some("responses") routes the provider through the OpenResponses
/v1/responses API instead of chat_completions. None uses the
provider’s built-in default (chat_completions for most providers).
think: Option<bool>Enable or disable chain-of-thought thinking. Forwarded as
enable_thinking in the request body. None lets the model decide.
vision: Option<bool>Override the provider’s vision (image input) capability. None keeps
the provider family’s built-in default; Some(false) marks a text-only
model served by a vision-capable family as non-vision. Mapped from
ModelProviderConfig::vision.
chat_template_kwargs: Option<Value>Forwarded verbatim as a top-level chat_template_kwargs object in the
request body for OpenAI-compatible providers (folded into extra_body
by apply_compat_options). Consumed by chat-template-aware backends
such as vLLM, SGLang, and llama.cpp.
tls_ca_cert_path: Option<String>Path to a custom CA certificate file for TLS connections.
multimodal: MultimodalConfigThe configured [multimodal] policy.
Providers normalize image markers on their own boundary (a channel can
call chat with raw [IMAGE:<path>] markers that never passed through
the runtime), and that normalization now decodes pixels and applies
max_images / max_image_size_mb. Carrying the configured policy here
keeps that second pass on the same rules the runtime already applied,
instead of silently reverting to defaults and re-trimming history a
configured request had legitimately accepted.
tool_result_image_policy: ToolResultImagePolicyHow compatible chat-completions providers handle images a native
role=tool result declared in its attachments array; legacy tool
results (no array key) pass verbatim under both settings.
Trait Implementations§
Source§impl Clone for ModelProviderRuntimeOptions
impl Clone for ModelProviderRuntimeOptions
Source§fn clone(&self) -> ModelProviderRuntimeOptions
fn clone(&self) -> ModelProviderRuntimeOptions
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ModelProviderRuntimeOptions
impl Debug for ModelProviderRuntimeOptions
Auto Trait Implementations§
impl Freeze for ModelProviderRuntimeOptions
impl RefUnwindSafe for ModelProviderRuntimeOptions
impl Send for ModelProviderRuntimeOptions
impl Sync for ModelProviderRuntimeOptions
impl Unpin for ModelProviderRuntimeOptions
impl UnsafeUnpin for ModelProviderRuntimeOptions
impl UnwindSafe for ModelProviderRuntimeOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more