GPT-5.1-Codex-Max is OpenAI’s frontier agentic coding model, purpose-built for long-running software engineering tasks that span hours or even days. Announced on November 18–19, 2025, it is the first OpenAI model natively trained to operate across multiple context windows through a process called compaction — coherently working over millions of tokens in a single task by automatically pruning history while preserving the most important context. It replaces GPT-5.1-Codex as the default model in Codex surfaces (CLI, IDE extension, cloud sandbox, and code review).
Built on an update to OpenAI’s foundational reasoning model, GPT-5.1-Codex-Max was trained on real-world software engineering tasks: PR creation, code review, frontend coding, Q&A, and — for the first time — Windows environment operation. The model introduces xhigh (‘Extra High’) reasoning effort, which allocates even more thinking time for non-latency-sensitive tasks. Compaction enables autonomous sessions of 24+ hours, automatically compacting as the context window fills and repeating until the task completes.
From a TheRouter operator’s perspective, GPT-5.1-Codex-Max is listed as active and available through the standard /v1/chat/completions endpoint with full OpenAI-compatible parameters (temperature, max_tokens, tools, tool_choice, response_format, reasoning, stop). It shares GPT-5.1’s 400K context window and 128K max output, with pricing at $1.25/M input tokens, $10/M output tokens, and $0.125/M cached reads. The model is best used for agentic coding workflows routed through Codex or Codex-like harnesses — for general reasoning tasks, route to openai/gpt-5.1 instead.