GPT 5.2 Codex
GPT 5.2 Codex is the GPT-5.2 generation coding agent model from OpenAI, combining GPT-5.2 advances in reasoning with purpose-built autonomous software engineering capabilities.
import { streamText } from 'ai'
const result = streamText({ model: 'openai/gpt-5.2-codex', prompt: 'Why is the sky blue?'})Frequently Asked Questions
How does GPT 5.2 Codex improve over GPT-5.1 codex?
It incorporates the GPT-5.2 generation's advances in reasoning and instruction following, translating to better code quality and more reliable autonomous task completion.
What context window does GPT 5.2 Codex support?
400K tokens, enabling comprehensive codebase analysis.
Can GPT 5.2 Codex run tests and verify its own code?
Yes. It operates in sandboxed environments where it can execute code, run tests, and iterate on solutions.
How does AI Gateway handle authentication for GPT 5.2 Codex?
AI Gateway accepts a single API key or OIDC token for all requests. You don't embed OpenAI credentials in your application; AI Gateway routes and authenticates on your behalf.
When should I use an earlier codex model instead?
When cost is a primary concern and the task doesn't require GPT-5.2 generation improvements. Codex mini variants handle routine tasks at a fraction of the cost.
What are typical latency characteristics?
This page shows live throughput and time-to-first-token metrics measured across real AI Gateway traffic.