pub struct ProviderConfig {
pub npm: Option<String>,
pub name: Option<String>,
pub options: Option<HashMap<String, Value>>,
pub models: Option<HashMap<String, ModelConfig>>,
pub disabled: Option<bool>,
pub extra: HashMap<String, Value>,
}Expand description
Provider configuration.
This is the core type for the provider manager, representing a single
provider entry in opencode.json under the provider key.
Fields§
§npm: Option<String>NPM package for custom providers (e.g., “@ai-sdk/openai-compatible”).
name: Option<String>Display name for the provider in the UI.
options: Option<HashMap<String, Value>>Provider-specific options (baseURL, apiKey, timeout, etc.).
models: Option<HashMap<String, ModelConfig>>Models available under this provider.
disabled: Option<bool>Provider-specific disabled flag.
extra: HashMap<String, Value>Unknown provider fields preserved during import/round-trip.
Trait Implementations§
Source§impl Clone for ProviderConfig
impl Clone for ProviderConfig
Source§fn clone(&self) -> ProviderConfig
fn clone(&self) -> ProviderConfig
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 ProviderConfig
impl Debug for ProviderConfig
Source§impl Default for ProviderConfig
impl Default for ProviderConfig
Source§fn default() -> ProviderConfig
fn default() -> ProviderConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProviderConfig
impl<'de> Deserialize<'de> for ProviderConfig
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
Source§impl Mergeable for ProviderConfig
impl Mergeable for ProviderConfig
Source§impl PartialEq for ProviderConfig
impl PartialEq for ProviderConfig
Source§impl Serialize for ProviderConfig
impl Serialize for ProviderConfig
impl StructuralPartialEq for ProviderConfig
Auto Trait Implementations§
impl Freeze for ProviderConfig
impl RefUnwindSafe for ProviderConfig
impl Send for ProviderConfig
impl Sync for ProviderConfig
impl Unpin for ProviderConfig
impl UnsafeUnpin for ProviderConfig
impl UnwindSafe for ProviderConfig
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