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:
Mihir Gupta
2026-05-12 15:07:36 -04:00
committed by GitHub
parent f2df168bec
commit 15bfe4f5d5
5 changed files with 247 additions and 12 deletions
+8
View File
@@ -213,6 +213,14 @@ export type DeclarativeProviderConfig = {
catalog_provider_id?: string | null;
description?: string | null;
display_name: string;
/**
* 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.
*/
dynamic_models?: boolean | null;
engine: ProviderEngine;
env_vars?: Array<EnvVarConfig> | null;