Skip to content

feat(helm): add complexity analyzer config values support - #3948

Merged
akshaydeo merged 5 commits into
devfrom
06-01-feat_helm_add_complexity_analyzer_config_values_support
Jun 10, 2026
Merged

feat(helm): add complexity analyzer config values support#3948
akshaydeo merged 5 commits into
devfrom
06-01-feat_helm_add_complexity_analyzer_config_values_support

Conversation

@Madhuvod

@Madhuvod Madhuvod commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

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.

# 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

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.

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds Helm-configurable complexity analyzer settings: JSON schema for validation, values placeholder and template rendering into generated config.json, and documentation explaining defaults and runtime behavior.

Changes

Complexity Analyzer Configuration Support

Layer / File(s) Summary
Schema validation for complexity analyzer config
helm-charts/bifrost/values.schema.json
New bifrost.governance.complexityAnalyzerConfig schema enforces required tier_boundaries numeric thresholds and required keyword arrays (code_keywords, reasoning_keywords, technical_keywords, simple_keywords) with strict additionalProperties: false.
Helm values and template rendering
helm-charts/bifrost/values.yaml, helm-charts/bifrost/templates/_helpers.tpl, helm-charts/bifrost/README.md
Default complexityAnalyzerConfig value set to null with commented example. Template conditionally adds complexity_analyzer_config to governance block when Helm values are provided; emission guard updated to ensure governance is emitted when this is the only populated governance field. Changelog and spacing updated.
Configuration documentation
docs/deployment-guides/helm/governance.mdx
Documents how bifrost.governance.complexityAnalyzerConfig maps to governance.complexity_analyzer_config in generated config.json, behavior when omitted or null, restart vs hot-reload semantics, and includes example YAML for tier boundaries and keyword lists.

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
Loading

Estimated code review effort:
🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers:

  • danpiths
  • akshaydeo

"I hopped through charts and values true,
seeded tiers and keywords just for you.
Schema guards the gates with care,
templates render settings there.
A rabbit's stamp on config flair. 🐰"

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is a blank template with no actual content filled in; all sections remain as placeholder text with no implementation details, changes explanation, type selection, affected areas, testing steps, or related issues linked. Complete the PR description by filling in the Summary, Changes, Type of change, Affected areas, How to test, Breaking changes, Related issues, and Security considerations sections with actual details relevant to this complexity analyzer configuration addition.
Linked Issues check ⚠️ Warning The linked issue #123 (Files API Support) concerns OpenAI/Anthropic file uploads for RAG workflows, which is unrelated to the Helm complexity analyzer configuration changes in this PR. Link the correct issue(s) related to complexity analyzer configuration support, or clarify the relationship between this Helm change and the Files API requirements.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'feat(helm): add complexity analyzer config values support' directly and clearly summarizes the main change of adding Helm configuration support for complexity analyzer settings.
Out of Scope Changes check ✅ Passed All changes (Helm templates, values schema, values defaults, documentation) are directly in-scope for adding complexity analyzer config support; no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 06-01-feat_helm_add_complexity_analyzer_config_values_support

Comment @coderabbitai help to get the list of available commands and usage tips.

@Madhuvod
Madhuvod marked this pull request as ready for review June 1, 2026 09:49
@Madhuvod
Madhuvod requested a review from a team as a code owner June 1, 2026 09:49

Madhuvod commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@greptile-apps

greptile-apps Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe 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

Filename Overview
helm-charts/bifrost/templates/_helpers.tpl Adds complexity_analyzer_config block to governance config rendering; correctly guarded by an if-nil check so existing installs are unaffected.
helm-charts/bifrost/values.schema.json Inline schema for complexityAnalyzerConfig matches canonical transports/config.schema.json structure with correct minItems/minLength guards; tier boundary ordering constraint is not enforced (pre-existing gap in the source schema too).
helm-charts/bifrost/values.yaml Adds complexityAnalyzerConfig defaulting to null with commented-out example; opt-in and backwards-compatible.
docs/deployment-guides/helm/governance.mdx New Complexity Router Configuration section accurately describes opt-in Helm seeding and hot-reload semantics; examples match the schema.
helm-charts/bifrost/README.md Changelog entry for upcoming 2.1.23 correctly describes the new complexityAnalyzerConfig field and its opt-in behaviour.
ui/public/images/microsoft.png Unrelated binary asset added; no changed file in this PR references it, suggesting an accidental inclusion from a separate feature branch.

Reviews (15): Last reviewed commit: "feat(helm): add complexity analyzer conf..." | Re-trigger Greptile

Comment thread helm-charts/bifrost/values.schema.json
@Madhuvod
Madhuvod force-pushed the 06-01-feat_helm_add_complexity_analyzer_config_values_support branch from b9736c4 to d242c5e Compare June 1, 2026 10:06
@Madhuvod
Madhuvod force-pushed the 05-24-docs_for_complexity_router_and_openapi_reference branch 2 times, most recently from 794b85a to ccb6b3a Compare June 1, 2026 10:29
@Madhuvod
Madhuvod force-pushed the 06-01-feat_helm_add_complexity_analyzer_config_values_support branch from d242c5e to 999a505 Compare June 1, 2026 10:29

Madhuvod commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai did you review?

@Madhuvod
Madhuvod force-pushed the 06-01-feat_helm_add_complexity_analyzer_config_values_support branch from 999a505 to 8732199 Compare June 1, 2026 10:38
@Madhuvod
Madhuvod requested a review from BearTS June 1, 2026 10:40
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
gh pr view 3948 --repo maximhq/bifrost --json reviews,comments,state,title

Length of output: 23954



@Madhuvod The initial auto-review was skipped because auto reviews are disabled on non-default base branches for this repository. When you triggered @coderabbitai review, since CodeRabbit is an incremental system and the commits were already processed during the walkthrough generation, it didn't produce additional inline review comments.

Let me kick off a full review of all the changes now.

✅ Actions performed

Full review triggered.

@coderabbitai
coderabbitai Bot requested a review from danpiths June 1, 2026 10:42
@Madhuvod
Madhuvod removed request for a team and danpiths June 1, 2026 10:42

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/deployment-guides/helm/governance.mdx (1)

359-385: ⚡ Quick win

Add required Mintlify tabs and a schema-aligned config.json example.

This new section should include Web UI / API / config.json tabs, and the config.json tab should show governance.complexity_analyzer_config with schema-valid tier_boundaries and keywords.

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

📥 Commits

Reviewing files that changed from the base of the PR and between ccb6b3a and 8732199.

📒 Files selected for processing (4)
  • docs/deployment-guides/helm/governance.mdx
  • helm-charts/bifrost/templates/_helpers.tpl
  • helm-charts/bifrost/values.schema.json
  • helm-charts/bifrost/values.yaml

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 1, 2026
@Madhuvod
Madhuvod force-pushed the 06-01-feat_helm_add_complexity_analyzer_config_values_support branch from 0f54648 to eb49d42 Compare June 1, 2026 12:15
@Madhuvod
Madhuvod force-pushed the 05-24-docs_for_complexity_router_and_openapi_reference branch from 4351e01 to 3966859 Compare June 1, 2026 12:15
@Madhuvod
Madhuvod force-pushed the 05-24-docs_for_complexity_router_and_openapi_reference branch from 3966859 to 6601d0a Compare June 8, 2026 12:21
@Madhuvod
Madhuvod force-pushed the 06-01-feat_helm_add_complexity_analyzer_config_values_support branch 2 times, most recently from 0c0258c to 3ed3b2f Compare June 8, 2026 12:25
@akshaydeo
akshaydeo force-pushed the 05-24-docs_for_complexity_router_and_openapi_reference branch from 6601d0a to acd1741 Compare June 9, 2026 05:40
@akshaydeo
akshaydeo force-pushed the 06-01-feat_helm_add_complexity_analyzer_config_values_support branch from 3ed3b2f to b8e85c7 Compare June 9, 2026 05:40
@Madhuvod
Madhuvod force-pushed the 06-01-feat_helm_add_complexity_analyzer_config_values_support branch from b8e85c7 to 9cbe3e8 Compare June 9, 2026 09:09
@Madhuvod
Madhuvod force-pushed the 05-24-docs_for_complexity_router_and_openapi_reference branch 2 times, most recently from 2cfba2a to f6f934f Compare June 9, 2026 11:36
@Madhuvod
Madhuvod force-pushed the 06-01-feat_helm_add_complexity_analyzer_config_values_support branch from 9cbe3e8 to 58ba6fc Compare June 9, 2026 11:36
@Madhuvod
Madhuvod force-pushed the 05-24-docs_for_complexity_router_and_openapi_reference branch from f6f934f to dc7e360 Compare June 9, 2026 12:08
@Madhuvod
Madhuvod force-pushed the 06-01-feat_helm_add_complexity_analyzer_config_values_support branch from 58ba6fc to d4e510f Compare June 9, 2026 12:08
@Madhuvod
Madhuvod force-pushed the 06-01-feat_helm_add_complexity_analyzer_config_values_support branch from d4e510f to f94cc4c Compare June 10, 2026 12:56
@Madhuvod
Madhuvod force-pushed the 05-24-docs_for_complexity_router_and_openapi_reference branch from dc7e360 to 4d64c2c Compare June 10, 2026 12:56

akshaydeo commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Merge activity

  • Jun 10, 1:30 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 10, 1:39 PM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo
akshaydeo changed the base branch from 05-24-docs_for_complexity_router_and_openapi_reference to graphite-base/3948 June 10, 2026 13:36
@akshaydeo
akshaydeo changed the base branch from graphite-base/3948 to dev June 10, 2026 13:38
@akshaydeo
akshaydeo dismissed coderabbitai[bot]’s stale review June 10, 2026 13:38

The base branch was changed.

@akshaydeo
akshaydeo merged commit 726422e into dev Jun 10, 2026
13 checks passed
@akshaydeo
akshaydeo deleted the 06-01-feat_helm_add_complexity_analyzer_config_values_support branch June 10, 2026 13:39
akshaydeo pushed a commit that referenced this pull request Jun 12, 2026
## 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 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Files API Support

3 participants