mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 12:22:14 +03:00
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)
6 lines
275 B
TypeScript
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);
|
|
}
|