pub struct ProviderConfig {
pub api_key: Option<String>,
pub azure: Option<ProviderConfigAzure>,
pub base_url: String,
pub bearer_token: Option<String>,
pub headers: Option<HashMap<String, String>>,
pub max_context_window_tokens: Option<f64>,
pub max_output_tokens: Option<f64>,
pub max_prompt_tokens: Option<f64>,
pub model_id: Option<String>,
pub type: Option<ProviderConfigType>,
pub wire_api: Option<ProviderConfigWireApi>,
pub wire_model: Option<String>,
}Expand description
Custom model-provider configuration (BYOK).
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§api_key: Option<String>API key. Optional for local providers like Ollama.
azure: Option<ProviderConfigAzure>Azure-specific provider options.
base_url: StringAPI endpoint URL.
bearer_token: Option<String>Bearer token for authentication. Sets the Authorization header directly. Takes precedence over apiKey when both are set.
headers: Option<HashMap<String, String>>Custom HTTP headers to include in all outbound requests to the provider.
max_context_window_tokens: Option<f64>Maximum context window tokens for the model.
max_output_tokens: Option<f64>Maximum output tokens for the model.
max_prompt_tokens: Option<f64>Maximum prompt/input tokens for the model.
model_id: Option<String>Well-known model ID used for capability lookup. When set, agent behavior config and token limits are inferred from this model.
type: Option<ProviderConfigType>Provider type. Defaults to “openai” for generic OpenAI-compatible APIs.
wire_api: Option<ProviderConfigWireApi>Wire API format (openai/azure only). Defaults to “completions”.
wire_model: Option<String>The model identifier sent to the provider API for inference (the “wire” model), as opposed to modelId which is the well-known base.
Trait Implementations§
Source§impl Clone for ProviderConfig
impl Clone for ProviderConfig
Source§fn clone(&self) -> ProviderConfig
fn clone(&self) -> ProviderConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more