mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
Fixes the root cause where OpenCode falls back to a ~4000 token limit for combos because no context_length is exposed in /v1/models. Previously combos only used context_length when set manually on the combo record. Now, when unset, the catalog computes the effective limit as the MINIMUM of its targets' individual token limits via getTokenLimit()/parseModel(). Manual values still override. Files changed: - src/app/api/v1/models/catalog.ts (+30 lines, auto-calc) - tests/unit/models-catalog-route.test.ts (+2 tests) Tests pass: 25/25