Repository navigation
feat(combos): badge combo editor steps whose model left the live catalog - #15923
Merged
diegosouzapw merged 12 commits intoOct 25, 2026
Conversation
GET /api/combos/builder/options now returns staleComboRefs: combo steps pinned to a model the provider's live catalog no longer lists, across every provider an explicit step uses. It reuses findStaleComboModelRefs, so the fail-open rule for providers without an authoritative catalog is unchanged. A failed check degrades to an empty list instead of breaking the builder.
The combo editor reads staleComboRefs from the builder options it already fetches on open and marks matching explicit model steps with an amber "Not in live catalog" badge. Staleness is a property of the model, so any step using a flagged model is marked. Combo refs and provider wildcards are never marked.
Adds combos.builderStaleModel ("Not in live catalog") to en.json and its
translation for the am..gu locales. check-new-key-coverage requires a
new key to be translated in every locale; the change is split by locale range
only to stay under the API payload limit.
Translates combos.builderStaleModel ("Not in live catalog") for the
ha..lv locales.
Translates combos.builderStaleModel ("Not in live catalog") for the
ml..ru locales.
Translates combos.builderStaleModel ("Not in live catalog") for the
si..zh-TW locales.
6 tasks done
Open
3 tasks
findAllStaleComboModelRefs collected step providers and deduped refs in one nested loop, which crossed the cognitive-complexity limit. Move provider lookup and collection into helpers so the new code adds no violation.
The step row and the review summary repeated the same five-way ternary for the step kind subtitle. Move it into getComboStepKindLabel so the stale badge wiring keeps combos/page.tsx under its frozen file-size ceiling.
Collaborator
|
Hi @tiagovilasboas — closing this pull request to clear the open queue. The branch |
Collaborator
|
Hi @tiagovilasboas — reopening this pull request. The close was a mistake, and it is back in the merge queue. The branch |
Collaborator
|
Re-homed to |
diegosouzapw
merged commit Oct 25, 2026
aa3ab2b
into
cheaper-inference:release/v3.8.53
87 of 161 checks passed
diegosouzapw
added a commit
that referenced
this pull request
Oct 27, 2026
…odel-test Resolve combos/page.tsx imports: keep the base's StaleModelBadge import and the PR's ComboStepTestButton import. The base (#15923) already ships getComboStepKindLabel in comboPageHelpers.tsx, so drop the PR's duplicate copy that git merged in silently; page.tsx keeps using the shared helper.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /api/combos/builder/options(the editor already fetches it when it opens) now also returnsstaleComboRefs. It is built by a newfindAllStaleComboModelRefs(), which runs the existingfindStaleComboModelRefsfor every provider an explicit combo step pins. The detection and its fail-open rule are unchanged: a provider without an authoritative catalog flags nothing. If the check throws, the route returns an empty list, so the builder never breaks because of it.provider/*wildcard steps never get it.Related Issues
Validation
tests/unit/combo-stale-model-refs-13505.test.ts(6/6),tests/unit/combo-builder-options-route.test.ts,tests/unit/dashboard/combos-client-boundary.test.mjs, the vitest UI test (4/4), and the impacted unit set from the test-impact map (896/896, see Coverage Notes)npm run lintscope: eslint + prettier clean on all touched files.check-api-typecheckOK (within the frozen baseline), and no new type errors in the touched filescheck-new-key-coveragePASS (66 locales),check-key-completenessOK,check-ui-value-driftPASS,check-ui-keys-coverage --threshold=65PASSrelease/v3.8.52@f9989a14)Tests Added Or Updated
tests/unit/combo-stale-model-refs-13505.test.ts: new case.findAllStaleComboModelRefsflags only the stale explicit step: a live step, aprovider/*wildcard and another provider's step without a catalog are not flagged.GET /api/combos/builder/optionsreturns the same refs instaleComboRefs.tests/unit/dashboard/StaleModelBadge.test.tsx(new, vitest + Testing Library, same pattern asComboSortSelect.test.tsx): builds the stale set from the refs, matches string and{ providerId, model }steps, ignores combo refs and wildcards, and renders the label and tooltip.Coverage Notes
src/lib/combos/staleModelRefs.ts(findAllStaleComboModelRefs) andsrc/app/api/combos/builder/options/route.tsare covered by the node test with the real DB, the realgetModelInfoand the real route.src/app/(dashboard)/dashboard/combos/StaleModelBadge.tsxis covered by the vitest test. Thepage.tsxchange only wires the state and renders the badge.test:scoped:page.tsx, the newStaleModelBadge.tsxand locale files that no node test reads resolve to__RUN_ALL__in the impact map, even after rebuilding it. Locally I ran the union the selector maps for the other files plus everytests/unit/*i18n*.test.ts: 896/896 passed. The full suite runs in CI.Reviewer Notes
combos.*key inen.jsonread throughgetI18nOrFallback.check-new-key-coverageblocks a new key unless every locale has a real translation, and markers no longer pass. So the PR adds one key,combos.builderStaleModel, translated in all 66 locales: one line per locale file, 67 lines in total. That is the whole i18n footprint. The badge text doubles as its tooltip, which keeps it to a single key.check-translation-ratiofails onmyandphion the release base itself, with the same numbers with and without this PR. This PR adds no untranslated values.