feat: update helm charts for model limits scope update - #3984
Conversation
📝 WalkthroughWalkthroughThis PR documents governance model limits configuration with explicit scoping support. The schema, values examples, and deployment guides are updated to introduce and explain ChangesModel Limits Configuration Documentation
🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Confidence Score: 5/5Documentation and schema-only change; no Go, handler, or plugin logic is touched. Safe to merge. All changes are confined to Helm chart schema annotations, commented-out values.yaml examples, doc pages, and a changelog entry. No runtime code paths are affected. The one new finding is a schema divergence that is a future maintenance concern rather than a current defect. helm-charts/bifrost/values.schema.json — the scope enum diverges from the config.schema.json source of truth and would block future scope additions from linting cleanly. Important Files Changed
Reviews (3): Last reviewed commit: "feat: update helm charts for model limit..." | Re-trigger Greptile |
d3b61e6 to
e03b8bc
Compare
c72cf34 to
0b1135a
Compare
Merge activity
|
e03b8bc to
85248a7
Compare
0b1135a to
37e46d9
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
helm-charts/bifrost/values.schema.json (1)
1369-1393:⚠️ Potential issue | 🟠 Major | ⚡ Quick winEnforce
scope_idwhenscopeisvirtual_key.This schema only describes the requirement in text today; it does not validate it. A
modelConfigsentry withscope: "virtual_key"and noscope_idwill still pass schema validation, which undercuts the new Helm contract in this PR.Suggested schema fix
"scope_id": { "type": "string", "description": "Target entity ID — required when scope is \"virtual_key\"" }, "budget_id": { "type": "string" }, "rate_limit_id": { "type": "string" } }, - "required": ["id", "model_name"] + "required": ["id", "model_name"], + "allOf": [ + { + "if": { + "properties": { + "scope": { + "const": "virtual_key" + } + }, + "required": ["scope"] + }, + "then": { + "required": ["scope_id"] + } + } + ] } }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@helm-charts/bifrost/values.schema.json` around lines 1369 - 1393, The schema currently documents but does not enforce that scope_id is required when scope == "virtual_key"; update the JSON Schema for the object (the modelConfigs entry that defines "scope" and "scope_id") to add an if/then rule: use "if": {"properties":{"scope":{"const":"virtual_key"}}} and "then": {"required":["scope_id"]} (and optionally an "else" to ensure scope_id is not required otherwise) so entries with scope set to "virtual_key" will fail validation unless scope_id is present; modify the same schema block that contains the "scope" and "scope_id" properties and the "required": ["id","model_name"] list to include this conditional.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@helm-charts/bifrost/README.md`:
- Around line 11-14: The README shows an out-of-date header: update the
displayed "Latest Version: 2.1.20" text to "Latest Version: 2.1.21" so it
matches the new changelog entry ("### 2.1.21"); locate the README header line
containing "Latest Version: 2.1.20" and replace the version string to 2.1.21
ensuring consistency with the new changelog entry.
---
Outside diff comments:
In `@helm-charts/bifrost/values.schema.json`:
- Around line 1369-1393: The schema currently documents but does not enforce
that scope_id is required when scope == "virtual_key"; update the JSON Schema
for the object (the modelConfigs entry that defines "scope" and "scope_id") to
add an if/then rule: use "if": {"properties":{"scope":{"const":"virtual_key"}}}
and "then": {"required":["scope_id"]} (and optionally an "else" to ensure
scope_id is not required otherwise) so entries with scope set to "virtual_key"
will fail validation unless scope_id is present; modify the same schema block
that contains the "scope" and "scope_id" properties and the "required":
["id","model_name"] list to include this conditional.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: df19fccf-4f56-467b-bd00-e670c48088e5
📒 Files selected for processing (5)
docs/deployment-guides/config-json/governance.mdxdocs/deployment-guides/helm/governance.mdxhelm-charts/bifrost/README.mdhelm-charts/bifrost/values.schema.jsonhelm-charts/bifrost/values.yaml
| ### 2.1.21 | ||
|
|
||
| - Added `scope` and `scope_id` fields to `bifrost.governance.modelConfigs[]` items in `values.yaml` and `values.schema.json`. `scope` accepts `"global"` (default, applies to all traffic) or `"virtual_key"` (applies to a specific virtual key); `scope_id` is required when `scope` is `"virtual_key"` and must reference a virtual key `id`. The `_helpers.tpl` already passes `modelConfigs` through as-is so no template change was needed. | ||
|
|
There was a problem hiding this comment.
Update the README’s displayed latest version too.
This adds a 2.1.21 changelog entry, but the header still says Latest Version: 2.1.20, so the README becomes self-contradictory.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@helm-charts/bifrost/README.md` around lines 11 - 14, The README shows an
out-of-date header: update the displayed "Latest Version: 2.1.20" text to
"Latest Version: 2.1.21" so it matches the new changelog entry ("### 2.1.21");
locate the README header line containing "Latest Version: 2.1.20" and replace
the version string to 2.1.21 ensuring consistency with the new changelog entry.
## Summary Adds `scope` and `scope_id` fields to `governance.modelConfigs` (Helm) / `governance.model_configs` (config.json), enabling model-level budgets and rate limits to be applied either globally across all traffic or scoped to a specific virtual key. Documentation is updated to reflect the new fields, rename the section to "Model Limits" for consistency with the UI, and provide richer examples covering global, provider-level, and VK-scoped configurations. ## Changes - Added `scope` (`"global"` | `"virtual_key"`, default `"global"`) and `scope_id` (required when `scope` is `"virtual_key"`) to `modelConfigs[]` items in `values.yaml` and `values.schema.json`. - Renamed the Helm docs section from "Model Configs" to "Model Limits" to match the **Budget & Limits → Model Limits** UI label. - Expanded the Helm and config.json documentation with a field reference table and multiple annotated examples (global model cap, provider-level budget, VK-scoped top-level budget, VK-scoped per-provider budget). - Added a `2.1.21` changelog entry to the Helm chart README describing the new fields. ## Type of change - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs ## How to test Verify the Helm schema accepts the new fields without validation errors: ```sh helm lint helm-charts/bifrost helm template bifrost helm-charts/bifrost --values helm-charts/bifrost/values.yaml ``` Confirm a `modelConfigs` entry with `scope: "virtual_key"` and a valid `scope_id` renders correctly in the generated manifests, and that an entry with `scope: "global"` (or no `scope`) also renders without errors. ## Screenshots/Recordings N/A ## Breaking changes - [ ] Yes - [x] No ## Related issues N/A ## Security considerations No new auth, secrets, or PII surface introduced. The `scope_id` field references an existing virtual key ID and does not expose any new sensitive data. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated governance documentation with a new Model Limits section detailing budget and rate-limit configuration per model. * Added scoping capabilities allowing limits to apply globally or to specific virtual keys. * Updated configuration examples and schema references with new fields. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Adds `scope` and `scope_id` fields to `governance.modelConfigs` (Helm) / `governance.model_configs` (config.json), enabling model-level budgets and rate limits to be applied either globally across all traffic or scoped to a specific virtual key. Documentation is updated to reflect the new fields, rename the section to "Model Limits" for consistency with the UI, and provide richer examples covering global, provider-level, and VK-scoped configurations. - Added `scope` (`"global"` | `"virtual_key"`, default `"global"`) and `scope_id` (required when `scope` is `"virtual_key"`) to `modelConfigs[]` items in `values.yaml` and `values.schema.json`. - Renamed the Helm docs section from "Model Configs" to "Model Limits" to match the **Budget & Limits → Model Limits** UI label. - Expanded the Helm and config.json documentation with a field reference table and multiple annotated examples (global model cap, provider-level budget, VK-scoped top-level budget, VK-scoped per-provider budget). - Added a `2.1.21` changelog entry to the Helm chart README describing the new fields. - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs Verify the Helm schema accepts the new fields without validation errors: ```sh helm lint helm-charts/bifrost helm template bifrost helm-charts/bifrost --values helm-charts/bifrost/values.yaml ``` Confirm a `modelConfigs` entry with `scope: "virtual_key"` and a valid `scope_id` renders correctly in the generated manifests, and that an entry with `scope: "global"` (or no `scope`) also renders without errors. N/A - [ ] Yes - [x] No N/A No new auth, secrets, or PII surface introduced. The `scope_id` field references an existing virtual key ID and does not expose any new sensitive data. - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable <!-- This is an auto-generated comment: release notes by coderabbit.ai --> * **Documentation** * Updated governance documentation with a new Model Limits section detailing budget and rate-limit configuration per model. * Added scoping capabilities allowing limits to apply globally or to specific virtual keys. * Updated configuration examples and schema references with new fields. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Adds `scope` and `scope_id` fields to `governance.modelConfigs` (Helm) / `governance.model_configs` (config.json), enabling model-level budgets and rate limits to be applied either globally across all traffic or scoped to a specific virtual key. Documentation is updated to reflect the new fields, rename the section to "Model Limits" for consistency with the UI, and provide richer examples covering global, provider-level, and VK-scoped configurations. - Added `scope` (`"global"` | `"virtual_key"`, default `"global"`) and `scope_id` (required when `scope` is `"virtual_key"`) to `modelConfigs[]` items in `values.yaml` and `values.schema.json`. - Renamed the Helm docs section from "Model Configs" to "Model Limits" to match the **Budget & Limits → Model Limits** UI label. - Expanded the Helm and config.json documentation with a field reference table and multiple annotated examples (global model cap, provider-level budget, VK-scoped top-level budget, VK-scoped per-provider budget). - Added a `2.1.21` changelog entry to the Helm chart README describing the new fields. - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs Verify the Helm schema accepts the new fields without validation errors: ```sh helm lint helm-charts/bifrost helm template bifrost helm-charts/bifrost --values helm-charts/bifrost/values.yaml ``` Confirm a `modelConfigs` entry with `scope: "virtual_key"` and a valid `scope_id` renders correctly in the generated manifests, and that an entry with `scope: "global"` (or no `scope`) also renders without errors. N/A - [ ] Yes - [x] No N/A No new auth, secrets, or PII surface introduced. The `scope_id` field references an existing virtual key ID and does not expose any new sensitive data. - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable <!-- This is an auto-generated comment: release notes by coderabbit.ai --> * **Documentation** * Updated governance documentation with a new Model Limits section detailing budget and rate-limit configuration per model. * Added scoping capabilities allowing limits to apply globally or to specific virtual keys. * Updated configuration examples and schema references with new fields. <!-- end of auto-generated comment: release notes by coderabbit.ai -->

Summary
Adds
scopeandscope_idfields togovernance.modelConfigs(Helm) /governance.model_configs(config.json), enabling model-level budgets and rate limits to be applied either globally across all traffic or scoped to a specific virtual key. Documentation is updated to reflect the new fields, rename the section to "Model Limits" for consistency with the UI, and provide richer examples covering global, provider-level, and VK-scoped configurations.Changes
scope("global"|"virtual_key", default"global") andscope_id(required whenscopeis"virtual_key") tomodelConfigs[]items invalues.yamlandvalues.schema.json.2.1.21changelog entry to the Helm chart README describing the new fields.Type of change
Affected areas
How to test
Verify the Helm schema accepts the new fields without validation errors:
Confirm a
modelConfigsentry withscope: "virtual_key"and a validscope_idrenders correctly in the generated manifests, and that an entry withscope: "global"(or noscope) also renders without errors.Screenshots/Recordings
N/A
Breaking changes
Related issues
N/A
Security considerations
No new auth, secrets, or PII surface introduced. The
scope_idfield references an existing virtual key ID and does not expose any new sensitive data.Checklist
docs/contributing/README.mdand followed the guidelinesSummary by CodeRabbit