feat(pool): add bulk key configuration management

This commit is contained in:
MMEXA
2026-07-14 04:57:05 +08:00
parent 7f61bb43c7
commit a25fab371a
37 changed files with 2510 additions and 379 deletions
+15
View File
@@ -662,6 +662,21 @@ impl AppState {
Ok(updated)
}
pub(crate) async fn update_provider_catalog_keys(
&self,
keys: &[provider_catalog::StoredProviderCatalogKey],
) -> Result<Option<Vec<provider_catalog::StoredProviderCatalogKey>>, GatewayError> {
let updated = self
.data
.update_provider_catalog_keys(keys)
.await
.map_err(|err| GatewayError::Internal(err.to_string()))?;
if updated.as_ref().is_some_and(|keys| !keys.is_empty()) {
self.invalidate_provider_routing_caches();
}
Ok(updated)
}
pub(crate) async fn update_provider_catalog_key_runtime_state(
&self,
key: &provider_catalog::StoredProviderCatalogKey,