pub struct OpenCodeConfig {
pub api_key: Option<String>,
pub provider: OpenCodeProvider,
pub timeout_secs: Option<u64>,
pub max_retries: Option<u32>,
pub max_tokens: Option<u32>,
pub temperature: Option<f32>,
pub stream: bool,
}Fields§
§api_key: Option<String>API key for bearer auth. Falls back to OPENCODE_ZEN_KEY / OPENCODE_API_KEY env vars.
provider: OpenCodeProviderProvider selection.
timeout_secs: Option<u64>HTTP request timeout in seconds.
max_retries: Option<u32>Maximum retry attempts for transient errors (429, 5xx).
max_tokens: Option<u32>Maximum tokens in the completion response.
temperature: Option<f32>Sampling temperature.
stream: boolEnable SSE streaming responses.
Implementations§
Source§impl OpenCodeConfig
impl OpenCodeConfig
Sourcepub fn builder() -> OpenCodeConfigBuilder
pub fn builder() -> OpenCodeConfigBuilder
Create an instance of OpenCodeConfig using the builder syntax
Trait Implementations§
Source§impl Clone for OpenCodeConfig
impl Clone for OpenCodeConfig
Source§fn clone(&self) -> OpenCodeConfig
fn clone(&self) -> OpenCodeConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OpenCodeConfig
impl Debug for OpenCodeConfig
Source§impl Default for OpenCodeConfig
impl Default for OpenCodeConfig
Source§impl<'de> Deserialize<'de> for OpenCodeConfig
impl<'de> Deserialize<'de> for OpenCodeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OpenCodeConfig
impl RefUnwindSafe for OpenCodeConfig
impl Send for OpenCodeConfig
impl Sync for OpenCodeConfig
impl Unpin for OpenCodeConfig
impl UnsafeUnpin for OpenCodeConfig
impl UnwindSafe for OpenCodeConfig
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