mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
Azure's OpenAI models are copied from the direct `openai` provider. That provider caps the GPT-6 family at 272K so requests stay in OpenAI's short-context pricing tier. The Azure provider overrides this cap through `CONTEXT_WINDOW_OVERRIDES`, but that list only covered gpt-5.4, gpt-5.5 and gpt-5.6. As a result, `azure/gpt-6-astra`, `gpt-6-luna`, `gpt-6-sol`, `gpt-6.1-sol` and `gpt-6.1-terra` showed a 272K context window, and pi compacted sessions far earlier than needed. Azure Foundry deploys these models with a 1,050,000-token context window. This change adds the five models to the Azure override list. OpenAI-direct is unchanged. Testing: - Added a test in `packages/ai/test/supports-xhigh.test.ts` that checks each of these Azure models has a 1,050,000 context window. It fails on all five models without the override (5 failed) and passes with it. - After regenerating the model data, the generated Azure catalog lists all five models at 1050000. Before the change they were at 272000. - `npm run check` passes. Fixes #11742 Requested by @badlogic Co-authored-by: triagent <triagent@localhost> |
||
|---|---|---|
| .. | ||
| agent | ||
| ai | ||
| chord | ||
| codemode | ||
| coding-agent | ||
| durable | ||
| env | ||
| evals | ||
| mcp | ||
| schema | ||
| telemetry | ||
| tui | ||