Skip to content

fix(health): omit idle models from health matrix by default - #16333

Merged
diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.52from
maxmad64bis:fix/health-matrix-omit-idle-models
Oct 16, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.52from
maxmad64bis:fix/health-matrix-omit-idle-models

Conversation

@maxmad64bis

@maxmad64bis maxmad64bis commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ base-red inherited: #15306

Summary

By default the provider health matrix returns the models with traffic or a lockout plus a per-account count of the idle models it skips instead of a line per synced model.

On 2026-10-11 the route returned 2,176,563 bytes for 33 providers, and idle lines weighed 2,127,539 of them.

When a client passes ?includeIdleModels=true, the route returns the full list, so an integration that reads the whole list doesn't break.

Related Issues

  • No linked issue — found while reading the provider health query

Target Branch

  • Base is the active release/v3.8.x branch (the highest open release/v*), not main
  • New feature? From 3.8.55 on it is held with the v4-feature label for the v4 channel

Validation

  • Change type: provider
  • Focused tests and category gates from the golden path
  • npm run lint
  • Reconciled with the current active release base; focused checks rerun afterward
  • Production-code changes include a new or updated automated test in this PR

Tests Added Or Updated

  • tests/unit/provider-health-matrix.test.ts — 7 new cases: 600-model default omission, locked model without traffic, full list via flag at function and route level, invalid flag rejected with 400, empty account unchanged, idle-only account counted.

Coverage Notes

  • src/lib/monitoring/providerHealthMatrix.ts — covered by the 7 new cases in tests/unit/provider-health-matrix.test.ts.
  • src/app/api/providers/health-matrix/route.ts — covered by the new route cases in tests/unit/provider-health-matrix.test.ts.
  • src/app/(dashboard)/dashboard/health/ProviderHealthMatrixCard.tsx — no dedicated card test exists in the repo; the count it reads is covered by the new server cases and the existing suites stay green.

Reviewer Notes

  • Behavior: API clients now get active models plus a per-account idle count unless they pass includeIdleModels=true. The health card adds that count to its existing "+N more models" label and keeps the empty state for accounts with nothing synced.

@maxmad64bis
maxmad64bis force-pushed the fix/health-matrix-omit-idle-models branch from 12e4cd8 to 94417aa Compare October 11, 2026 11:09
Idle rows stay counted per account; includeIdleModels=true restores the full list.
@maxmad64bis
maxmad64bis force-pushed the fix/health-matrix-omit-idle-models branch from 94417aa to 7818494 Compare October 11, 2026 11:50
@maxmad64bis
maxmad64bis marked this pull request as ready for review October 11, 2026 12:17
@diegosouzapw
diegosouzapw merged commit dc7caa0 into cheaper-inference:release/v3.8.52 Oct 16, 2026
30 of 52 checks passed
@maxmad64bis
maxmad64bis deleted the fix/health-matrix-omit-idle-models branch October 18, 2026 22:37
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