Skip to content

fix(catalog): degrade unknown combo targets in LCD modalities (#12613) - #13042

Merged
diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.51from
HouMinXi:fix/combo-openrouter-modalities-12613
Sep 11, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.51from
HouMinXi:fix/combo-openrouter-modalities-12613

Conversation

@HouMinXi

@HouMinXi HouMinXi commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Description

User-defined combos used Array.every on modality arrays, so one unknown or empty-modality target wiped input_modalities for the whole combo. OpenRouter live catalog already had architecture.input_modalities on the wire but never wrote them into model_capabilities, so combo LCD could not see them.

Changes

  • intersectKnownStringArrays skips empty arrays (degrade, do not wipe).
  • Combo LCD and builtin auto/* both use it.
  • OpenRouter live walk upserts modalities into model_capabilities without a full-table replace.
  • Non-positive OpenRouter limits are stored as null. Conflict updates refresh every capability column. Cache invalidation only runs when SQLite reports a change.

Test plan

  • node --import tsx/esm --test tests/unit/combo-openrouter-modalities-12613.test.ts (5/5)
  • tests/unit/11947-auto-combo-modalities.test.ts + tests/unit/catalog-helpers-extraction.test.ts (22/22 with the new file)
  • Injection: old intersectStringArrays on [vision, []] returns []; new helper keeps text,image.

Closes #12613

@HouMinXi
HouMinXi force-pushed the fix/combo-openrouter-modalities-12613 branch 2 times, most recently from 7543c3f to 3d901ca Compare September 10, 2026 12:59
…r-inference#12613)

Unknown or empty-modality combo steps no longer wipe the intersection.
OpenRouter architecture.input_modalities is upserted into model_capabilities
so the next catalog walk can see them.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
@HouMinXi
HouMinXi force-pushed the fix/combo-openrouter-modalities-12613 branch from 3d901ca to 7f4066a Compare September 11, 2026 08:23
@HouMinXi

Copy link
Copy Markdown
Contributor Author

CI red on this PR matches current release/v3.8.51, not the unique files in the diff.

Measured on tip af49d4972 (#12925) against the HouMinXi open set:

  • Docs Gates: live provider modules 358 vs docs/SVG still saying 356; cli-tunnel skill dry-run out of date.
  • Fast Quality: open-sse/services/autoCombo/__tests__/autoCombo.test.ts TS2739 vs frozen baseline 0; pack-policy follows that.
  • ESLint: tests/unit/volcengine-plan-binding-upsert.test.ts @typescript-eslint/no-explicit-any (file is on tip).
  • Unit shards: chat-rate-limit-body-lock, antigravity-missing-project-chat, chat-rejects-image-only-model, stream-handler-public-error-boundary (and the glm GLM_STREAM_BUFFER_BYTES assert, which fix(stream): accept the buffer size glm.ts has been passing since #12179 #12925 already landed on tip).

Unique diff does not touch those files. Contributor-only; not merging.

@diegosouzapw
diegosouzapw merged commit f4fd919 into cheaper-inference:release/v3.8.51 Sep 11, 2026
8 of 16 checks passed
@HouMinXi
HouMinXi deleted the fix/combo-openrouter-modalities-12613 branch September 16, 2026 14:01
Githab-capibara added a commit to Githab-capibara/OmniRoute that referenced this pull request Sep 17, 2026
…r-inference#12613) (cheaper-inference#13042)

`Array.every` on modality arrays meant one unknown target wiped `input_modalities` for the entire combo — degrade-not-wipe is the correct semantic for a least-common-denominator. Upserting OpenRouter's live `architecture.input_modalities` without a full-table replace, and only invalidating cache when SQLite reports a change, are both the careful version.

---

Validated in one consolidated worktree cut from `release/v3.8.51`, boarded with the other 19 PRs of this batch. Two in-batch conflicts, both additive and resolved by keeping each side: the `ENVIRONMENT.md` table (cheaper-inference#13035 + cheaper-inference#13011) and the `chatHelpers.ts` import block (cheaper-inference#12975 on the tip + cheaper-inference#13017).

- `typecheck:core` clean; `check:dashboard-typecheck` OK (206 pre-existing, within baseline); `check:changelog-integrity` OK; `check:docs-counts` migrations ✓
- complexity 2816 / baseline 3218 and cognitive-complexity 1271 / baseline 1437 — both under baseline
- 531 of 532 focused assertions green across the batch's 46 test files
- `check-file-size` rebaselined for the batch's real growth (annotation `_rebaseline_2026_09_11_mergebatch_v3851_houminxi`, landed on cheaper-inference#13038), attributed per PR

The single red is **not this batch**: `tests/unit/combo/quota-weighted-strategy.test.ts` → "A/B isolation: 7 hard-empty + 2 at 0.5% + 1 at 40%, floor=1" asserts an order between two connections of identical weight and flakes on the pure tip too — 2 failures in 4 runs at `origin/release/v3.8.51` with nothing from this batch applied.

⚠️ base-red inherited: cheaper-inference#12732 — `Docs Gates`, `Merge integrity`, `No new ESLint warnings`, `Unit Tests fast-path` and `Fast Quality Gates` reproduce on the pure tip (provider count 356 vs the 358 the modules define, SKILL.md drift, and `open-sse/utils/stream.ts` at 3115 > frozen 3098, untouched here).

Thanks @HouMinXi — the live evidence on these (X500 logs, `storage.sqlite` state, real `/v1/models` probes, the 36-minute outage write-up) is what let a 20-PR batch be reviewed as a unit.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…r-inference#12613) (cheaper-inference#13042)

`Array.every` on modality arrays meant one unknown target wiped `input_modalities` for the entire combo — degrade-not-wipe is the correct semantic for a least-common-denominator. Upserting OpenRouter's live `architecture.input_modalities` without a full-table replace, and only invalidating cache when SQLite reports a change, are both the careful version.

---

Validated in one consolidated worktree cut from `release/v3.8.51`, boarded with the other 19 PRs of this batch. Two in-batch conflicts, both additive and resolved by keeping each side: the `ENVIRONMENT.md` table (cheaper-inference#13035 + cheaper-inference#13011) and the `chatHelpers.ts` import block (cheaper-inference#12975 on the tip + cheaper-inference#13017).

- `typecheck:core` clean; `check:dashboard-typecheck` OK (206 pre-existing, within baseline); `check:changelog-integrity` OK; `check:docs-counts` migrations ✓
- complexity 2816 / baseline 3218 and cognitive-complexity 1271 / baseline 1437 — both under baseline
- 531 of 532 focused assertions green across the batch's 46 test files
- `check-file-size` rebaselined for the batch's real growth (annotation `_rebaseline_2026_09_11_mergebatch_v3851_houminxi`, landed on cheaper-inference#13038), attributed per PR

The single red is **not this batch**: `tests/unit/combo/quota-weighted-strategy.test.ts` → "A/B isolation: 7 hard-empty + 2 at 0.5% + 1 at 40%, floor=1" asserts an order between two connections of identical weight and flakes on the pure tip too — 2 failures in 4 runs at `origin/release/v3.8.51` with nothing from this batch applied.

⚠️ base-red inherited: cheaper-inference#12732 — `Docs Gates`, `Merge integrity`, `No new ESLint warnings`, `Unit Tests fast-path` and `Fast Quality Gates` reproduce on the pure tip (provider count 356 vs the 358 the modules define, SKILL.md drift, and `open-sse/utils/stream.ts` at 3115 > frozen 3098, untouched here).

Thanks @HouMinXi — the live evidence on these (X500 logs, `storage.sqlite` state, real `/v1/models` probes, the 36-minute outage write-up) is what let a 20-PR batch be reviewed as a unit.
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.

fix(api): combo input_modalities dropped when an OpenRouter target is added

2 participants