Problem
Two model families are served with a truncated context window instead of the 1M-token window the gateway supports — the same class of limitation already fixed for GLM.
-
Claude Sonnet 4.5 — _maybe_add_1m_suffix (in agents/claude.py) gates the [1m] suffix at >= (4, 6) for both Opus and Sonnet. Sonnet 4.5 supports the 1M context window (its 1M beta shipped before the Opus one), so it was incorrectly served at the default 200k window.
-
GPT-5 family in pi — the databricks-openai provider models are written as bare {"id": m} with no contextWindow. GPT ids aren't in pi's built-in model catalog, so pi falls back to a small default window and truncates long sessions.
Expected
- Sonnet 4.5+ gets the
[1m] suffix (Opus stays at 4.6+).
- pi's
databricks-openai model entries carry contextWindow/maxTokens; the GPT-5 family uses the 1M window served via the gateway's coding-agent path (same 1M unlocked for Claude/GLM).
Problem
Two model families are served with a truncated context window instead of the 1M-token window the gateway supports — the same class of limitation already fixed for GLM.
Claude Sonnet 4.5 —
_maybe_add_1m_suffix(inagents/claude.py) gates the[1m]suffix at>= (4, 6)for both Opus and Sonnet. Sonnet 4.5 supports the 1M context window (its 1M beta shipped before the Opus one), so it was incorrectly served at the default 200k window.GPT-5 family in pi — the
databricks-openaiprovider models are written as bare{"id": m}with nocontextWindow. GPT ids aren't in pi's built-in model catalog, so pi falls back to a small default window and truncates long sessions.Expected
[1m]suffix (Opus stays at 4.6+).databricks-openaimodel entries carrycontextWindow/maxTokens; the GPT-5 family uses the 1M window served via the gateway's coding-agent path (same 1M unlocked for Claude/GLM).