fix(providers): honor dynamic_models: false in declarative provider configs (#8795)
Signed-off-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
@@ -86,6 +86,12 @@ pub struct DeclarativeProviderConfig {
|
||||
pub base_path: Option<String>,
|
||||
#[serde(default)]
|
||||
pub env_vars: Option<Vec<EnvVarConfig>>,
|
||||
/// Controls whether `fetch_supported_models` calls the provider's `/v1/models`
|
||||
/// endpoint or returns the static `models` list directly.
|
||||
///
|
||||
/// - `Some(false)` + non-empty `models`: return the static list; no API call.
|
||||
/// Construction fails if `models` is empty.
|
||||
/// - `Some(true)` or `None`: try the API; fall back to `models` on 404.
|
||||
#[serde(default)]
|
||||
pub dynamic_models: Option<bool>,
|
||||
#[serde(default)]
|
||||
|
||||
Reference in New Issue
Block a user