Files
OmniRoute/src/shared/constants/apiKeyPolicyScopes.ts
Wital e1c0fe4586 Add API key provider quota bypass
Expose a per-key permission toggle that stores policy:bypass-provider-quota in scopes and shows it in API Key Manager.

When enabled, chat routing passes bypassQuotaPolicy through credential preflight and auto-combo candidate selection while preserving API key USD quota enforcement.

Validation: focused unit tests, typecheck:core, ESLint on changed files, npm run build, Docker runner-base build, production deploy to omniroute:api-key-provider-quota-bypass-20260630191935.
(cherry picked from commit 651dcc67833e865ed5718a5b89c56cdf971809e7)
2026-06-30 23:44:23 -03:00

6 lines
275 B
TypeScript

export const API_KEY_BYPASS_PROVIDER_QUOTA_SCOPE = "policy:bypass-provider-quota";
export function hasProviderQuotaBypassScope(scopes: readonly string[] | null | undefined): boolean {
return Array.isArray(scopes) && scopes.includes(API_KEY_BYPASS_PROVIDER_QUOTA_SCOPE);
}