pub struct StreamOptions {
pub temperature: Option<f64>,
pub max_tokens: Option<u64>,
pub api_key: Option<String>,
pub headers: HashMap<String, String>,
pub thinking_budget: Option<u64>,
pub thinking_enabled: Option<bool>,
pub thinking_effort: Option<ThinkingEffort>,
pub thinking_display: Option<ThinkingDisplay>,
pub session_id: Option<String>,
pub cache_retention: Option<CacheRetention>,
}Fields§
§temperature: Option<f64>§max_tokens: Option<u64>§api_key: Option<String>§headers: HashMap<String, String>§thinking_budget: Option<u64>Extended thinking budget (Anthropic-specific non-adaptive path).
thinking_enabled: Option<bool>Explicit on/off for extended thinking.
None means provider default: if thinking_budget is set or (for
adaptive-thinking models) an effort is set, thinking is enabled.
Some(true) forces thinking on; on adaptive-thinking models this
triggers the adaptive path even without a budget. Some(false)
forces thinking off regardless of the other fields.
thinking_effort: Option<ThinkingEffort>Effort level for adaptive thinking (Anthropic-specific for now).
thinking_display: Option<ThinkingDisplay>Controls how thinking content is returned in the response
(Anthropic-specific for now). Defaults to Summarized when thinking
is enabled on the Anthropic provider.
session_id: Option<String>Opaque session identifier for provider-side prompt-cache affinity.
Currently used by the OpenAI provider as prompt_cache_key so
consecutive turns of the same conversation hit the same cache shard.
cache_retention: Option<CacheRetention>Prompt-cache retention hint. None defers to the provider default
(currently Short, with PI_CACHE_RETENTION=long env override
honoured by the OpenAI provider).
Trait Implementations§
Source§impl Clone for StreamOptions
impl Clone for StreamOptions
Source§fn clone(&self) -> StreamOptions
fn clone(&self) -> StreamOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more