Repository navigation
fix(api): refuse creating a routing combo without any model - #11162
Merged
diegosouzapw merged 1 commit intoAug 23, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
Third-party report cheaper-inference#10954 framed always-empty creation as a bug and cheaper-inference#11011 made populated creation the normal CLI path (--models/--model), so an empty draft has no remaining legitimate route. This closes the remaining hole on both transports: POST /api/combos now returns 400 for a missing or empty models list, and omniroute combo create requires --models/--model instead of silently writing models: []. Consistent with the existing fail-closed behavior for empty pools (cheaper-inference#8494, cheaper-inference#6546): the dashboard already refused empty combos client-side, six downstream consumers reject the empty object, and /api/combos/duplicate already returns 400 for it. JSON migration is unaffected (it validates through the combo invariants, not this schema).
maxmad64bis
force-pushed
the
fix/combo-create-min1
branch
from
August 22, 2026 20:06
f3af782 to
2b69e43
Compare
diegosouzapw
merged commit Aug 23, 2026
b384455
into
cheaper-inference:release/v3.8.50
9 of 16 checks passed
jonlwheat2-gif
added a commit
to jonlwheat2-gif/OmniRoute
that referenced
this pull request
Aug 23, 2026
…cheaper-inference#11203) Rebuilt on the current base (79c5bdf) after the owner's cheaper-inference#10964 fixed the first 7 failures (combos, HarImport, aihorde SSRF, config-generator 128K, quota 403, openrouter allExpired, pt-BR keys). This carries the remaining base-red failures: - guide-settings-route.test.ts: v2 providers.omniroute dual-write assertion — cheaper-inference#10964 updated the model-limit blocks but missed the stale content.providers === undefined assert (line 130) - t40-opencode-cli-tools-integration.test.ts: v2 schema assert - clinepass-provider.test.ts: z-ai/glm-5.2 vendor prefix (cheaper-inference#6108) - provider-alias-uniqueness.test.ts: Hack Club AI removal (cheaper-inference#11118) - eslint-suppressions.json: prune 2 stale entries - cli-combo-command.test.ts: pass models to combo create (cheaper-inference#11162, reported by reviewer as cheaper-inference#11203) — verified 5/5 on Linux (Docker)
diegosouzapw
pushed a commit
that referenced
this pull request
Aug 23, 2026
Validated on the combined batch board over tip 8a42aee: static gates clean (changelog, file-size 159 frozen, complexity 2621<=2774, cognitive 1181<=1223, dead-code 408<=416), typecheck:core clean, 107 focused tests green. This drains the remaining #9985 tail — the v2 dual-write assertions (guide-settings/t40), the zai→z-ai stale id, the hackclub leftovers, and the #11162 cli-combo models (#11203). Note: guide-settings also trips this devbox's container guard (/.dockerenv present), an environment artifact unrelated to CI. Base is green again. Thank you @jonlwheat2-gif!
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…inference#11162) Validated on the combined batch board over tip 4813c32: static gates clean (changelog, file-size, complexity 2624<=2774, cognitive 1182<=1223, dead-code 411<=416), typecheck:core clean, focused tests green. Combo without models is now refused at the schema boundary (API 400), the CLI flags it, and openapi.yaml matches the real contract (phantom props removed). combo-* suites + cli-combo-create-models green on the board. Closes cheaper-inference#10954. Thank you @maxmad64bis!
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…cheaper-inference#11203) (cheaper-inference#11201) Validated on the combined batch board over tip 76f9b2f: static gates clean (changelog, file-size 159 frozen, complexity 2621<=2774, cognitive 1181<=1223, dead-code 408<=416), typecheck:core clean, 107 focused tests green. This drains the remaining cheaper-inference#9985 tail — the v2 dual-write assertions (guide-settings/t40), the zai→z-ai stale id, the hackclub leftovers, and the cheaper-inference#11162 cli-combo models (cheaper-inference#11203). Note: guide-settings also trips this devbox's container guard (/.dockerenv present), an environment artifact unrelated to CI. Base is green again. Thank you @jonlwheat2-gif!
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
createComboSchemarequires a non-emptymodelslist, soPOST /api/combosreturns 400 for a missing or empty list.omniroute combo createrequires--models <provider/model,...>and/or repeated--model, instead of silently writingmodels: [].docs/openapi.yaml:ComboCreatealigned with the actual request contract (required: [name, models], unionstring | structured entry, phantom propertiesmodel/nodesremoved).Related Issues
Validation
node --import tsx/esm --test tests/unit/combo-empty-models.test.ts tests/unit/combo-context-length.test.ts tests/unit/combo-bracket-names.test.ts tests/unit/cli-combo-create-models-10954.test.ts(and the fulltests/unit/combo-*/combos-*set) — all greennpm run lint— no new findings from this PR's files (pre-existing failures elsewhere are unchanged; see Reviewer Notes)Manual loop on a live server:
POST /api/comboswithoutmodels→ 400; with one model → 201;combo createwithout--models→ stderr message naming the flags, exit code 1.Tests Added Or Updated
tests/unit/combo-empty-models.test.ts— invariant inverted: creating without a model is refused at the boundary (was: asserted allowed).tests/unit/cli-combo-create-models-10954.test.ts— new regression: the guard fires before reaching either transport (HTTP body or local-db fallback).tests/unit/combo-context-length.test.ts,tests/unit/combo-bracket-names.test.ts— fixtures updated for the now-requiredmodels(8 call sites total).Coverage Notes
Production change is confined to
src/shared/validation/schemas/combo.ts(one line + comment) andbin/cli/commands/combo.mjs(guard). Covered bytests/unit/combo-empty-models.test.tsandtests/unit/cli-combo-create-models-10954.test.tsrespectively. No coverage moved down in touched files.Reviewer Notes
/api/combos/duplicatealready returns 400 for an empty list (fix(cli): combo create cannot accept models — add --models option (#10954) #11011 made populated creation the normal CLI path), six downstream consumers reject the empty object, and fail-closed is the established behavior for empty pools (fix(backend): fail closed when capability filters empty the combo pool #8494, fix(providers): fail fast on empty auto-combo pool instead of 15s timeout (#6458) #6546). Since fix(cli): combo create cannot accept models and always creates an empty combo #10954 framed always-empty creation as a bug and fix(cli): combo create cannot accept models — add --models option (#10954) #11011 removed the last legitimate use of an empty draft, this closes the remaining hole. Intended consequence: a legacy combo stored empty in the database can no longer be duplicated from the dashboard (duplicate re-posts throughPOST /api/combos) — consistent with the duplicate route already refusing empties._rebaseline_2026_08_22_combo_create_min1documents 3 own findings (removedmodel, removednodes, added requiredmodelson POST /api/combos — spec-vs-server drift, not client-facing breakage) + 1 inherited finding (PATCH /api/combos/{id} request-body-added-required), which is pre-existing drift already present at this PR's base commit — that route declares its own inline requestBody schema and does not referenceComboCreate. A dedicated tracking issue can be filed if preferred; happy to reference it here.