pub struct ModelConfig {
pub models: Vec<ModelEntry>,
pub allow_user_default: bool,
pub parameters: HashMap<String, Value>,
pub request_timeout_secs: Option<u64>,
}Expand description
Model configuration for a stage.
Models are specified as an ordered priority list in models. The first
entry whose provider is registered at runtime is used. When
allow_user_default is true (the default), the user’s configured default
model is tried as a last resort. When false, the stage fails if none of
the listed models are available.
Fields§
§models: Vec<ModelEntry>Ordered list of models to try (first available wins).
allow_user_default: boolWhen true (default), fall back to the user’s configured default model if none of the listed models are available.
parameters: HashMap<String, Value>Optional parameters that apply to whichever model gets selected.
request_timeout_secs: Option<u64>Optional per-stage cap on the wall-clock time (in seconds) one inference
for this stage may run - the whole call including retries. When set, it
overrides the default job timeout; when None, the default applies.
This lets a stage with slow first-token latency (e.g. a large-prompt analyze call) get a long cap while a quick iterative stage fails fast on a stalled connection instead of hanging for the full default.
Implementations§
Trait Implementations§
Source§impl Clone for ModelConfig
impl Clone for ModelConfig
Source§fn clone(&self) -> ModelConfig
fn clone(&self) -> ModelConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more