feat(helm): add complexity analyzer config values support - #3948
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds Helm-configurable complexity analyzer settings: JSON schema for validation, values placeholder and template rendering into generated ChangesComplexity Analyzer Configuration Support
Sequence Diagram(s): sequenceDiagram
participant Operator as Operator
participant Helm as Helm CLI
participant Template as _helpers.tpl
participant Config as generated config.json
Operator->>Helm: supply `bifrost.governance.complexityAnalyzerConfig` values
Helm->>Template: render templates with values
Template->>Config: emit `governance.complexity_analyzer_config` into config.json
Estimated code review effort: Suggested reviewers:
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Confidence Score: 5/5Safe to merge; all Helm changes are opt-in and backwards-compatible with existing installs. The Helm template change is correctly guarded by a nil check, the inline schema faithfully mirrors the canonical config schema, and null defaults mean no existing deployment is affected. The only notable items are an unrelated binary asset and a pre-existing schema gap (threshold ordering) that is already caught by Go runtime validation — neither is a functional regression. ui/public/images/microsoft.png — appears to be an accidental inclusion unrelated to this feature. Important Files Changed
Reviews (15): Last reviewed commit: "feat(helm): add complexity analyzer conf..." | Re-trigger Greptile |
b9736c4 to
d242c5e
Compare
794b85a to
ccb6b3a
Compare
d242c5e to
999a505
Compare
|
@coderabbitai did you review? |
999a505 to
8732199
Compare
🧩 Analysis chain🏁 Script executed: #!/bin/bash
gh pr view 3948 --repo maximhq/bifrost --json reviews,comments,state,titleLength of output: 23954
Let me kick off a full review of all the changes now. ✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/deployment-guides/helm/governance.mdx (1)
359-385: ⚡ Quick winAdd required Mintlify tabs and a schema-aligned
config.jsonexample.This new section should include Web UI / API / config.json tabs, and the config.json tab should show
governance.complexity_analyzer_configwith schema-validtier_boundariesandkeywords.Suggested structure
+<Tabs> + <Tab title="Web UI"> + Configure complexity analyzer settings in the Governance UI. + </Tab> + <Tab title="API"> + Use the governance config API to set `complexity_analyzer_config`. + </Tab> + <Tab title="config.json"> +```json +{ + "governance": { + "complexity_analyzer_config": { + "tier_boundaries": { + "simple_medium": 0.15, + "medium_complex": 0.35, + "complex_reasoning": 0.60 + }, + "keywords": { + "code_keywords": ["function", "class", "api", "debug", "deploy"], + "reasoning_keywords": ["step by step", "explain why", "tradeoffs", "root cause analysis"], + "technical_keywords": ["architecture", "kubernetes", "latency", "authentication"], + "simple_keywords": ["hello", "hi", "thanks", "what is", "define"] + } + } + } +} +``` + </Tab> +</Tabs>As per coding guidelines
docs/**/*.mdx: Mintlify MDX documentation must have Web UI / API / config.json tabs; validate config.json examples against transports/config.schema.json.🤖 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 `@docs/deployment-guides/helm/governance.mdx` around lines 359 - 385, Add Mintlify tabs "Web UI", "API", and "config.json" to the Complexity Router Configuration section and replace the inline YAML-only example with the tabbed UI; in the config.json tab include a JSON example that sets governance.complexity_analyzer_config with schema-aligned objects: tier_boundaries containing simple_medium, medium_complex, complex_reasoning as numeric values (e.g., 0.15, 0.35, 0.60) and keywords containing arrays for code_keywords, reasoning_keywords, technical_keywords, and simple_keywords; ensure the JSON keys exactly match complexityAnalyzerConfig / governance.complexity_analyzer_config and that values conform to transports/config.schema.json (types and structure) so the example validates.
🤖 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.
Nitpick comments:
In `@docs/deployment-guides/helm/governance.mdx`:
- Around line 359-385: Add Mintlify tabs "Web UI", "API", and "config.json" to
the Complexity Router Configuration section and replace the inline YAML-only
example with the tabbed UI; in the config.json tab include a JSON example that
sets governance.complexity_analyzer_config with schema-aligned objects:
tier_boundaries containing simple_medium, medium_complex, complex_reasoning as
numeric values (e.g., 0.15, 0.35, 0.60) and keywords containing arrays for
code_keywords, reasoning_keywords, technical_keywords, and simple_keywords;
ensure the JSON keys exactly match complexityAnalyzerConfig /
governance.complexity_analyzer_config and that values conform to
transports/config.schema.json (types and structure) so the example validates.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 23b48f86-c430-4c5d-ad3f-ca537419de23
📒 Files selected for processing (4)
docs/deployment-guides/helm/governance.mdxhelm-charts/bifrost/templates/_helpers.tplhelm-charts/bifrost/values.schema.jsonhelm-charts/bifrost/values.yaml
0f54648 to
eb49d42
Compare
4351e01 to
3966859
Compare
3966859 to
6601d0a
Compare
0c0258c to
3ed3b2f
Compare
6601d0a to
acd1741
Compare
3ed3b2f to
b8e85c7
Compare
b8e85c7 to
9cbe3e8
Compare
2cfba2a to
f6f934f
Compare
9cbe3e8 to
58ba6fc
Compare
f6f934f to
dc7e360
Compare
58ba6fc to
d4e510f
Compare
d4e510f to
f94cc4c
Compare
dc7e360 to
4d64c2c
Compare
Merge activity
|
The base branch was changed.
## Summary Briefly explain the purpose of this PR and the problem it solves. ## Changes - What was changed and why - Any notable design decisions or trade-offs ## Type of change - [ ] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test Describe the steps to validate this change. Include commands and expected outcomes. ```sh # Core/Transports go version go test ./... # UI cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` If adding new configs or environment variables, document them here. ## Screenshots/Recordings If UI changes, add before/after screenshots or short clips. ## Breaking changes - [ ] Yes - [ ] No If yes, describe impact and migration instructions. ## Related issues Link related issues and discussions. Example: Closes #123 ## Security considerations Note any security implications (auth, secrets, PII, sandboxing, etc.). ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] 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 * **New Features** * Opt-in Helm support to seed complexity analyzer tier thresholds and keyword groups (defaults apply when omitted or null). * Helm-provided analyzer settings are reapplied on restart; runtime UI/API edits hot-reload until restart. * Helm values now validated against a stricter schema to ensure required thresholds and keyword lists. * **Documentation** * Added a Complexity Router Configuration section with examples and guidance. <!-- end of auto-generated comment: release notes by coderabbit.ai -->

Summary
Briefly explain the purpose of this PR and the problem it solves.
Changes
Type of change
Affected areas
How to test
Describe the steps to validate this change. Include commands and expected outcomes.
If adding new configs or environment variables, document them here.
Screenshots/Recordings
If UI changes, add before/after screenshots or short clips.
Breaking changes
If yes, describe impact and migration instructions.
Related issues
Link related issues and discussions. Example: Closes #123
Security considerations
Note any security implications (auth, secrets, PII, sandboxing, etc.).
Checklist
docs/contributing/README.mdand followed the guidelinesSummary by CodeRabbit
New Features
Documentation