#[non_exhaustive]pub struct ProviderModelConfig {
pub id: String,
pub provider: String,
pub wire_model: Option<String>,
pub model_id: Option<String>,
pub name: Option<String>,
pub max_prompt_tokens: Option<i64>,
pub max_context_window_tokens: Option<i64>,
pub max_output_tokens: Option<i64>,
pub capabilities: Option<ModelCapabilitiesOverride>,
}Expand description
A BYOK model definition in the multi-provider registry.
Experimental. Multi-provider BYOK configuration is part of an experimental surface and may change or be removed in a future release.
References a NamedProviderConfig by provider and
becomes selectable under the provider-qualified id provider/id.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringModel identifier, unique within its provider. Combined with
provider to form the selection id provider/id.
provider: StringName of the NamedProviderConfig this model is served by.
wire_model: Option<String>Model name sent to the provider API for inference. Use when the
provider’s model name differs from id.
model_id: Option<String>Well-known model ID used to look up agent config and default token limits.
name: Option<String>Human-readable display name.
max_prompt_tokens: Option<i64>Overrides the resolved model’s default max prompt tokens.
max_context_window_tokens: Option<i64>Overrides the resolved model’s default max context window tokens.
max_output_tokens: Option<i64>Overrides the resolved model’s default max output tokens.
capabilities: Option<ModelCapabilitiesOverride>Per-property overrides for model capabilities, deep-merged over runtime defaults.
Implementations§
Source§impl ProviderModelConfig
impl ProviderModelConfig
Sourcepub fn new(id: impl Into<String>, provider: impl Into<String>) -> Self
pub fn new(id: impl Into<String>, provider: impl Into<String>) -> Self
Construct a ProviderModelConfig with the required id and
provider set; all other fields default to unset.
Sourcepub fn with_wire_model(self, wire_model: impl Into<String>) -> Self
pub fn with_wire_model(self, wire_model: impl Into<String>) -> Self
Set the model name sent to the provider API for inference.
Sourcepub fn with_model_id(self, model_id: impl Into<String>) -> Self
pub fn with_model_id(self, model_id: impl Into<String>) -> Self
Set the well-known model ID used to look up agent config and default token limits.
Sourcepub fn with_max_prompt_tokens(self, max: i64) -> Self
pub fn with_max_prompt_tokens(self, max: i64) -> Self
Override the resolved model’s default max prompt tokens.
Sourcepub fn with_max_context_window_tokens(self, max: i64) -> Self
pub fn with_max_context_window_tokens(self, max: i64) -> Self
Override the resolved model’s default max context window tokens.
Sourcepub fn with_max_output_tokens(self, max: i64) -> Self
pub fn with_max_output_tokens(self, max: i64) -> Self
Override the resolved model’s default max output tokens.
Sourcepub fn with_capabilities(self, capabilities: ModelCapabilitiesOverride) -> Self
pub fn with_capabilities(self, capabilities: ModelCapabilitiesOverride) -> Self
Set per-property model capability overrides.
Trait Implementations§
Source§impl Clone for ProviderModelConfig
impl Clone for ProviderModelConfig
Source§fn clone(&self) -> ProviderModelConfig
fn clone(&self) -> ProviderModelConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more