mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-03 05:45:04 +03:00
models.dev catalogs Pixtral 12B under the short id `pixtral-12b` (attachment: true, image modality), while requests use the Mistral API alias `pixtral-12b-latest`. getSyncedCapabilityForResolved tried only exact / raw / static-spec-canonical ids, all of which miss the short form, so vision fell through to the #4071 model-id heuristic and `attachment` stayed null. Add a last-resort fallback that retries the synced lookup with a trailing `-latest` stripped, so synced metadata wins for these aliases. Models whose `-latest` id is stored verbatim (e.g. pixtral-large-latest) keep resolving directly. TDD: tests/unit/model-capabilities-mistral-vision-sync-4073.test.ts (RED 2/4 -> GREEN 4/4) seeds a synced fixture and asserts the verdict comes via the synced path (attachment === true/false), not the heuristic. The models.dev sync remains manual-only (no scheduled refresh) — documented as a separate follow-up.