pub struct LlmOpts {
pub model: String,
pub base_url: Option<String>,
pub api_key: Option<String>,
pub temperature: Option<f64>,
pub endpoint: LlmEndpoint,
pub session_id: Option<String>,
pub effort: Option<String>,
pub retry: RetryPolicy,
}Fields§
§model: String§base_url: Option<String>§api_key: Option<String>§temperature: Option<f64>Sampling temperature. No CLI flag surfaces it yet; a library embedder
that builds LlmOpts directly can set it.
endpoint: LlmEndpoint§session_id: Option<String>Stable per-conversation id, sent as x-opencode-session for providers
(e.g. OpenCode Go) that route/cache on it. None = header omitted.
effort: Option<String>Free-style reasoning effort. None = send nothing (backends that reject
unknown fields keep working). Some(level) fans out per endpoint in
build_request(): Chat forwards any string verbatim under
reasoning_effort, while the Responses endpoint validates client-side
against none|minimal|low|medium|high|xhigh|max (rig’s typed enum) — a
value outside that set fails with a clear error before the request.
retry: RetryPolicyRetry policy for the connect phase (transient failures). See
RetryPolicy.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LlmOpts
impl RefUnwindSafe for LlmOpts
impl Send for LlmOpts
impl Sync for LlmOpts
impl Unpin for LlmOpts
impl UnsafeUnpin for LlmOpts
impl UnwindSafe for LlmOpts
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
Mutably borrows from an owned value. Read more