Codex Mini
Codex Mini is OpenAI's lightweight coding agent model optimized for fast, asynchronous software engineering tasks like writing features, fixing bugs, and running tests in sandboxed cloud environments.
import { streamText } from 'ai'
const result = streamText({ model: 'openai/codex-mini', prompt: 'Why is the sky blue?'})About Codex Mini
Codex Mini was released on May 16, 2025 as part of OpenAI's Codex product line, which provides cloud-based coding agents that operate asynchronously on software engineering tasks. The model is optimized for the specific loop that coding agents execute: read context from a repository, reason about what changes to make, write code, execute tests, and iterate until the task is complete.
As the mini variant, Codex Mini is tuned for speed and cost efficiency rather than maximum reasoning depth. It handles the majority of everyday coding tasks, from bug fixes and feature implementations to answering questions about a codebase, at a fraction of the cost and latency of larger models. This makes it practical to deploy as a continuous assistant that processes tasks in parallel.
The model operates within sandboxed environments where it can safely execute code, run test suites, and verify its own output before returning results. This execution-verification loop is central to its design and distinguishes it from models that only generate code without validating it.