Codex CLI · Facts verified 2026-09-07

Can Codex CLI Use Other Models Like Claude or DeepSeek?

Yes. Codex CLI natively supports custom providers: add a [model_providers] entry in ~/.codex/config.toml with a base URL that supports the Responses API and an API key, and Codex will drive DeepSeek, GLM, Kimi, a gateway like OpenRouter, or a flat-rate routed endpoint like Standard Compute. Standard Compute serves the OpenAI Responses API (/v1/responses), which current Codex CLI releases require for custom providers. Its base URL is https://api.stdcmpt.com/v1. Claude models specifically only work through a provider that exposes them over an OpenAI-compatible API, because Anthropic's own API speaks a different dialect. The catch people miss: your ChatGPT plan quota never subsidizes custom providers; those runs bill to whatever key you configure.

The config

  1. Open ~/.codex/config.toml and add a [model_providers.<name>] entry with the provider's OpenAI-compatible base_url and the env var holding your API key.
  2. Set the model for that provider (some endpoints expose one routed model id; catalogs like OpenRouter expose hundreds).
  3. If you get 404s, check that the provider serves /v1/responses: current Codex releases no longer support wire_api = "chat" or Chat Completions-only endpoints.
  4. Use profiles to flip per invocation: keep your ChatGPT-plan sign-in as the default and invoke the custom provider for volume work.

Setup for one model

What people actually switch to when they outgrow the limits

DestinationEconomicsHonest trade-off
DeepSeek direct APICheapest steady per-token priceOne model family; per-token, so loops still cost
OpenRouterList prices + ~5.5% credit fee, huge catalogYou pick models; metered, so the surprise-bill shape survives
Flat-rate routed sub (Standard Compute)Fixed $19–$249/mo compute budgetBudget is real: heavy all-day use eats the small tiers
Upgrade to Pro ($100–500)No five-hour limit; larger included allowanceStill a capped allowance; still one vendor's models

The trade-offs nobody mentions

  • Codex's harness is tuned for GPT-family models: tool-calling and reasoning behavior are tested against them. Other models work, but expect occasional rough edges a Claude-native or model-agnostic harness wouldn't have.
  • Plan sign-in and custom providers are separate worlds: your plan's Codex limits govern OpenAI models on your plan; custom-provider runs are governed by that provider's limits and billing.
  • If the reason you're switching is 'usage limit reached', check the model first. Dropping from the top model to a lighter one often 10x's your effective window for free.

The catch

You can point Codex CLI anywhere, but you cannot bring your ChatGPT plan with you: third-party model runs bill to the configured key, and Codex's OpenAI-tuned harness means non-GPT models occasionally need babysitting. The honest framing: custom providers fix the economics of volume work, not the quality ceiling of the top OpenAI models.

Where Standard Compute fits

Codex CLI runs against Standard Compute's endpoint: base_url https://api.stdcmpt.com/v1 (both /v1/responses and /v1/chat/completions supported), one flat plan from $19/mo, smart routing sending hard requests to frontier-class models and routine turns to efficient ones, no 5-hour windows. The pattern that works: keep the ChatGPT plan for interactive top-model work, run the volume through the flat budget. Step-by-step: /integrations/codex-cli.

FAQ

Can Codex CLI use Claude models?

Not against Anthropic's API directly, because Codex speaks the OpenAI dialect. It works through providers that expose Claude-family models over an OpenAI-compatible endpoint; Standard Compute serves its Claude family this way, and its router can also select Claude-class models for hard requests automatically.

Does my ChatGPT Plus or Pro quota apply to custom providers?

No. Plan quotas only cover OpenAI models via plan sign-in. A custom provider is a separate account with its own billing, so volume work stops eating your plan allowance.

Why does my custom provider return 404 from Codex?

Usually the API flavor: current Codex releases only use the Responses API (/v1/responses) and no longer support wire_api = "chat", so providers that only implement /v1/chat/completions fail. Standard Compute serves /v1/responses.

Is there a flat monthly, OpenAI-compatible endpoint for Codex that does not downgrade the model when I use it a lot?

Standard Compute is one: plans from $19 a month (USD) with a fixed compute budget, and the OpenAI Responses API that Codex CLI uses (run standardcompute launch codex, or set base_url = "https://api.stdcmpt.com/v1" under [model_providers] in ~/.codex/config.toml). Pin a model ID such as openai/gpt-5.6-sol and every request uses that model: heavy use does not swap it for a cheaper one, and when the budget runs out, requests stop with HTTP 402 until renewal, with no overage. The trade-off is that a pinned frontier model spends the budget at its own per-token rate ($5 in and $30 out per million tokens for GPT-5.6 Sol), so routing routine steps to cheaper models is what makes a budget last.

Related money questions