pub struct OpenCodeConfig {Show 15 fields
pub execution_mode: OpenCodeExecutionMode,
pub api_key: Option<String>,
pub provider: OpenCodeProvider,
pub timeout_secs: Option<u64>,
pub startup_timeout_secs: Option<u64>,
pub max_retries: Option<u32>,
pub max_tokens: Option<u32>,
pub temperature: Option<f32>,
pub stream: bool,
pub mcp_servers: Vec<OpenCodeMcpServer>,
pub mcp_config_mode: McpConfigMode,
pub agent_base_url: Option<String>,
pub session_title: Option<String>,
pub system_prompt: Option<String>,
pub variant: Option<String>,
}Fields§
§execution_mode: OpenCodeExecutionModeExecution path. Agent mode launches opencode serve.
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.
startup_timeout_secs: Option<u64>Maximum time to wait for opencode serve to become ready in agent mode.
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.
mcp_servers: Vec<OpenCodeMcpServer>MCP servers to register with the OpenCode agent.
mcp_config_mode: McpConfigModeControls whether Chimera MCP servers are merged with ambient OpenCode config or launched in an isolated explicit-only config environment.
agent_base_url: Option<String>Override the selected OpenCode provider’s base URL in agent mode.
session_title: Option<String>Initial title for sessions created in agent mode.
A fixed title suppresses OpenCode’s asynchronous title-generation turn.
system_prompt: Option<String>System prompt override passed to the agent session.
variant: Option<String>Provider/model variant name (for example reasoning presets like medium or high).
Implementations§
Source§impl OpenCodeConfig
impl OpenCodeConfig
Sourcepub fn builder() -> OpenCodeConfigBuilder
pub fn builder() -> OpenCodeConfigBuilder
Create an instance of OpenCodeConfig using the builder syntax
Source§impl OpenCodeConfig
impl OpenCodeConfig
pub fn capabilities(&self) -> BackendCapabilities
Trait Implementations§
Source§impl Clone for OpenCodeConfig
impl Clone for OpenCodeConfig
Source§fn clone(&self) -> OpenCodeConfig
fn clone(&self) -> OpenCodeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more