[OSS-129] Map GPT-5.6 family to the official 1.05M context window (#7012)

* fix(core): map GPT-5.6 to the official 1.05M context window

LiteLLM fallback treated Sol, Terra, Luna, and the gpt-5.6 alias as unknown and used the 8k default.

* fix(openai): give GPT-5.6 its own 1.05M window

Native lookup matched gpt-5 first, so Sol, Terra, and Luna inherited 1,047,576. Longest-prefix matching keeps gpt-5 and gpt-5.4-mini on their own sizes.

* fix(azure): map GPT-5.6 deployments to the official 1.05M window

Azure had no gpt-5 / gpt-5.6 entry, so Sol, Terra, and Luna fell back to 8k.

* feat(cli): list GPT-5.6 Sol, Terra, and Luna in curated catalogs

The family is generally available; keep gpt-5.5 as the offline default.

* refactor: keep context-window tables in longest-prefix order

Drop the runtime sort and document that new keys must be inserted longest-first so startswith matching stays correct.

* fix(core): resolve prefixed LiteLLM models to the GPT-5.6 window

openai/gpt-5.6-luna kept its provider prefix on self.model, so startswith matching missed the 1.05M mapping. Strip recognized prefixes for lookup and leave unknown ones intact.
This commit is contained in:
Vidit Ostwal
2026-08-25 00:33:48 +05:30
committed by GitHub
parent 2746bb88b7
commit d0e9208627
9 changed files with 142 additions and 23 deletions

View File

@@ -132,6 +132,10 @@ PROVIDERS: list[str] = [
MODELS: dict[str, list[str]] = {
"openai": [
"gpt-5.6-sol",
"gpt-5.6-terra",
"gpt-5.6-luna",
"gpt-5.6",
"gpt-5.5",
"gpt-5.5-pro",
"gpt-5.4",

View File

@@ -49,11 +49,15 @@ _PROVIDERS: list[tuple[str, str]] = [
# live from the vendor's own API via ``model_catalog.get_provider_models``;
# this list is the hand-verified backstop used when no API key is available.
# Keep entries to real, current model ids — last verified against each vendor's
# official model docs on 2026-07-05.
# official model docs on 2026-08-17.
_PROVIDER_MODELS: dict[str, list[tuple[str, str]]] = {
"openai": [
("gpt-5.5", "GPT-5.5"),
("gpt-5.5-pro", "GPT-5.5 Pro"),
("gpt-5.6-sol", "GPT-5.6 Sol"),
("gpt-5.6-terra", "GPT-5.6 Terra"),
("gpt-5.6-luna", "GPT-5.6 Luna"),
("gpt-5.6", "GPT-5.6"),
("gpt-5.4", "GPT-5.4"),
("gpt-5.4-mini", "GPT-5.4 Mini"),
("gpt-5.2", "GPT-5.2"),