pub struct ProviderOverrideConfig {
pub models: Vec<String>,
pub base_url: Option<String>,
pub api_key_env: Option<String>,
}Expand description
Configuration for overriding a built-in provider’s model list.
Allows users to extend built-in providers (e.g., opencode-zen,
opencode-go) with additional custom models, and optionally override
the provider’s base URL or API key environment variable.
§Example
[providers.opencode-zen]
models = [
"opencode/gpt-5.4",
"opencode/gpt-5.4-mini",
"my-custom-model",
]
base_url = "https://custom-endpoint.example.com"
api_key_env = "MY_CUSTOM_KEY"Fields§
§models: Vec<String>Additional model identifiers to offer for this built-in provider.
These models are appended to the provider’s hardcoded model list
and appear in the /model picker alongside built-in entries.
base_url: Option<String>Optional base URL override for the provider endpoint.
When set, custom models from this override are routed to the specified endpoint instead of the provider’s default. Values from repository-controlled workspace/project layers are rejected.
api_key_env: Option<String>Optional environment variable name for the API key.
When set, overrides the provider’s default API key environment variable for models from this override. Values from repository-controlled workspace/project layers are rejected.
Trait Implementations§
Source§impl Clone for ProviderOverrideConfig
impl Clone for ProviderOverrideConfig
Source§impl Debug for ProviderOverrideConfig
impl Debug for ProviderOverrideConfig
Source§impl Default for ProviderOverrideConfig
impl Default for ProviderOverrideConfig
Source§impl<'de> Deserialize<'de> for ProviderOverrideConfig
impl<'de> Deserialize<'de> for ProviderOverrideConfig
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>,
impl Eq for ProviderOverrideConfig
Source§impl JsonSchema for ProviderOverrideConfig
impl JsonSchema for ProviderOverrideConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ProviderOverrideConfig
impl PartialEq for ProviderOverrideConfig
Source§impl Serialize for ProviderOverrideConfig
impl Serialize for ProviderOverrideConfig
impl StructuralPartialEq for ProviderOverrideConfig
Auto Trait Implementations§
impl Freeze for ProviderOverrideConfig
impl RefUnwindSafe for ProviderOverrideConfig
impl Send for ProviderOverrideConfig
impl Sync for ProviderOverrideConfig
impl Unpin for ProviderOverrideConfig
impl UnsafeUnpin for ProviderOverrideConfig
impl UnwindSafe for ProviderOverrideConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.