Skip to content

fix(combo): record live-catalog misses as model_not_in_catalog - #14069

Merged
diegosouzapw merged 3 commits into
cheaper-inference:release/v3.8.51from
RaviTharuma:fix/14068-clear-model-not-found-for-unknown-aliases
Sep 22, 2026
Merged

diegosouzapw merged 3 commits into
cheaper-inference:release/v3.8.51from
RaviTharuma:fix/14068-clear-model-not-found-for-unknown-aliases

Conversation

@RaviTharuma

@RaviTharuma RaviTharuma commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • A combo member that resolves but is absent from the live catalog is skipped as model_not_in_catalog instead of the generic availability bucket.
  • That reason is allowlisted and grouped in diagnostics.skippedTargets on ALL_TARGETS_SKIPPED.
  • The previous scaffolding (src/lib/model-not-found.ts, the unused helper test, and the docs-root note) is gone. checkModelAvailable returns the distinct reason when getModelInfo reports errorType: "model_not_found".

Related Issues

Validation

  • Change type: routing
  • Focused tests: tests/unit/combo/combo-skipped-targets-summary.test.ts, tests/unit/combo/combo-decision-trace.test.ts (16 passed)
  • npm run lint — not run for the whole repo in this pass
  • Reconciled with current release/v3.8.51 (a61b34d7f2)
  • Production-code changes include a new automated test in this PR
  • SonarQube is temporarily opt-in while the private project has no quota; it is not a PR gate.

Tests Added Or Updated

  • tests/unit/combo/combo-skipped-targets-summary.test.ts — model_not_in_catalog is distinct from availability and groups in skippedTargets.

Coverage Notes

  • open-sse/services/combo/executeTargetGates.ts records the new reason through modelAvailabilitySkipReason.
  • Other isModelAvailable callers treat any non-true result as unavailable so a catalog miss is not dispatched.

Reviewer Notes

@RaviTharuma
RaviTharuma force-pushed the fix/14068-clear-model-not-found-for-unknown-aliases branch from e3dfc11 to bbadbf4 Compare September 18, 2026 07:05
@RaviTharuma
RaviTharuma marked this pull request as ready for review September 18, 2026 12:20
@RaviTharuma
RaviTharuma force-pushed the fix/14068-clear-model-not-found-for-unknown-aliases branch from bbadbf4 to 386977a Compare September 18, 2026 12:20
@RaviTharuma RaviTharuma changed the title feat: clear model-not-found scaffolding for unknown aliases (#14068) fix(api): return catalog model_not_found from GET /v1/models/{id} Sep 18, 2026
@RaviTharuma

Copy link
Copy Markdown
Contributor Author

Taken out of draft. Rebased onto release/v3.8.51 (includes the #14079 typecheck baseline repair). GET /v1/models/{id} now returns the shared model_not_found payload (param: model) instead of a generic 404 body. Ready for review.

A combo member absent from the live catalog was skipped as generic
availability, so ALL_TARGETS_SKIPPED could not say the model was missing.
checkModelAvailable now returns model_not_in_catalog for that case and
the pre-dispatch gate records it on the decision trace.
@RaviTharuma
RaviTharuma force-pushed the fix/14068-clear-model-not-found-for-unknown-aliases branch from 5e69109 to 9b8f2ee Compare September 22, 2026 16:46
@RaviTharuma RaviTharuma changed the title fix(api): return catalog model_not_found from GET /v1/models/{id} fix(combo): record live-catalog misses as model_not_in_catalog Sep 22, 2026
@diegosouzapw
diegosouzapw merged commit 819adea into cheaper-inference:release/v3.8.51 Sep 22, 2026
9 of 16 checks passed
diegosouzapw pushed a commit that referenced this pull request Sep 22, 2026
…ry (#14544)

Merged — closes #11725. Thank you, @RaviTharuma.

Correlating the credential CLIProxyAPI actually selected with the usage row is the kind of plumbing that only pays off later, when someone is trying to work out *which* account burned the quota. Storing the opaque `auth_index` on all three paths (success, streaming, error) with a backfill when the first write missed the header, and resolving the human-readable label at **read** time from the sanitized account-health projection, is the right split: the column never holds an email, a path, a token or a raw management payload, and a missing or unrecognized header stays unattributed instead of failing the request.

Validation before merge: boarded onto the release tip with the other seven PRs of your batch, then reconciled twice as the branch moved under it.

- **First move:** #14559 (another session) corrected the docs migration count 178 → 181, colliding with this PR on 69 files — `README.md`, `AGENTS.md`, `llm.txt` and 66 i18n `llm.txt` mirrors, 270 hunks. All 270 were proven mechanically to be pure numeral collisions (base 178 / ours 182 / theirs 181, byte-identical otherwise), and the resolution keeps the tip's exact line shape with 182. I checked separately that no mirror lost its translated prose: 270 removed lines and 270 added lines, each pair identical but for the numeral.
- **Second move:** #14069 landed and both sides had *added* a new top-level `_rebaseline_*` key to `config/quality/file-size-baseline.json` — an add/add, so both were kept and #14069's entry is intact.

The 182 is verified, not carried over: the tip has 181 migration files and this PR adds `185_usage_history_cpa_auth_index.sql`. `check:migration-numbering` reports `182 migrations, 0 duplicates` and `check:docs-counts-sync` passes its STRICT migration-count assertion across all four claim sites.

`cpa-trace-auth-index` + `cpa-auth-index-usage` + `db/migration-185-cpa-auth-index` + `chatcore-failure-usage` 12 pass / 0 fail. `check:file-size` OK — note your `chatCore.ts` ceiling is now 6402, measured after the commit; that file had been sitting at exactly 6400 with zero headroom since #14213.

`typecheck:core` reports exactly one error, and it is **not yours**: `src/lib/services/cliproxyAccountHealth.ts` TS2322 on `host: options.host ?? externalHost`. That expression is byte-identical on the pure tip at line 146 — this PR only shifts it to 157 by adding `labelForCliproxyAuthIndex` above — and it touches neither the `host: string` type nor `externalHost`. Inherited base defect, tracked separately.

Two things your PR did that I want to name, since both were on my checklist and neither needed a bounce: you bumped the migration count in `AGENTS.md`/`llm.txt` yourself (those are agent-instruction surfaces, so I confirmed the change was purely the numeral before merging), and in doing so you drained the 178 → 181 docs drift the previous batch had deferred.

A leftover for someone else: `docs/i18n/fr/README.md` and `docs/i18n/phi/README.md` still say 178 — #14559 updated the `llm.txt` mirrors but missed the README ones. Pre-existing on the tip, outside this diff.
@RaviTharuma
RaviTharuma deleted the fix/14068-clear-model-not-found-for-unknown-aliases branch September 23, 2026 19:36
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.

feat(api): name the model-not-in-catalog exclusion in ALL_TARGETS_SKIPPED diagnostics

2 participants