pub struct RequestOptions {
pub response_format: ResponseFormat,
pub reasoning_effort: Option<String>,
pub single_attempt: bool,
pub fallback_when_unspent: bool,
pub cache_key: Option<String>,
}Expand description
How a provider should answer, beyond the messages and tools. Providers map what their API supports and ignore the rest.
Fields§
§response_format: ResponseFormat§reasoning_effort: Option<String>Provider-neutral reasoning effort: "low", "medium" or "high";
"off" turns reasoning off. None keeps the provider’s default.
single_attempt: boolExactly one attempt: providers skip their own internal retries, and
Retry and crate::Failover give up at the first error. For a
call that must not run twice.
fallback_when_unspent: boolWith single_attempt, lets a crate::Failover chain move on to
its next step after an error that proves the attempt used nothing
(ProviderError::proves_nothing_spent) or after the policy
refused the attempt before sending it. Any other error still ends
the chain, and no step is retried. For a call charged against a
fixed budget, where unknown spend must not be repeated.
cache_key: Option<String>Identifies the conversation for providers that route prompt-cache lookups by key, so its calls reach the same cache. Only a routing hint: providers that do not route by key ignore it.