Skip to main content
The Codex VS Code Extension shares ~/.codex/config.toml with Codex CLI/App. Use this page when you need to keep the official login, plugins, or Remote Control.

Key settings

Prerequisites

Install

Install the extension from the VS Code Marketplace, then restart VS Code.

Manual setup

Configure the Extension

Edit ~/.codex/config.toml:
Save the file, run Developer: Reload Window in VS Code, and reopen the Codex panel.
requires_openai_auth = true preserves the official login. experimental_bearer_token authenticates BetterToken model requests. Do not write the BetterToken API Key to auth.json.

Do not combine CLI/App and Extension authentication

Both alternatives use [model_providers.custom]. Keep only one table in a TOML file.

Verify the connection

Create a new Extension session and send a short task. A response from YOUR_MODEL_ID while plugins and Remote Control remain available confirms the setup.

Switch models

Change model and, optionally, review_model, then run Developer: Reload Window. Use a Model ID from the Setup dialog or model plaza.

Common errors

Advanced setup

Supported providers

Statuses apply to the BetterToken setup documented on this page.
  • Manual setup: enter the API Key, Base URL, and Model.
  • Not supported: no verified direct setup is currently available.

Official references

Technical details

The Extension uses the official login for some Codex product features, so this setup keeps requires_openai_auth = true. A pure CLI/App custom provider uses an environment variable and requires_openai_auth = false. Both send OpenAI Responses requests through https://bettertoken.ai/v1.