bifrost.governance in your values file and seeded into the database at startup.
The governance plugin must also be enabled for enforcement to take effect:See the Plugins page for plugin configuration details.
Admin Authentication
Protect the Bifrost dashboard and management API with username/password auth.Budgets
Spending caps that reset on a configurable period. Budgets are referenced by ID from virtual keys, teams, customers, or providers.| Reset duration | Syntax |
|---|---|
| 30 seconds | "30s" |
| 5 minutes | "5m" |
| 1 hour | "1h" |
| 1 day | "1d" |
| 1 week | "1w" |
| 1 month | "1M" |
| 1 year | "1Y" |
Rate Limits
Token and request-count caps per time window. Referenced by ID from virtual keys, teams, customers, or providers.Customers & Teams
Optional organizational hierarchy. Virtual keys can be assigned to customers or teams, inheriting their budgets and rate limits.Virtual Keys
Virtual keys are the primary access tokens issued to callers. They scope which providers, models, and underlying API keys are accessible.Model Configs
Apply budgets and rate limits at the model level, independent of virtual keys:Provider Governance
Apply budgets and rate limits at the provider level:Routing Rules
CEL-expression-based routing rules redirect requests to different providers or models based on request attributes.| Field | Description |
|---|---|
cel_expression | CEL expression evaluated against the request; if true, rule fires |
targets | Provider/model targets with weights |
fallbacks | Providers to try if all targets fail |
scope | global, team, customer, or virtual_key |
scope_id | Required for non-global scopes |
priority | Lower number = evaluated first |

