Documentation Index
Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Type: Coding ToolPrimary Path: OpenAI Responses (advanced optional path)Support Confidence: Supported with model/path limits
/v1/responses, but you should treat it as an advanced compatibility path. Some Responses-only features are not guaranteed across every model and routed path.
Codex CLI remote compaction is supported on POST /v1/responses/compact. Codex sends the current session model in body.model for /compact and auto-compact, so keep the model you want to compact with available on the Responses path; do not configure /v1/compact.
System Requirements
- OS: macOS, Linux (official support), Windows via WSL
- Node.js: Version 18+
- npm: Version 10.x.x or higher
Installation
Configuration
Step 1: Set API Key
Temporary (current session):~/.bashrc, ~/.zshrc, or ~/.bash_profile:
Step 2: Configure config.toml
Edit~/.codex/config.toml:
response.create and response.cancel; it is not the OpenAI Realtime API and does not accept session.update, conversation.item.*, input_audio_buffer.*, binary audio, or nested Realtime response.create.response envelopes.
If the config file doesn’t exist, run
codex once to generate it, then edit the file. Restart Codex completely after changing config.toml so the new provider settings are reloaded.If a request uses Responses-only fields that are not supported on the selected model or route, TokenLab returns an explicit error instead of silently downgrading the request.
Basic Usage
Start interactive mode:Recommended Models
| Model | Best For |
|---|---|
gpt-5.4 | Best default choice for coding and reasoning |
gpt-5-mini | Faster, cheaper fallback for coding workflows |
claude-sonnet-4-6 | Code review, documentation |
deepseek-r1 | Algorithm design, reasoning |
Interactive Commands
| Command | Description |
|---|---|
/help | Display help |
/exit or Ctrl+C | Exit |
/clear | Clear conversation |
/config | View configuration |
/model <name> | Switch model |
/tokens | View token usage |
Verify Configuration
Common Use Cases
Code review:Troubleshooting
Connection Error
Connection Error
- Verify
base_urlin config.toml is exactlyhttps://api.tokenlab.sh/v1 - Check network connectivity
- Ensure no proxy interference
Authentication Failed
Authentication Failed
- Verify
env_key = "OPENAI_API_KEY"is present in~/.codex/config.toml - Verify
OPENAI_API_KEYenvironment variable is set - Check that the key starts with
sk- - Ensure the key is active in TokenLab dashboard
Model Not Found
Model Not Found
- Check model name matches exactly
- Verify model availability at tokenlab.sh/en/models
Responses-native field rejected
Responses-native field rejected
- Some fields are only available on
/v1/responseswhen TokenLab can guarantee that behavior for the selected model and route - If you see
unsupported_request_field, remove that field or switch to a workflow that does not depend on it
/compact or auto-compact fails
/compact or auto-compact fails
- Codex CLI calls
POST /v1/responses/compact, not/v1/compact - The compaction request uses the current session
model, so that model must be available on the Responses path - Keep
wire_api = "responses"andbase_url = "https://api.tokenlab.sh/v1"