GPT-5.1 Codex vs Claude 4 Sonnet (thinking)

Detailed comparison of capabilities, features, and performance.

Feature
GPT-5.1 Codex
Claude 4 Sonnet (thinking)
Model Image
GPT-5.1 Codex
Claude 4 Sonnet (thinking)
AI Lab
OpenAI
Anthropic
Context Size
400,000 tokens
200,000 tokens
Max Output Size
128,000 tokens
64,000 tokens
Frontier Model
Yes
Yes
Vision Support
Yes
Yes
Description
A version of GPT-5.1 optimized for agentic coding tasks in Codex or similar environments.
The latest Sonnet 4 model from Anthropic with high thinking mode

Try both models in your workspace

Access both GPT-5.1 Codex and Claude 4 Sonnet (thinking) in a single workspace without managing multiple API keys.

Create your workspace