jakobdylanc
284ee03df1
fix(models): resolve context length for OpenRouter :nitro/:floor routing variants
...
`:nitro`, `:floor`, `:exacto`, and `:online` are request-time routing
modifiers, not catalog models — OpenRouter's /models lists only the base
id, and a variant runs the same model with the same context window.
`get_model_context_length()` keyed every lookup on the full suffixed id,
so each one missed and the resolver fell through to a generic family
default or the 256K fallback:
openai/gpt-5.5:nitro -> 256K (real 1.05M)
x-ai/grok-4.6:nitro -> 131K (generic "grok" catch-all)
anthropic/claude-opus-4.6:nitro-> 200K (generic "claude" catch-all)
The window silently shrank, triggering early compression and a wrong
/usage readout. f14059fa fixed the sibling half of this bug class in
/model validation; this fixes the metadata half.
Strip a recognized variant suffix for LOOKUP only, keeping the suffixed
id on the wire so the routing opt-in survives. Applied after the explicit
config overrides (steps 0b/0c) so a user-pinned value still wins, and
before every cache/catalog lookup. Gated on the request actually routing
through OpenRouter, so a local Ollama `model:tag` is untouched.
`:free`/`:batch`/`:thinking` are deliberately excluded — those ARE
distinct catalog SKUs with their own windows, so stripping them would
report the wrong number.
The suffix set and base-id split move to hermes_constants (import-safe,
dependency-free) so the metadata layer shares one definition with
hermes_cli.models instead of duplicating it.
2026-09-11 16:50:20 -07:00
..
2026-09-09 21:35:08 -04:00
2026-09-11 12:43:21 -04:00
2026-09-09 11:27:36 +10:00
2026-09-11 15:27:23 -07:00
2026-09-11 15:27:23 -07:00
2026-09-11 12:20:08 -07:00
2026-09-07 08:06:48 -07:00
2026-09-07 06:13:16 -07:00
2026-09-07 08:21:24 -07:00
2026-09-11 11:54:49 -07:00
2026-09-11 03:45:33 +05:30
2026-09-11 03:45:33 +05:30
2026-09-11 03:45:33 +05:30
2026-09-11 03:45:33 +05:30
2026-09-09 10:14:58 -07:00
2026-09-11 03:45:31 +05:30
2026-09-11 03:45:33 +05:30
2026-09-11 03:45:33 +05:30
2026-09-11 15:26:46 -07:00
2026-09-09 21:17:35 +05:30
2026-09-11 11:54:49 -07:00
2026-09-11 11:14:56 +05:30
2026-09-10 18:15:54 -07:00
2026-09-08 05:10:57 -07:00
2026-09-08 03:06:30 -07:00
2026-09-11 03:45:33 +05:30
2026-09-10 11:48:01 -07:00
2026-09-11 03:45:33 +05:30
2026-09-11 11:54:49 -07:00
2026-09-05 06:24:06 -07:00
2026-09-10 11:48:01 -07:00
2026-09-09 12:41:07 +05:30
2026-09-07 08:27:07 -07:00
2026-09-11 06:24:54 -07:00
2026-09-07 08:13:01 -07:00
2026-09-09 15:20:13 -07:00
2026-09-08 13:39:17 -07:00
2026-09-08 13:39:17 -07:00
2026-09-10 11:48:01 -07:00
2026-09-07 21:43:54 +05:30
2026-09-11 11:54:49 -07:00
2026-09-11 11:54:49 -07:00
2026-09-11 11:54:49 -07:00
2026-09-09 02:36:00 -07:00
2026-09-11 11:54:49 -07:00
2026-09-07 04:46:37 -07:00
2026-09-09 04:32:13 -07:00
2026-09-10 01:08:18 -07:00
2026-09-10 02:21:16 +05:30
2026-09-11 06:37:27 -07:00
2026-09-11 15:27:23 -07:00
2026-09-09 10:54:34 -07:00
2026-09-10 01:25:45 -07:00
2026-09-11 06:37:27 -07:00
2026-09-05 19:01:22 +05:30
2026-09-10 18:13:16 -07:00
2026-09-06 05:41:46 -07:00
2026-09-06 09:09:41 -07:00
2026-09-06 09:09:41 -07:00
2026-09-11 03:45:33 +05:30
2026-09-11 15:27:23 -07:00
2026-09-11 15:27:23 -07:00
2026-09-10 01:00:19 -07:00
2026-09-11 02:06:32 -07:00
2026-09-07 00:51:41 -07:00
2026-09-11 15:26:09 -07:00
2026-09-06 07:20:24 -07:00
2026-09-11 03:45:32 +05:30
2026-09-07 14:16:57 -07:00
2026-09-08 22:35:39 +05:30
2026-09-07 14:16:57 -07:00
2026-09-07 14:16:57 -07:00
2026-09-09 12:18:58 -07:00
2026-09-07 07:09:59 -07:00
2026-09-07 06:04:06 -07:00
2026-09-07 04:46:54 -07:00
2026-09-09 12:18:58 -07:00
2026-09-07 04:46:54 -07:00
2026-09-07 04:46:54 -07:00
2026-09-09 12:18:58 -07:00
2026-09-09 12:18:58 -07:00
2026-09-07 04:55:17 -07:00
2026-09-07 05:56:50 -07:00
2026-09-09 10:28:52 -07:00
2026-09-05 15:02:53 +02:00
2026-09-11 03:45:31 +05:30
2026-09-09 10:26:06 -07:00
2026-09-11 11:54:49 -07:00
2026-09-05 15:02:53 +02:00
2026-09-10 01:00:19 -07:00
2026-09-07 08:22:35 -07:00
2026-09-10 18:12:39 -07:00
2026-09-07 06:15:43 -07:00
2026-09-10 04:22:38 -07:00
2026-09-07 21:22:49 -07:00
2026-09-11 03:45:33 +05:30
2026-09-11 03:45:32 +05:30
2026-09-11 03:45:33 +05:30
2026-09-11 16:50:20 -07:00
2026-09-10 09:11:00 -07:00
2026-09-07 08:08:04 -07:00
2026-09-11 16:50:20 -07:00
2026-09-11 03:45:33 +05:30
2026-09-11 03:45:31 +05:30
2026-09-10 18:11:25 -07:00
2026-09-10 14:56:55 -04:00
2026-09-09 04:38:01 -07:00
2026-09-09 04:38:01 -07:00
2026-09-09 04:38:01 -07:00
2026-09-09 04:38:01 -07:00
2026-09-10 05:09:15 -07:00
2026-09-07 13:11:36 +05:30
2026-09-06 13:36:12 -07:00
2026-09-09 04:38:01 -07:00
2026-09-09 04:38:01 -07:00
2026-09-10 18:13:16 -07:00
2026-09-11 03:45:31 +05:30
2026-09-09 04:27:24 -07:00
2026-09-06 05:34:01 -07:00
2026-09-10 01:00:19 -07:00
2026-09-11 06:24:11 -07:00
2026-09-10 14:56:55 -04:00
2026-09-07 02:09:34 -07:00
2026-09-09 11:31:10 -07:00
2026-09-10 18:08:16 -07:00
2026-09-11 02:49:36 -04:00
2026-09-10 14:56:55 -04:00
2026-09-11 06:24:54 -07:00
2026-09-11 06:24:54 -07:00
2026-09-11 06:24:54 -07:00
2026-09-11 06:24:54 -07:00
2026-09-11 06:37:27 -07:00
2026-09-11 06:37:27 -07:00
2026-09-09 13:30:28 -07:00
2026-09-11 06:24:54 -07:00
2026-09-11 06:37:27 -07:00
2026-09-11 11:54:49 -07:00
2026-09-09 03:32:58 -07:00
2026-09-07 22:25:12 -07:00
2026-09-07 05:59:43 -07:00
2026-09-08 03:06:30 -07:00
2026-09-11 03:45:31 +05:30
2026-09-11 15:27:23 -07:00
2026-09-11 06:24:54 -07:00
2026-09-08 19:52:26 +05:30
2026-09-10 02:21:16 +05:30
2026-09-09 09:19:36 -07:00
2026-09-07 08:20:46 -07:00
2026-09-11 02:06:32 -07:00
2026-09-06 20:47:52 +05:30
2026-09-06 14:53:33 +05:30
2026-09-10 11:48:01 -07:00
2026-09-11 11:54:49 -07:00
2026-09-09 21:16:40 +05:30
2026-09-10 03:58:37 -07:00
2026-09-11 15:28:37 -07:00
2026-09-09 04:38:01 -07:00
2026-09-07 07:11:36 -07:00
2026-09-11 15:28:37 -07:00
2026-09-11 11:54:49 -07:00
2026-09-11 03:45:33 +05:30
2026-09-07 05:56:33 -07:00
2026-09-11 06:37:27 -07:00
2026-09-11 15:28:37 -07:00
2026-09-09 02:36:00 -07:00