Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
fix(model-hub): mute the no-price cost cell in the usage table (#2215)
Call Whitedd609930f3ed
diff --git a/ui/src/components/settings/models/UsageTab.test.tsx b/ui/src/components/settings/models/UsageTab.test.tsxindex a12f20dbc..5c4a7c283 100644--- a/ui/src/components/settings/models/UsageTab.test.tsx+++ b/ui/src/components/settings/models/UsageTab.test.tsx@@ -429,6 +429,9 @@ describe('UsageTab', () => {pricing: { currency: 'USD', price_table_date: '2026-09-23' },});};+ // No price is not an amount: its table cell reads muted, never in the money colour.+ const mutedCostCells = (root: Element) => [...root.querySelectorAll('tbody .model-hub-usage-table-total.is-unpriced')]+ .map((cell) => cell.textContent);it('MH-USAGE-030: offers the API-price metric only for a priced report', () => {draw(report());@@ -455,6 +458,7 @@ describe('UsageTab', () => {expect(container.querySelector('.model-hub-usage-table-scroll')?.textContent).toContain('$0.50');expect(container.querySelector('.model-hub-usage-table-scroll')?.textContent).not.toContain('≥');expect(container.querySelector('.model-hub-usage-table-scroll tbody')?.textContent).toMatch(/\d%/);+ expect(mutedCostCells(container)).toEqual(['No price yet']);cleanup();// A floor keeps its 「≥」 in the itemized rows and the table total, not only the card.@@ -468,6 +472,8 @@ describe('UsageTab', () => {const table = drawn.container.querySelector('.model-hub-usage-table-scroll')!;expect(table.querySelector('tbody')!.textContent).toContain('≥ $0.50');expect(table.querySelector('tfoot')!.textContent).toContain('≥ $0.50');+ // A floor is still money; only the row with nothing priced reads muted.+ expect(mutedCostCells(table)).toEqual(['No price yet']);// A share of a floor total is not a known fraction.expect(table.querySelector('tbody')!.textContent).not.toMatch(/\d%/);});@@ -548,6 +554,7 @@ describe('UsageTab', () => {expect(container.querySelector('.model-hub-usage-legend')!.textContent).toContain('Fetching prices…');expect(container.querySelector('.model-hub-usage-table-scroll')!.textContent).toContain('Fetching prices…');expect(container.textContent).not.toContain('No price yet');+ expect(mutedCostCells(container)).toEqual(['Fetching prices…', 'Fetching prices…']);});it('MH-USAGE-031: reads the API-price value in Chinese as a conversion, not a charge', async () => {diff --git a/ui/src/components/settings/models/UsageTab.tsx b/ui/src/components/settings/models/UsageTab.tsxindex 598329d2a..0beb001a2 100644--- a/ui/src/components/settings/models/UsageTab.tsx+++ b/ui/src/components/settings/models/UsageTab.tsx@@ -1285,7 +1285,7 @@ export const UsageTab: React.FC<{<td>{usageTokensAreKnown(row.counters) ? count(usageNonCachedInput(row.counters)) : t('settings.models.usage.blank')}</td><td>{tokenText(row.counters, 'cache', count, t('settings.models.usage.blank') as string)}</td><td>{tokenText(row.counters, 'output', count, t('settings.models.usage.blank') as string)}</td>- <td className="model-hub-usage-table-total">{metric === 'cost' && usageHasNoPrice(row.counters)+ <td className={cn('model-hub-usage-table-total', metric === 'cost' && usageHasNoPrice(row.counters) && 'is-unpriced')}>{metric === 'cost' && usageHasNoPrice(row.counters)? noPriceText(report, t): metricText(row.counters)}</td><td>{share === null ? t('settings.models.usage.blank') : formatPercent(share, i18n.language, 1)}</td>diff --git a/ui/src/components/settings/models/modelHubSurface.css b/ui/src/components/settings/models/modelHubSurface.cssindex 43d562054..7842f3eb3 100644--- a/ui/src/components/settings/models/modelHubSurface.css+++ b/ui/src/components/settings/models/modelHubSurface.css@@ -2901,6 +2901,11 @@font-weight: 650;}+/* No price (or one still being fetched) is not an amount; only money takes the money colour. */+.model-hub-usage-table-total.is-unpriced {+ color: var(--muted);+}+.model-hub-usage-table-empty {padding: 22px 12px !important;color: var(--model-hub-muted-b3);