Skip to content

fix: provider level multiline budget duplication issue and unfiltered true param for ModelMultiselect#2564

Merged
akshaydeo merged 1 commit intov1.5.0from
feature/04-08-fix_provider_level_multiline_budget_duplication_issue_and_unfiltered_true_param_for_modelmultiselect
Apr 8, 2026
Merged

fix: provider level multiline budget duplication issue and unfiltered true param for ModelMultiselect#2564
akshaydeo merged 1 commit intov1.5.0from
feature/04-08-fix_provider_level_multiline_budget_duplication_issue_and_unfiltered_true_param_for_modelmultiselect

Conversation

@danpiths
Copy link
Copy Markdown
Collaborator

@danpiths danpiths commented Apr 8, 2026

Summary

Fixes virtual key provider config updates to stop duplication of budgets on
provider level by ensuring budget data is properly loaded and enables unfiltered
model display.

Changes

  • Added Preload("Budgets") to the database query when fetching existing
    provider configs during virtual key updates to ensure budget relationships are
    loaded to prevent duplication of budgets on provider level
  • Added unfiltered prop to ModelMultiselect component in the settings panel
    to show all available models
  • Fixed indentation for the vks prop in the ModelMultiselect component

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (Next.js)
  • Docs

How to test

Test the virtual key update functionality to ensure budget data is properly
preserved:

# Core/Transports
go version
go test ./...

# UI
cd ui
pnpm i || npm i
pnpm test || npm test
pnpm build || npm run build

Verify that updating virtual key provider configurations maintains budget
associations and that the model selector shows all available models without
filtering.

Screenshots/Recordings

N/A

Breaking changes

  • Yes
  • No

Related issues

N/A

Security considerations

No security implications - this change only affects data loading relationships
and UI filtering behavior.

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

@danpiths danpiths requested a review from akshaydeo April 8, 2026 12:01
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown
Collaborator Author

danpiths commented Apr 8, 2026

@danpiths danpiths mentioned this pull request Apr 8, 2026
18 tasks
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 8, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ca70b229-eb22-4011-b6c4-3616b27200e4

📥 Commits

Reviewing files that changed from the base of the PR and between a25bc2f and 908f714.

📒 Files selected for processing (2)
  • transports/bifrost-http/handlers/governance.go
  • ui/components/prompts/fragments/settingsPanel.tsx

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Ensure related budget information is consistently loaded during governance updates so reconciliation works reliably.
    • Fix settings panel property passing so model selector receives the intended values.
  • New Features

    • Add an "unfiltered" mode to the model selection interface to change how models are filtered when displayed.

Walkthrough

Two targeted changes: eager-loading budgets in a governance handler DB query for virtual-key provider configs, and fixing ModelMultiselect prop placement plus adding an unfiltered boolean prop in the UI settings panel.

Changes

Cohort / File(s) Summary
Governance DB query
transports/bifrost-http/handlers/governance.go
Replaced plain Find with Find + Preload("Budgets") when loading TableVirtualKeyProviderConfig for a virtual key so associated Budgets are included for reconciliation within the update transaction.
UI Settings props
ui/components/prompts/fragments/settingsPanel.tsx
Adjusted ModelMultiselect prop alignment to correctly pass vks={filterVks}, and added an unfiltered boolean prop to alter the component's filtering behavior.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 I hopped through code with nimble paws,

Preloaded budgets, fixed some props, applause.
A tidy tweak, a gentle nudge,
DB and UI now snug as a budge.
— Rabbit developer 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes both main changes: fixing budget duplication and adding the unfiltered parameter for ModelMultiselect.
Description check ✅ Passed The PR description follows the template structure with all required sections completed, including summary, changes, type, affected areas, testing, and checklist.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/04-08-fix_provider_level_multiline_budget_duplication_issue_and_unfiltered_true_param_for_modelmultiselect

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

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 8, 2026

Confidence Score: 5/5

Safe to merge — both changes are minimal, targeted bug fixes with no regressions introduced.

The Go change correctly adds Preload("Budgets") so the reconciliation loop has the data it needs, directly fixing the duplication bug. The UI change simply forwards an already-supported prop. No new logic complexity, no security concerns, and no breaking changes.

No files require special attention.

Vulnerabilities

No security concerns identified.

Important Files Changed

Filename Overview
transports/bifrost-http/handlers/governance.go Adds Preload("Budgets") to the GORM query fetching existing provider configs during virtual key updates, so that the budget reconciliation map is populated correctly and avoids duplicate budget creation.
ui/components/prompts/fragments/settingsPanel.tsx Passes the unfiltered prop to ModelMultiselect so the settings panel shows all available models, and fixes indentation of the vks prop.

Reviews (2): Last reviewed commit: "fix: provider level multiline budget dup..." | Re-trigger Greptile

@Pratham-Mishra04 Pratham-Mishra04 changed the base branch from 04-07-fix_oauth_user_level_oauth_fixes to graphite-base/2564 April 8, 2026 12:18
coderabbitai[bot]
coderabbitai Bot previously approved these changes Apr 8, 2026
Copy link
Copy Markdown
Contributor

akshaydeo commented Apr 8, 2026

Merge activity

  • Apr 8, 1:24 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 8, 1:26 PM UTC: Graphite couldn't merge this PR because it had merge conflicts.
  • Apr 8, 1:30 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 8, 1:31 PM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo akshaydeo changed the base branch from graphite-base/2564 to v1.5.0 April 8, 2026 13:24
@akshaydeo akshaydeo dismissed coderabbitai[bot]’s stale review April 8, 2026 13:24

The base branch was changed.

@danpiths danpiths force-pushed the feature/04-08-fix_provider_level_multiline_budget_duplication_issue_and_unfiltered_true_param_for_modelmultiselect branch from a25bc2f to 908f714 Compare April 8, 2026 13:29
@akshaydeo akshaydeo merged commit b783fce into v1.5.0 Apr 8, 2026
11 of 16 checks passed
@akshaydeo akshaydeo deleted the feature/04-08-fix_provider_level_multiline_budget_duplication_issue_and_unfiltered_true_param_for_modelmultiselect branch April 8, 2026 13:31
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.

3 participants