Add max context window model metadata (#18382)

Adds max_context_window to model metadata and routes core context-window
reads through resolved model info. Config model_context_window overrides
are clamped to max_context_window when present; without an override, the
model context_window is used.
This commit is contained in:
Ahmed Ibrahim
2026-04-17 21:48:14 -07:00
committed by GitHub
Unverified
parent e9c70fff3f
commit 5bb193aa88
17 changed files with 330 additions and 6 deletions
@@ -70,6 +70,7 @@ fn remote_model_with_visibility(
"supports_parallel_tool_calls": false,
"supports_image_detail_original": false,
"context_window": 272_000,
"max_context_window": 272_000,
"experimental_supported_tools": [],
}))
.expect("valid model")