re-ITRT
a0c802c02c
fix(model_metadata): stop misreading max_tokens as context length in local probe
...
The local-endpoint context probe (_query_local_context_length_uncached)
treated max_tokens — an output-completion cap — as a candidate for the
model's context window. For OpenAI-compatible gateways that advertise a
1M context via context_size / max_input_tokens alongside a smaller
max_tokens output cap (e.g. TokenHub serving deepseek-v4-flash:
context_size=1048576, max_input_tokens=1048576, max_tokens=393216),
Hermes mis-detected the window as 393,216 and — because loopback
endpoints are reconciled against a live probe — actively overwrote a
previously-correct 1M cache entry.
- Add context_size and max_input_tokens to both /v1/models probe
candidate lists (single-model detail and list branches).
- Remove max_tokens from the context-length candidates; it remains
handled separately as an output cap (_MAX_COMPLETION_KEYS).
Adds regression tests covering context_size/max_input_tokens priority
over max_tokens and the max_tokens-only (no real context key) case.
2026-08-24 03:20:57 -07:00
..
2026-08-23 17:45:47 -05:00
2026-08-08 04:19:49 -07:00
2026-08-24 03:20:57 -07:00
2026-08-20 11:46:30 -05:00
2026-08-23 17:45:47 -05:00
2026-08-23 18:27:15 -07:00
2026-07-29 13:39:40 -07:00
2026-08-24 15:47:42 +05:30
2026-07-29 13:39:40 -07:00
2026-08-01 10:52:34 -07:00
2026-08-15 13:35:32 -07:00
2026-08-24 03:20:46 -07:00
2026-08-24 03:20:37 -07:00
2026-08-23 18:58:40 -07:00
2026-08-13 23:43:15 +05:30
2026-08-04 17:36:26 -04:00
2026-08-08 18:11:02 -07:00
2026-08-03 20:35:47 +05:30
2026-08-23 15:27:24 -07:00
2026-08-19 22:14:56 -05:00
2026-08-20 19:56:01 -07:00
2026-08-24 14:58:42 +05:30
2026-08-13 02:38:28 -07:00
2026-08-12 19:13:32 -07:00
2026-08-19 12:41:45 -05:00
2026-08-23 20:01:41 -07:00
2026-08-24 03:20:14 -07:00
2026-08-24 03:14:19 -07:00
2026-08-07 10:11:05 -07:00
2026-08-19 12:41:45 -05:00
2026-08-19 01:19:28 -07:00
2026-08-24 15:37:22 +05:30
2026-08-12 17:25:30 -05:00
2026-08-06 05:00:17 +05:30
2026-08-13 22:44:23 +05:30
2026-07-29 13:10:23 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 13:10:23 -07:00
2026-08-01 15:05:05 +05:30
2026-08-16 01:50:20 -07:00
2026-07-29 13:10:23 -07:00
2026-08-23 17:01:31 -07:00
2026-07-29 13:10:23 -07:00
2026-08-23 06:36:57 -07:00
2026-08-02 00:11:50 -07:00
2026-08-15 23:37:22 -07:00
2026-07-29 13:10:23 -07:00
2026-08-17 16:34:02 -07:00
2026-07-29 15:12:28 -07:00
2026-08-20 04:54:14 -07:00
2026-08-20 12:41:17 -05:00
2026-08-20 19:56:28 -07:00
2026-08-20 12:41:17 -05:00
2026-08-14 15:41:38 -05:00
2026-08-03 17:19:49 -07:00
2026-07-29 13:10:23 -07:00
2026-08-14 21:48:14 -07:00
2026-07-29 13:10:23 -07:00
2026-08-02 00:11:50 -07:00
2026-08-08 05:21:09 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 13:10:23 -07:00
2026-08-03 20:30:32 +05:30
2026-07-29 13:10:23 -07:00
2026-08-12 19:13:32 -07:00
2026-08-16 06:29:53 -07:00
2026-08-09 22:09:49 -04:00
2026-08-24 15:42:09 +05:30
2026-07-29 13:10:23 -07:00
2026-08-09 22:09:49 -04:00
2026-08-15 23:37:22 -07:00
2026-08-09 22:09:49 -04:00
2026-07-29 13:10:23 -07:00
2026-07-29 18:13:09 -07:00
2026-08-23 19:31:35 -07:00
2026-07-29 18:55:10 -07:00
2026-08-13 23:43:15 +05:30
2026-08-13 23:43:15 +05:30
2026-07-29 17:35:16 -05:00
2026-08-13 02:38:28 -07:00
2026-08-14 21:35:30 -07:00
2026-08-23 18:27:21 -07:00
2026-08-14 22:33:58 -07:00
2026-08-08 19:46:35 -07:00
2026-08-14 21:58:09 -07:00
2026-08-14 21:58:09 -07:00
2026-08-14 21:58:09 -07:00
2026-08-16 11:34:40 -07:00
2026-07-31 22:39:11 -07:00
2026-08-13 02:38:28 -07:00
2026-08-13 18:39:54 +00:00
2026-08-13 18:39:54 +00:00
2026-08-14 21:58:09 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 18:13:09 -07:00
2026-08-17 02:40:59 -07:00
2026-08-15 01:55:22 -07:00
2026-07-29 13:10:23 -07:00
2026-08-07 19:44:35 +05:30
2026-07-29 13:10:23 -07:00
2026-07-29 21:30:53 -07:00
2026-07-29 19:53:17 -07:00
2026-08-23 19:15:28 -07:00
2026-08-16 23:26:10 -07:00
2026-08-23 13:34:32 +05:30
2026-07-29 13:10:23 -07:00
2026-08-03 17:38:13 +05:30
2026-08-14 21:36:41 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 15:12:28 -07:00
2026-07-31 07:18:02 -07:00
2026-07-31 22:35:16 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 13:10:23 -07:00
2026-08-09 22:09:49 -04:00
2026-08-20 11:37:01 +05:30
2026-08-14 21:45:08 -07:00
2026-08-14 21:50:48 -07:00
2026-08-13 11:49:14 -07:00
2026-08-17 15:12:53 -05:00
2026-07-29 13:10:23 -07:00
2026-08-17 16:39:47 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 19:48:37 -07:00
2026-08-14 13:51:26 -07:00
2026-08-14 13:51:26 -07:00
2026-08-12 18:55:14 -07:00
2026-08-10 17:02:56 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 21:30:53 -07:00
2026-08-08 12:33:19 -07:00
2026-07-29 13:10:23 -07:00
2026-08-07 00:41:58 -04:00
2026-08-02 10:04:48 -07:00
2026-08-16 20:43:13 -07:00
2026-08-10 17:02:56 -07:00
2026-08-10 17:02:56 -07:00
2026-08-21 21:53:11 +05:30
2026-08-03 20:37:17 +05:30
2026-08-02 21:32:13 +05:30
2026-07-31 23:18:12 -07:00
2026-08-06 07:49:42 -07:00
2026-08-04 11:26:15 +05:30
2026-08-23 02:55:03 +05:30
2026-08-23 02:55:03 +05:30
2026-08-22 04:02:29 +05:30
2026-08-15 02:22:58 -07:00
2026-08-22 14:33:20 +05:30
2026-08-23 18:25:12 -07:00
2026-08-23 20:01:41 -07:00
2026-08-23 18:25:12 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 13:10:23 -07:00
2026-08-15 00:36:03 -07:00
2026-07-29 13:10:23 -07:00
2026-08-13 09:36:02 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 13:10:23 -07:00
2026-08-07 09:44:21 -07:00
2026-07-29 13:10:23 -07:00
2026-08-16 06:26:37 -07:00
2026-08-06 23:08:23 -05:00
2026-08-23 18:58:40 -07:00
2026-07-29 13:10:23 -07:00
2026-08-06 19:35:47 -06:00
2026-08-09 13:43:14 -07:00
2026-07-28 11:57:37 -07:00
2026-08-12 20:02:07 -07:00
2026-08-02 21:30:54 +05:30
2026-08-02 23:10:28 +05:30
2026-08-14 12:02:05 -04:00
2026-08-13 02:38:28 -07:00
2026-08-23 17:43:39 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 13:10:23 -07:00
2026-07-29 13:10:23 -07:00