Documentation Index
Fetch the complete documentation index at: https://docs.llmeasy.ru/llms.txt
Use this file to discover all available pages before exploring further.
Connecting Codex to LLMEasy requires a custom model provider and API Key. The base_url must be https://www.llmeasy.ru/v1, and the protocol is OpenAI Responses.
Prerequisites
- Node.js installed
- LLMEasy API Key (register here (
https://www.llmeasy.ru/register))
Clear OpenAI-related environment variables before setup so they do not override the settings in config.toml or auth.json.Clear these variables:
OPENAI_API_KEY
OPENAI_BASE_URL
Run on macOS / Linux:unset OPENAI_API_KEY
unset OPENAI_BASE_URL
Run in Windows PowerShell:Remove-Item Env:OPENAI_API_KEY -ErrorAction SilentlyContinue
Remove-Item Env:OPENAI_BASE_URL -ErrorAction SilentlyContinue
[Environment]::SetEnvironmentVariable("OPENAI_API_KEY", $null, "User")
[Environment]::SetEnvironmentVariable("OPENAI_BASE_URL", $null, "User")
Install Codex
npm install -g @openai/codex
Setup
Automatic setup
Configure via CC Switch
Manual setup
You can run the LLMEasy automatic setup script directly. It only writes the LLMEasy provider configuration and does not replace the installation prerequisites above. The script requires Node.js. If you do not pass an API Key or model explicitly, the script prompts for them when the tool supports interactive input.Follow the step for your operating system. You only need one of them.If you use macOS / Linux
curl -fsSL https://www.llmeasy.ru/install-codex-provider.sh | bash
If you use Windows
iwr https://www.llmeasy.ru/install-codex-provider.ps1 -OutFile "$env:TEMP\install-codex-provider.ps1"; powershell -ExecutionPolicy Bypass -File "$env:TEMP\install-codex-provider.ps1"
Copy a model ID from the model plaza
Open the LLMEasy model plaza (https://www.llmeasy.ru/pricing) and copy a currently available model ID from the Codex group. Replace every YOUR_CODEX_MODEL_ID below with that value.
Confirm the config file locations
Manual setup requires both the Codex config.toml and auth.json files.| System | config.toml | auth.json |
|---|
| macOS / Linux | ~/.codex/config.toml | ~/.codex/auth.json |
| Windows | C:\Users\YOUR_USER\.codex\config.toml | C:\Users\YOUR_USER\.codex\auth.json |
Edit the Codex config file
Open config.toml. Create it if it does not exist.This config only applies when you manually edit ~/.codex/config.toml. If you configure Codex through CC Switch, follow the CC Switch guide exactly. Do not copy this block to replace configuration managed by CC Switch. Add the following config:model_provider = "llmeasy"
model = "YOUR_CODEX_MODEL_ID"
model_reasoning_effort = "high"
disable_response_storage = true
[model_providers.llmeasy]
name = "LLMEasy"
base_url = "https://www.llmeasy.ru/v1"
wire_api = "responses"
requires_openai_auth = true
model_context_window = 1000000
model_auto_compact_token_limit = 900000
Write the Codex auth file
Open auth.json. Create it if it does not exist.Write the following content, replacing YOUR_API_KEY with your LLMEasy API Key:{
"OPENAI_API_KEY": "YOUR_API_KEY"
}
Restart Codex in the terminal
After changing config.toml or auth.json, stop the current Codex process and start it again in a new terminal session.
Config parameter reference
| Parameter | Description |
|---|
model_provider | The default model provider ID. It must match llmeasy in [model_providers.llmeasy] |
model | The default model ID Codex uses after startup. Use a model copied from the Codex group in the model plaza |
model_reasoning_effort | Model reasoning effort. Set it to low, medium, or high as needed |
disable_response_storage | Disables response storage. Keep this set to true |
name | Provider display name. You can keep it as LLMEasy |
base_url | LLMEasy Codex / OpenAI-compatible protocol endpoint. It must include /v1 |
wire_api | The API protocol used by Codex. Keep this set to responses |
requires_openai_auth | Tells Codex to read the API Key from its OpenAI auth file. Keep this set to true |
1M context config
If you use a long-context model from the Codex group, keep these two settings:model_context_window = 1000000
model_auto_compact_token_limit = 900000
| Parameter | Purpose |
|---|
model_context_window | Sets the available context window to 1,000,000 tokens |
model_auto_compact_token_limit | Triggers compaction before the context reaches the hard limit, reducing the chance that a conversation runs out of context |
If you write the config through CC Switch, prefer the config generated by CC Switch. Only edit these values yourself for manual setup or troubleshooting.
Verify the setup
After startup, send a test message. A normal reply means the connection is working.
If something fails, check:
base_url is https://www.llmeasy.ru/v1
wire_api is still responses
model is a model ID copied from the Codex group
OPENAI_API_KEY in ~/.codex/auth.json is your LLMEasy API Key
- No old
OPENAI_API_KEY or OPENAI_BASE_URL variables are interfering