Inter-office memo

To
Everyone who wants another lab’s model in Codex
From
Mo, Chief Executive
Date
November 9, 2026, 1:43 PM CST
Re
Other models in Codex

How to use Claude, Gemini and other models in Codex in 2026: 8 ways compared

OpenAI documents it: Codex takes any provider that speaks its Responses API. OpenRouter, Vercel AI Gateway, LiteLLM and Claude Code Router put Claude and Gemini behind one, billed by the token, not on a Claude plan; DeepSeek, GLM and Kimi connect directly; Ollama runs local models. For each model in its own agent, OpenCode is free, and Enjoy moves one conversation between Codex and Claude Code on your plans.

Disclosure: Enjoy is our product, and it runs Codex, Claude Code and OpenCode. We checked every way below against its maker’s own pages on November 9, 2026, and we say where another way is the better pick, including the free ones that don’t need Enjoy.

The ways to use other models with Codex, compared

Codex has two halves: the agent on your computer, which reads your project, edits files and runs commands, and the model behind it, which is OpenAI’s. The agent is open source, under the Apache 2.0 license, and OpenAI documents how to point it elsewhere: “A model provider defines how Codex connects to a model (base URL, wire API, authentication, and optional HTTP headers),” say its docs, set in ~/.codex/config.toml.

The catch is the protocol. For a provider’s wire_api, “responses is the only supported value,” says the reference, and OpenAI’s gateway requirements add that “A working Chat Completions or Anthropic Messages endpoint doesn’t establish Responses compatibility.” Neither Anthropic’s nor Google’s page on OpenAI compatibility mentions the Responses API. Anthropic’s examples call Chat Completions, on a layer “primarily intended to test and compare model capabilities,” and Google’s call chat/completions too. So there are three kinds of way: put a translating gateway between Codex and Claude or Gemini, pick a model whose maker speaks Responses itself, or keep each lab’s own agent and move the work between them.

Way Best for Price, checked November 9, 2026 Models Works in
OpenRouter The most models through one key Each model at its provider’s price, plus a 5.5% fee on credits 600+ models from 80+ providers Codex CLI
Vercel AI Gateway One command to set up, and other labs’ models in Codex’s own picker Each provider’s list price, with no markup Its catalog, “not only OpenAI ones” Codex CLI, with your desktop sessions copied across
LiteLLM A team’s own gateway, with a key per person Free and open source; you pay the providers The models you list in its config Codex CLI and the ChatGPT desktop app
Claude Code Router Different models for different requests, with fallbacks Free and open source; you pay the providers OpenAI, Anthropic, Gemini, OpenRouter, DeepSeek, Kimi, Mistral, Z.AI and more Codex CLI and app, on Mac, Windows, Linux
DeepSeek, GLM or Kimi, directly A cheaper model with nothing in between DeepSeek Flash $0.30 per million input tokens and $1.20 output, half off-peak; GLM Coding Plan from $18 a month; Kimi Plus $15 a month, billed yearly That maker’s models Codex CLI and the ChatGPT desktop app
Ollama or LM Studio Open models on your own computer Ollama is free on your computer; Pro $20 a month with $60 of cloud credits Open models Codex CLI; the ChatGPT desktop app through Ollama
OpenCode An agent built to take any model Free; you pay the providers, or use a ChatGPT plan 200+ providers, a ChatGPT plan or a local model Mac, Windows, Linux
Enjoy Each lab’s own agent in one conversation, on your own plans A monthly subscription, free for 7 days, with your phone and one computer (pricing) Codex, Claude Code, Antigravity, Grok Build, Muse Code, and OpenCode’s models Mac, Windows, Linux

Prices are as each maker lists them in the US, before tax: per month for plans, per million tokens for APIs. Every way that points Codex somewhere else is paid for there, not from your ChatGPT plan. Codex also has a built-in provider for Amazon Bedrock, but it’s for “OpenAI models available through Amazon Bedrock,” says its page: it changes who bills you, not whose model answers. Our memo on OpenAI’s models on Google Cloud covers the built-in Google Cloud provider.

What changes when Codex talks to another model

  • Your ChatGPT plan steps aside. A custom provider signs in its own way, such as “a provider-specific API key,” say OpenAI’s docs, and you pay that provider. They also say “Codex cloud requires signing in with ChatGPT,” so a provider’s key covers local work only.
  • A Claude plan doesn’t come along. Anthropic “does not permit third-party developers to offer Claude.ai login into their own applications, or to route requests through Free, Pro, Max, or Ultra plan credentials on behalf of their users,” says Claude Code’s legal page. Claude in Codex means an API key, billed by the token. Claude on your plan runs in Claude Code.
  • Tools have to survive the trip. “A gateway accepting a request field doesn’t prove that its upstream model implements the corresponding capability,” OpenAI warns, so “Test the actual models and client features you plan to enable.” Opper, which makes a gateway, reported that in its September 29 tests Claude Sonnet 5 and Gemini 3.1 Pro “each completed a turn that wrote a file and ran a shell command,” with Codex’s built-in web search turned off, “which non-OpenAI upstreams reject.”
  • Codex doesn’t know the model. “Codex looks up the selected model name in its bundled catalog to set the context window, reasoning levels, and tool support,” says LiteLLM’s guide. A name it doesn’t know “still works, but Codex logs Unknown model <name> is used. This will use fallback model metadata. and runs with generic defaults.” The fix is a model catalog: a file named in model_catalog_json, or a gateway that serves one.
  • The setting is yours, not the project’s. “Codex ignores the following keys in project-local .codex/config.toml and prints a startup warning when it sees them,” OpenAI says, model_provider and model_providers among them. Put them in ~/.codex/config.toml.
  • Your earlier sessions hide. “Codex records each session against the provider that served it, so switching to the gateway hides the sessions you created before the switch,” says Vercel. DeepSeek’s guide adds “nothing is deleted”: they come back when you switch back.

OpenRouter

Best for: trying many labs’ models in Codex with one key and one bill.

OpenRouter’s Codex guide adds a [model_providers.openrouter] block to ~/.codex/config.toml, with base_url = "https://openrouter.ai/api/v1" and wire_api = "responses", then sets model_provider = "openrouter". The model “must be a complete OpenRouter slug including the provider prefix,” such as anthropic/claude-sonnet-4.6. Its auth block runs a command that prints your key, because “command-based auth is what triggers Codex’s model-catalog refresh against OpenRouter, so non-OpenAI models get correct context-window and reasoning metadata and appear in the /model picker.”

Price: pay as you go. “OpenRouter doesn’t mark up provider pricing, so you pay the rates above plus a 5.5% fee on credit purchases,” the guide says, and “No separate OpenAI plan is required.” Its pricing lists “600+ models” from “80+ providers,” and a free plan with “25+ free models” at “50 requests/day.”

Watch for: a plain env_key signs you in too, but then “Codex won’t use the OpenRouter model catalog,” and other labs’ models “run with assumed defaults.” Configs copied from older tutorials break: “A custom provider with wire_api = "chat" now fails on startup.” The guide still recommends the GPT-5.6 models, where OpenAI’s pricing now lists GPT-6.1 Sol and GPT-6 Luna.

Vercel AI Gateway

Best for: the least setup, with other labs’ models listed in Codex’s own model picker.

One command, npx vercel@latest ai-gateway setup --agent codex, does it, says Vercel’s Codex guide: it “Writes ~/.codex/config.toml with a vercel model provider pointed at the Codex compatibility endpoint,” and “Copies your existing Codex Desktop sessions across.” “Every file the command changes is backed up alongside as a .bak file.” Then “Run /model inside Codex to switch models without leaving your session,” because the endpoint answers in the format Codex reads at startup, and “Any model in the /model list works here, not only OpenAI ones.”

Price: “AI Gateway charges no markup and no platform fee on tokens. You pay the provider’s list price on a pay-as-you-go basis,” says its pricing. The free tier “includes a subset of models, not the full catalog,” and “You’re responsible for any payment processing fees that may apply.”

Watch for: Vercel’s own examples “stay on OpenAI models because Codex reads their metadata natively,” and with others “you may see warnings about model metadata not being found.” If you turn on WebSocket streaming, it “is available for OpenAI models,” and other models return an error. And ChatGPT Pro’s API credits won’t pay for it: “OpenAI excludes Codex usage through API keys from the API credits included with eligible ChatGPT subscriptions.”

LiteLLM

Best for: a team that wants everyone’s Codex on its own gateway, with a key per person.

LiteLLM is a proxy you run yourself. “Codex uses the OpenAI Responses API, which LiteLLM serves at /v1/responses,” says its Codex guide, which defines LiteLLM as a provider at http://localhost:4000/v1. Its example sets model = "claude-sonnet-5", and you can “Override it per run with codex --model gemini-3.1-pro-preview.” Each request shows up in its admin pages “attributed to your virtual key and the model you selected.” The same file serves the desktop app: “This is the same config the Codex surface inside ChatGPT Desktop uses, so setting it up once covers both.”

Price: free and open source under the MIT license, apart from an enterprise/ folder with a license of its own. You pay the providers.

Watch for: it takes the most setup here. Until you add a model catalog, “Codex only knows the metadata of OpenAI’s own models,” and listing the gateway’s models in /model needs “Codex CLI 0.159 or newer.” “Long agent turns can idle for minutes behind a gateway, so raise the stream timeout and retries if tasks are cut short.” LiteLLM 1.107.0 carried a credential stealer on October 21; its latest release is 1.108.3, from November 7.

Claude Code Router

Best for: sending different requests to different models, with fallbacks when one fails, from a desktop app.

Despite the name, it isn’t only for Claude Code. “Claude Code Router (CCR) is a local model gateway and control plane for coding agents,” says its README, and its list of agents includes “Codex (CLI & APP).” Its desktop app for macOS, Windows and Linux runs a gateway on your computer at http://127.0.0.1:3456. You add providers, open Agent Config, choose Codex, “select a model, and apply the profile,” and set rules under Routing for “conditions, retries, request rewrites, or fallback models.” It “supports OpenAI Chat / Responses, Anthropic Messages, Gemini Generate Content / Interactions, OpenRouter, DeepSeek, SiliconFlow, Moonshot, Kimi Code, Mistral, Z.AI, Bailian, and custom compatible providers,” so Anthropic’s and Google’s own APIs can sit behind the one address it gives Codex.

Price: free and open source under the MIT license, with about 38,000 stars on GitHub. You pay each provider.

Watch for: it only sees what’s launched through it. Its troubleshooting page says to “Confirm the agent was launched from CCR, not opened directly,” and “If any of them is wrong, requests bypass CCR.” The command-line version “requires Node.js 22 or newer.” Its latest release, v3.1.3, is from October 9, 2026.

DeepSeek, GLM or Kimi, directly

Best for: a cheaper model in Codex, with no gateway in between.

Three model makers answer in Codex’s own format and publish the settings, each with a model catalog file so Codex knows the model:

  1. DeepSeek. Codex “talks to models via the Responses API, which the DeepSeek API natively supports,” says its guide, which offers a setup script and the same steps by hand, for deepseek-flash or deepseek-v4-pro. Its pricing for Flash is $0.30 per million input tokens and $1.20 per million output at peak, and half that off-peak.
  2. Z.ai’s GLM Coding Plan. “Codex requires a dedicated OpenAI Responses protocol endpoint: https://api.z.ai/api/v1,” says its Codex guide, which sets the model to glm-5.3. Its plans start “at just 18 USD per month.”
  3. Kimi Code. Its server “natively supports the OpenAI Responses API,” so “no local routing or protocol-translation tool is needed,” says Kimi’s guide, which sets the model to k3.1-pro. Kimi Code comes with Kimi’s memberships from Plus, at $15 a month billed yearly: “The Go tier has no coding quota; Plus and above can use Kimi Code,” says its membership page. Our Kimi K3.1 Pro memo covers the model.

One file covers every Codex, DeepSeek’s guide says: “All Codex clients — Codex CLI, the ChatGPT desktop app, and the Codex IDE extension for VS Code — share the same configuration file.”

Price: as above, from each maker’s own pages.

Watch for: each has limits of its own. With DeepSeek, “Built-in web search is disabled by the setup script and is available only with deepseek-v4-pro,” and its searches are billed separately. On Z.ai’s plans, “Each plan is subject to both a 5-hour usage limit and a weekly usage limit.” Kimi’s “K3.1 Pro models only support thinking mode, and requests with thinking disabled are rejected.”

Ollama or LM Studio, on your own computer

Best for: open models on your own computer, or in Ollama’s cloud.

OpenAI’s docs say Codex can run against a local provider “such as Ollama or LM Studio when you pass --oss,” chosen with --local-provider. With Ollama, ollama launch codex sets it up, and you can “Type /model inside Codex to switch between your installed, tool-capable Ollama models without restarting.” For the desktop app, turn on ChatGPT (Desktop) under Apps in Ollama’s app, and “Ollama adds compatible local and cloud models to Codex’s model picker alongside ChatGPT’s native models,” says its page. With LM Studio, start its server and run codex --oss: “By default, Codex will download and use openai/gpt-oss-20b.” Our guide to local coding agents covers the memory and models it takes.

Price: Ollama is open source under the MIT license, so a model on your own computer costs nothing to run. Its cloud models bill by the token, or come out of monthly credits: Pro is $20 a month with “$60 of usage credits per month,” and Max is $100 with “$300 of usage credits per month,” says its pricing.

Watch for: a local model needs room. “Use a context window of at least 64k tokens for Codex,” Ollama says, and LM Studio asks for “more than ~25k context length,” because “Tools like Codex can consume a lot of context.” In the desktop app you “Choose up to five compatible local or cloud models,” and web search with an Ollama model “requires Ollama sign-in and is limited to three calls per response.”

OpenCode

Best for: an agent made to take any model, rather than Codex made to accept one.

OpenCode is “The open source coding agent”: “Start with free models or bring any of 200+ providers,” in a terminal or a desktop app for macOS, Windows and Linux. Its providers page says to “Run /connect, choose a provider, and enter its credentials. Then run /models to select one of its models.” It can sign in with a ChatGPT Plus or Pro plan in place of an OpenAI API key, where “Usage counts against your plan, so these models show no cost.” So GPT on your plan can sit beside any provider you add a key for.

Price: free and open source under the MIT license, with about 226,000 stars on GitHub. You pay the providers you add.

Watch for: it’s a different agent, with its own commands and settings, so you leave Codex’s behind. With a ChatGPT sign-in, “By default, OpenCode caps the context window for these sign-ins below each model’s real limit.”

Enjoy

Best for: each lab’s model in that lab’s own agent, on the plans you already pay for, in one conversation.

Enjoy doesn’t put another lab’s model inside Codex, and it doesn’t add one lab’s models to another lab’s account. It runs Codex, Claude Code, Antigravity, Grok Build, Muse Code and OpenCode on Mac, Windows and Linux, and one conversation can switch between them: “The new agent gets the conversation so far, including replies from other agents, before it works on your message.” So Codex can build on your ChatGPT plan, Claude Code can review on your Claude plan, the one a gateway can’t use, and Antigravity can take a turn with your Google account, with no API key. For any other model, OpenCode in Enjoy uses the providers set up in it, “which can include free models, models on your own computer, and providers you pay with an API key.” When a plan runs out, Enjoy switches to another of your accounts that still has usage, or waits for the limit to reset, then continues.

Price: one monthly subscription on top of your AI plans, and the first seven days are free, with a card to start. It includes your phone and any browser and one computer; each other computer costs extra each month, and each teammate you invite needs a subscription of their own. See pricing.

Watch for: Enjoy isn’t open source. Each agent signs in with its own lab’s account, so Claude here means Claude Code on a Claude plan, not Claude inside Codex. If the first agent is still working when you switch, “your message waits until that work ends, then goes to the new agent,” unless you choose Stop and move to. Enjoy can’t show OpenCode’s usage, “because usage depends on each provider.” It’s a monthly subscription on top of your AI plans once the free week ends, and scheduled workflows run only while your computer is awake with Enjoy open.

When to stay with OpenAI’s models in Codex

If GPT does the work well and your plan’s limits hold, stay. Codex is built around OpenAI’s models: it carries their metadata, its cloud tasks need a ChatGPT sign-in, and OpenRouter’s, Vercel’s and LiteLLM’s guides each add a setting or a warning for the models it doesn’t know. A plan also spares you the meter. OpenAI’s pricing lists Codex in the CLI from Plus, at $20 a month, and says “Pro plans currently have no five-hour limit,” where most models behind a gateway bill by the token.

For a second opinion from Claude, you don’t need a gateway. Our guide to using Claude Code and Codex together compares ten ways to work with both. And if you’re reaching for another model because you ran out, our guide to Codex’s usage limit compares the ways to keep going.

How we compared

We read OpenAI’s Codex docs on advanced configuration, the configuration reference, models, gateway compatibility, authentication, Amazon Bedrock and pricing; Anthropic’s and Google’s pages on OpenAI compatibility, and Claude Code’s legal page; OpenRouter’s Codex guide and pricing; Vercel’s Codex guide and AI Gateway pricing; LiteLLM’s Codex guide and license; Claude Code Router’s README and troubleshooting page; DeepSeek’s, Z.ai’s and Kimi’s Codex guides, plans and pricing; Ollama’s Codex and ChatGPT desktop pages and pricing; LM Studio’s Codex page; OpenCode’s homepage and providers page; and Enjoy’s own help on November 9, 2026, and every one is linked below. Licenses, star counts and release dates come from GitHub that day. Opper’s test results are its own, and we say so where we use them. We quote each maker’s own words for its limits and leave out what it hasn’t documented, and we didn’t run these setups ourselves. These tools change weekly, so we recheck this guide against its sources at least once a month, and the date at the foot of the page says when we last did.

13.Questions.

Can Codex use Claude or Gemini?

Yes, through a gateway that speaks OpenAI’s Responses API. OpenRouter, Vercel AI Gateway, LiteLLM and Claude Code Router each sit between Codex and other labs’ models, billed by the token. OpenAI’s docs say Codex doesn’t support “a Chat Completions-only endpoint,” so something has to translate.

Can I use my Claude plan in Codex?

No. A gateway takes an API key and bills by the token, and Anthropic says it “does not permit third-party developers to offer Claude.ai login into their own applications, or to route requests through Free, Pro, Max, or Ultra plan credentials on behalf of their users.” To use Claude on your plan, run Claude Code beside Codex.

Do I need a ChatGPT plan to use other models in Codex?

No. A custom provider reads its own API key, and you pay that provider instead. OpenRouter’s guide says “No separate OpenAI plan is required.” Codex cloud is the exception, because it “requires signing in with ChatGPT.”

Why does Codex warn about an unknown model or fallback metadata?

Because Codex ships with metadata for OpenAI’s own models. For a name it doesn’t know, it “runs with generic defaults,” says LiteLLM’s guide, for the context window, reasoning levels and tool support. A model catalog fixes it. DeepSeek, Z.ai and Kimi supply one as a file, and Vercel’s gateway serves one.

Can I run Codex on a local model?

Yes. Start Codex with the --oss flag while Ollama or LM Studio serves a model on your computer, or run ollama launch codex. Ollama is open source, and it says to “Use a context window of at least 64k tokens for Codex.” Our guide to local coding agents covers the memory that takes.

Can one conversation use both GPT and Claude?

Inside Codex, yes, by switching models with /model through a gateway such as Vercel’s, where Claude is billed by the token. With each lab’s own agent, Enjoy switches one conversation between Codex, Claude Code and other labs’ agents, each on its own plan.

Enjoy Agentic Industries · Checked against its sources on