feat(api-manager): add provider-level model permissions (#9313)

* feat(api-manager): add provider-level model permissions

Persist canonical provider wildcards alongside exact model grants and
preserve explicit restricted-empty deny-all semantics across API, SQLite,
JSON import, sync, runtime policy, and the dashboard.

Invalidate filtered model catalogs on permission changes and guard against
stale in-flight catalog builders repopulating invalidated cache entries.

* fix(api-manager): show provider and model counts separately in summary

Provider wildcard selections (provider/*) are no longer counted as
individual models in the Selected Models Summary. The header now shows
"N providers · M models" when both are present, or just the non-empty
category when only one type is selected.

* fix(api-manager): separate provider and model permission displays

* fix(api-manager): separate provider wildcard permissions in UI
This commit is contained in:
Xiangzhe
2026-08-11 21:29:28 +08:00
committed by GitHub
parent 3898305df0
commit def5334768
24 changed files with 2227 additions and 358 deletions

View File

@@ -1,5 +1,10 @@
export const API_KEY_COLUMN_FALLBACKS = [
{ name: "allowed_models", definition: "allowed_models TEXT" },
{
name: "model_access_mode",
definition:
"model_access_mode TEXT NOT NULL DEFAULT 'all' CHECK (model_access_mode IN ('all', 'restricted'))",
},
{ name: "blocked_models", definition: "blocked_models TEXT" },
{ name: "allowed_combos", definition: "allowed_combos TEXT" },
{ name: "no_log", definition: "no_log INTEGER NOT NULL DEFAULT 0" },