Codex
Use OpenCode Console models from Codex.
Codex speaks the OpenAI Responses API. Point it at Console and use any Console models, including Claude, Gemini, and open models. Console translates the request for models that don't accept Responses.
Note: The Console CLI sets up Codex with one command, including the workspace's policies, MCP servers, skills and instructions. Run
npx @opencode/console setup codex. The steps below set it up by hand.
Configure
Add Console as a model provider in ~/.codex/config.toml and make it the default.
model = "gpt-6.1-sol"
model_provider = "opencode"
[model_providers.opencode]
name = "OpenCode Console"
base_url = "https://opencode.ai/inference/openai/v1"
env_key = "OPENCODE_API_KEY"
wire_api = "responses"Codex appends /responses to the base URL and reads the key from env_key. Create a
personal API key, then export it.
export OPENCODE_API_KEY="oc_sk_..."
codexNote: Codex only reads model providers from
~/.codex/config.toml. A project's.codex/config.tomlcannot set them.
Models
Set model to any model ID from the Console table. Override
it for one run with --model.
codex --model claude-sonnet-5-5Codex doesn't know the context window or reasoning settings of models outside its own catalog. It uses generic defaults for them and prints a warning, which you can ignore.
Console MCP
Add the Console MCP server and sign in from the browser.
codex mcp add opencode-console --url https://opencode.ai/console/mcpIf the sign-in doesn't start automatically, run it yourself.
codex mcp login opencode-console