Files
OmniRoute/tests
Diego Rodrigues de Sa e Souza 98ba6e192a fix(dashboard): show custom vision models in LLM selector
A custom chat model registered via the dashboard with the
`supportsVision: true` flag (persisted by addCustomModel /
replaceCustomModels in src/lib/db/models.ts since #4264) now surfaces
`capabilities.vision: true` in `/v1/models`, so the LLM selector and
downstream vision routing treat it as vision-capable. Previously the
`/v1/models` catalog only checked the conservative id-based
`isVisionModelId` heuristic and ignored the explicit per-model flag, so
a custom model whose id did not match the heuristic (e.g.
`my-vision-llm`) appeared as text-only even when explicitly marked
vision in the dashboard.

The two custom-chat-model emission sites (alias and canonical) now call
the new pure exported helper `getCustomVisionCapabilityFields` which:

 - returns vision fields when `entry.supportsVision === true`, OR
 - falls back to the existing id-based heuristic for backwards-compat,
 - respects an explicit `supportsVision === false` as a downgrade
   override (same anti-false-positive discipline as #4071 / #4072).

`CustomModelEntry` gains the `supportsVision?: boolean` field already
present on the persistence layer.

Covered by tests/unit/llm-selector-custom-vision-models.test.ts (5
cases: helper export, flag-true unblock, id-heuristic preserved, no
signal yields nothing, explicit-false downgrade).

Inspired-by: https://github.com/decolua/9router/commit/5e5e78d3

Co-authored-by: Sutarto Jordan Chrisfivo <Jordannst@users.noreply.github.com>
2026-06-23 22:03:55 -03:00
..
2026-06-17 19:26:32 -03:00
2026-05-23 01:46:59 -03:00
2026-06-20 07:09:43 -03:00
2026-06-19 06:49:01 -03:00
2026-06-23 17:06:18 -03:00
2026-06-10 13:49:08 -03:00
2026-06-13 17:27:40 -03:00