plugins/governance/v1.7.0

maximhq/bifrostplugins/governance/v1.7.0Aug 26, 2026by akshaydeo

AI Summary

The governance plugin introduces routing extraction, batch usage reporting, and logic to bypass model checks for inspection requests.

Key Highlights

  • Routing rules and complexity router extracted into a dedicated `routing` plugin.
  • Batch usage reporting with claim/release markers and budget updates.
  • Honor `BifrostContextKeySkipModelCheck` to bypass model allowlist in evaluate-only requests.
  • Added a no-op `HTTPTransportPreAuthHook`.

New Features

  • Routing extraction
  • Batch usage reporting
  • Virtual key bypass logic
  • HTTPTransportPreAuthHook implementation

Full Release Notes

## Plugin Release: governance v1.7.0

- feat: routing rules and the complexity router are extracted into the dedicated `routing` plugin: governance now runs at priority 4 and routing at 5, `PublishRoutingAllowlist` and `LoadBalanceProvider` are exported on `GovernancePlugin` and `BaseGovernancePlugin` and are called from the routing plugin after rule evaluation instead of from governance's `PreRequestHook`, `runPreRequestRouting` is removed, and `ReloadRoutingRule`, `RemoveRoutingRule` and the routing rule and complexity analyzer handlers leave `GovernanceManager` and `GovernanceHandler` for `RoutingHandler` under `/api/routing/*` (with deprecated `/api/governance/*` aliases) (#6144, #6145, #6146)
- feat: batch usage reporting: `ReportBatchUsage` applies settled batch cost, tokens and requests to every budget and rate limit on a `BatchUsageReport` exactly once per request ID via a claim/release marker with a 7-day TTL, and charges the creating user's tiers when `UserID` is present; `BumpBudgetUsage` and `BumpRateLimitUsage` are added to `GovernanceStore`; governance IDs, including VK-scoped, user-scoped and global wildcard budgets and rate limits, are collected for batch-create requests that carry no model (thanks [@SahilChoudhary22](https://github.com/SahilChoudhary22)!) (#5295, #6410, #6505)
- feat: honor `BifrostContextKeySkipModelCheck` in `EvaluateVirtualKeyRequest` so evaluate-only requests such as `/inspect` bypass the model allowlist while budgets, rate limits and provider checks still apply (#6479)
- feat: add a no-op `HTTPTransportPreAuthHook` for the new pre-authentication transport phase (#6375)
- chore: upgraded core to v1.8.0 and framework to v1.6.0

### Installation

```bash
# Update your go.mod to use the new plugin version
go get github.com/maximhq/bifrost/plugins/governance@v1.7.0
```

---
_This release was automatically created from version file: `plugins/governance/version`_