Skip to content

fix: show model budget count in provider card header summary - #5704

Merged
akshaydeo merged 2 commits into
mainfrom
07-31-feat_provider_config_card_to_show_model_budgets
Aug 11, 2026
Merged

akshaydeo merged 2 commits into
mainfrom
07-31-feat_provider_config_card_to_show_model_budgets

Conversation

@BearTS

@BearTS BearTS commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes a misleading "No budget" label shown in the provider config card header when a provider has model-level budgets configured but no provider-level cap. The header summary now reflects the actual budget state by combining the provider cap and model budget count.

Changes

  • Computes a headerSummary that joins the provider-level cap label and a model budget count (e.g. "3 model budgets") with a · separator, falling back to "No budget" only when neither is present
  • Replaces the spacer <span> and separate capLabel span with a single truncating, right-aligned span that displays headerSummary with a title tooltip for overflow cases

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

  1. Open a provider config card that has model budgets set but no provider-level cap.
  2. Verify the header now shows e.g. "2 model budgets" instead of "No budget".
  3. Open a provider config card with both a provider cap and model budgets set.
  4. Verify the header shows both joined by ·, e.g. "$100/mo · 2 model budgets".
  5. Open a provider config card with no budgets at all and verify it still shows "No budget".
cd ui
pnpm i || npm i
pnpm build || npm run build

Screenshots/Recordings

Before: A provider with only model budgets displayed "No budget" in the card header.

After: The header correctly reflects the model budget count (and provider cap when present).

Breaking changes

  • Yes
  • No

Related issues

Security considerations

None.

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

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • UI Improvements
    • Provider configuration cards now display a clearer budget summary in the header.
    • Summaries include the provider budget and, when enabled, the number of configured model budgets.
    • The “No budget” message appears only when no budget information is available.
    • Budget details now consistently reflect available information, making them easier to understand at a glance.

Walkthrough

ProviderConfigCard combines the provider budget label with an optional model-budget count in the header. It displays "No budget" only when neither value exists.

Changes

Provider budget summary

Layer / File(s) Summary
Compute and render header summary
ui/components/ui/providerConfigCard.tsx
Combines the provider budget label with a singular or plural model-budget count and renders the result in the provider header.

Estimated code review effort: 2 (Simple) | ~5 minutes

Suggested reviewers: akshaydeo, pratham-mishra04

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main UI fix: showing the model budget count in the provider card header.
Description check ✅ Passed The description covers the purpose, changes, affected UI area, test steps, breaking changes, and security considerations; unchecked checklist items are non-critical.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 07-31-feat_provider_config_card_to_show_model_budgets

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

BearTS commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

@BearTS
BearTS marked this pull request as ready for review July 30, 2026 20:03

@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.

Actionable comments posted: 1

🤖 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 `@ui/components/ui/providerConfigCard.tsx`:
- Line 229: Update the headerSummary span in the provider configuration card to
be a shrinkable flex item that truncates overflowing text on narrow screens.
Adjust its flex sizing and add the appropriate overflow, whitespace, and
text-overflow behavior while preserving the existing styling and summary
content.
🪄 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: CHILL

Plan: Pro Plus

Run ID: b96b8ca2-7e1f-4af3-ba0d-c6d49bf87730

📥 Commits

Reviewing files that changed from the base of the PR and between 3d4c5f5 and 5df51ac.

📒 Files selected for processing (1)
  • ui/components/ui/providerConfigCard.tsx

Comment thread ui/components/ui/providerConfigCard.tsx Outdated
@BearTS
BearTS force-pushed the 07-31-feat_add_virtual_key_per_model_budget_creation_on_the_virtual_key_sheet branch from 3d4c5f5 to bb71488 Compare July 31, 2026 08:56
@BearTS
BearTS force-pushed the 07-31-feat_provider_config_card_to_show_model_budgets branch from 5df51ac to 891b851 Compare July 31, 2026 08:56
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 31, 2026
@BearTS
BearTS force-pushed the 07-31-feat_provider_config_card_to_show_model_budgets branch from 891b851 to 713ae53 Compare August 3, 2026 05:18
@BearTS
BearTS force-pushed the 07-31-feat_add_virtual_key_per_model_budget_creation_on_the_virtual_key_sheet branch from bb71488 to 4eb1124 Compare August 3, 2026 05:18
@BearTS BearTS changed the title feat: provider config card to show model budgets fix: show model budget count in provider card header summary Aug 3, 2026
@BearTS
BearTS force-pushed the 07-31-feat_provider_config_card_to_show_model_budgets branch from 713ae53 to df968cf Compare August 4, 2026 05:50
@BearTS
BearTS force-pushed the 07-31-feat_add_virtual_key_per_model_budget_creation_on_the_virtual_key_sheet branch from 4eb1124 to aa5e5ee Compare August 4, 2026 05:50
@BearTS
BearTS force-pushed the 07-31-feat_provider_config_card_to_show_model_budgets branch from df968cf to c2c9cf6 Compare August 5, 2026 11:25
@BearTS
BearTS force-pushed the 07-31-feat_add_virtual_key_per_model_budget_creation_on_the_virtual_key_sheet branch from aa5e5ee to 2ddf2ba Compare August 5, 2026 11:25
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@BearTS
BearTS force-pushed the 07-31-feat_add_virtual_key_per_model_budget_creation_on_the_virtual_key_sheet branch from 2ddf2ba to e1f1b8b Compare August 5, 2026 17:36
@BearTS
BearTS force-pushed the 07-31-feat_provider_config_card_to_show_model_budgets branch from c2c9cf6 to c50fa1a Compare August 5, 2026 17:36
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@BearTS
BearTS force-pushed the 07-31-feat_provider_config_card_to_show_model_budgets branch from c50fa1a to a7a631b Compare August 6, 2026 05:21
@BearTS
BearTS force-pushed the 07-31-feat_add_virtual_key_per_model_budget_creation_on_the_virtual_key_sheet branch from e1f1b8b to 3ef24fc Compare August 6, 2026 05:21
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@BearTS
BearTS force-pushed the 07-31-feat_provider_config_card_to_show_model_budgets branch from a7a631b to 3fdc968 Compare August 11, 2026 11:01
@BearTS
BearTS force-pushed the 07-31-feat_add_virtual_key_per_model_budget_creation_on_the_virtual_key_sheet branch from 3ef24fc to 40c75ff Compare August 11, 2026 11:01
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@BearTS
BearTS force-pushed the 07-31-feat_provider_config_card_to_show_model_budgets branch from 3fdc968 to e95ca27 Compare August 11, 2026 11:19
@BearTS
BearTS force-pushed the 07-31-feat_add_virtual_key_per_model_budget_creation_on_the_virtual_key_sheet branch from 40c75ff to b2209df Compare August 11, 2026 11:19
@BearTS
BearTS force-pushed the 07-31-feat_provider_config_card_to_show_model_budgets branch from e95ca27 to 1e1f23a Compare August 11, 2026 11:30
@BearTS
BearTS force-pushed the 07-31-feat_add_virtual_key_per_model_budget_creation_on_the_virtual_key_sheet branch from b2209df to ad9a9ea Compare August 11, 2026 11:30

akshaydeo commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Merge activity

  • Aug 11, 2:09 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Aug 11, 2:11 PM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo
akshaydeo changed the base branch from 07-31-feat_add_virtual_key_per_model_budget_creation_on_the_virtual_key_sheet to graphite-base/5704 August 11, 2026 14:09
@akshaydeo
akshaydeo changed the base branch from graphite-base/5704 to main August 11, 2026 14:09
@akshaydeo
akshaydeo dismissed coderabbitai[bot]’s stale review August 11, 2026 14:09

The base branch was changed.

@akshaydeo
akshaydeo merged commit 445259d into main Aug 11, 2026
11 checks passed
@akshaydeo
akshaydeo deleted the 07-31-feat_provider_config_card_to_show_model_budgets branch August 11, 2026 14:11
atharvamhaske pushed a commit to atharvamhaske/bifrost that referenced this pull request Aug 13, 2026
…#5704)

## Summary

Fixes a misleading "No budget" label shown in the provider config card header when a provider has model-level budgets configured but no provider-level cap. The header summary now reflects the actual budget state by combining the provider cap and model budget count.

## Changes

- Computes a `headerSummary` that joins the provider-level cap label and a model budget count (e.g. "3 model budgets") with a `·` separator, falling back to "No budget" only when neither is present
- Replaces the spacer `<span>` and separate `capLabel` span with a single truncating, right-aligned span that displays `headerSummary` with a `title` tooltip for overflow cases

## Type of change

- [x] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [x] UI (React)
- [ ] Docs

## How to test

1. Open a provider config card that has model budgets set but no provider-level cap.
2. Verify the header now shows e.g. "2 model budgets" instead of "No budget".
3. Open a provider config card with both a provider cap and model budgets set.
4. Verify the header shows both joined by `·`, e.g. "$100/mo · 2 model budgets".
5. Open a provider config card with no budgets at all and verify it still shows "No budget".

```sh
cd ui
pnpm i || npm i
pnpm build || npm run build
```

## Screenshots/Recordings

Before: A provider with only model budgets displayed "No budget" in the card header.

After: The header correctly reflects the model budget count (and provider cap when present).

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

## Security considerations

None.

## 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
akhsaul pushed a commit to akhsaul/bifrost that referenced this pull request Aug 27, 2026
…#5704)

## Summary

Fixes a misleading "No budget" label shown in the provider config card header when a provider has model-level budgets configured but no provider-level cap. The header summary now reflects the actual budget state by combining the provider cap and model budget count.

## Changes

- Computes a `headerSummary` that joins the provider-level cap label and a model budget count (e.g. "3 model budgets") with a `·` separator, falling back to "No budget" only when neither is present
- Replaces the spacer `<span>` and separate `capLabel` span with a single truncating, right-aligned span that displays `headerSummary` with a `title` tooltip for overflow cases

## Type of change

- [x] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [x] UI (React)
- [ ] Docs

## How to test

1. Open a provider config card that has model budgets set but no provider-level cap.
2. Verify the header now shows e.g. "2 model budgets" instead of "No budget".
3. Open a provider config card with both a provider cap and model budgets set.
4. Verify the header shows both joined by `·`, e.g. "$100/mo · 2 model budgets".
5. Open a provider config card with no budgets at all and verify it still shows "No budget".

```sh
cd ui
pnpm i || npm i
pnpm build || npm run build
```

## Screenshots/Recordings

Before: A provider with only model budgets displayed "No budget" in the card header.

After: The header correctly reflects the model budget count (and provider cap when present).

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

## Security considerations

None.

## 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
occcat pushed a commit to occcat/bifrost that referenced this pull request Sep 2, 2026
…#5704)

## Summary

Fixes a misleading "No budget" label shown in the provider config card header when a provider has model-level budgets configured but no provider-level cap. The header summary now reflects the actual budget state by combining the provider cap and model budget count.

## Changes

- Computes a `headerSummary` that joins the provider-level cap label and a model budget count (e.g. "3 model budgets") with a `·` separator, falling back to "No budget" only when neither is present
- Replaces the spacer `<span>` and separate `capLabel` span with a single truncating, right-aligned span that displays `headerSummary` with a `title` tooltip for overflow cases

## Type of change

- [x] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [ ] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [x] UI (React)
- [ ] Docs

## How to test

1. Open a provider config card that has model budgets set but no provider-level cap.
2. Verify the header now shows e.g. "2 model budgets" instead of "No budget".
3. Open a provider config card with both a provider cap and model budgets set.
4. Verify the header shows both joined by `·`, e.g. "$100/mo · 2 model budgets".
5. Open a provider config card with no budgets at all and verify it still shows "No budget".

```sh
cd ui
pnpm i || npm i
pnpm build || npm run build
```

## Screenshots/Recordings

Before: A provider with only model budgets displayed "No budget" in the card header.

After: The header correctly reflects the model budget count (and provider cap when present).

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

## Security considerations

None.

## 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
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.

2 participants