feat(gcp-vertex): add model list with org policy filtering (#6393)
Signed-off-by: rabi <ramishra@redhat.com>
This commit is contained in:
@@ -108,6 +108,9 @@ pub struct ProviderMetadata {
|
||||
pub model_doc_link: String,
|
||||
/// Required configuration keys
|
||||
pub config_keys: Vec<ConfigKey>,
|
||||
/// Whether this provider allows entering model names not in the fetched list
|
||||
#[serde(default)]
|
||||
pub allows_unlisted_models: bool,
|
||||
}
|
||||
|
||||
impl ProviderMetadata {
|
||||
@@ -138,6 +141,7 @@ impl ProviderMetadata {
|
||||
.collect(),
|
||||
model_doc_link: model_doc_link.to_string(),
|
||||
config_keys,
|
||||
allows_unlisted_models: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,6 +162,7 @@ impl ProviderMetadata {
|
||||
known_models: models,
|
||||
model_doc_link: model_doc_link.to_string(),
|
||||
config_keys,
|
||||
allows_unlisted_models: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,8 +175,15 @@ impl ProviderMetadata {
|
||||
known_models: vec![],
|
||||
model_doc_link: "".to_string(),
|
||||
config_keys: vec![],
|
||||
allows_unlisted_models: false,
|
||||
}
|
||||
}
|
||||
|
||||
/// Set allows_unlisted_models flag (builder pattern)
|
||||
pub fn with_unlisted_models(mut self) -> Self {
|
||||
self.allows_unlisted_models = true;
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
/// Configuration key metadata for provider setup
|
||||
|
||||
Reference in New Issue
Block a user