AI Coding Tools (CLI and IDE Extensions)
Replace {baseUrl} with your platform API root, without a trailing / or /v1, and sk-your-api-key with your model API key. Model IDs, settings, and supported features depend on your client version and account.
Claude Code
Claude Code is Anthropic's terminal coding assistant. The platform provides the native Anthropic protocol (POST /v1/messages), allowing clients to connect through their provider settings.
Installation
Windows
# 1. Install Node.js LTS: https://nodejs.org/
node --version
npm --version
# 2. Install Git for Windows (Claude Code uses Git Bash on Windows):
# https://git-scm.com/downloads/win
# 3. Install Claude Code
npm install -g @anthropic-ai/claude-code
# 4. Verify
claude --version
macOS / Linux
curl -fsSL https://claude.ai/install.sh | bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
claude --version
Configure settings.json (recommended)
Edit ~/.claude/settings.json (on Windows, C:\Users\your-username\.claude\settings.json):
{
"env": {
"ANTHROPIC_BASE_URL": "{baseUrl}",
"ANTHROPIC_AUTH_TOKEN": "sk-your-api-key",
"ANTHROPIC_MODEL": "claude-sonnet-4-5-20250929",
"ANTHROPIC_SMALL_FAST_MODEL": "claude-haiku-4-5-20251001",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
}
}
| Variable | Purpose |
|---|---|
ANTHROPIC_BASE_URL | Omit /v1; Claude Code appends /v1/messages. |
ANTHROPIC_AUTH_TOKEN | Your sk- model API key. |
ANTHROPIC_MODEL | Main model, such as a Sonnet model. |
ANTHROPIC_SMALL_FAST_MODEL | Lightweight model for tasks such as background summaries, where supported by the client version. |
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC | Disables nonessential traffic, such as telemetry. |
Configure environment variables instead
Windows PowerShell
[Environment]::SetEnvironmentVariable('ANTHROPIC_BASE_URL','{baseUrl}','User')
[Environment]::SetEnvironmentVariable('ANTHROPIC_AUTH_TOKEN','sk-your-api-key','User')
[Environment]::SetEnvironmentVariable('ANTHROPIC_MODEL','claude-sonnet-4-5-20250929','User')
[Environment]::SetEnvironmentVariable('ANTHROPIC_SMALL_FAST_MODEL','claude-haiku-4-5-20251001','User')
Open a new terminal for these changes to take effect.
macOS / Linux
cat >> ~/.zshrc <<'EOF'
export ANTHROPIC_BASE_URL="{baseUrl}"
export ANTHROPIC_AUTH_TOKEN="sk-your-api-key"
export ANTHROPIC_MODEL="claude-sonnet-4-5-20250929"
export ANTHROPIC_SMALL_FAST_MODEL="claude-haiku-4-5-20251001"
EOF
source ~/.zshrc
Use the corresponding shell configuration file if you do not use Zsh.
Verify and use
# Check the configured root URL
echo $ANTHROPIC_BASE_URL
# Enter a project and launch the assistant
cd /path/to/your/project
claude
# Switch models inside the session
/model
The source guide lists the following example Claude models. Availability and multipliers may change; check the current model catalog.
| Model ID | Source multiplier | Role |
|---|---|---|
claude-haiku-4-5-20251001 | 3.5 | Lightweight and fast |
claude-sonnet-4-5-20250929 | 10.5 | Balanced default |
claude-sonnet-5 | 7 | Newer balanced model |
claude-opus-4-5-20251101 | 17.5 | High capability |
claude-opus-5 | 17.5 | Flagship |
claude-fable-5 | 35 | Higher capability and cost |
When ANTHROPIC_BASE_URL takes effect, model requests use the configured platform endpoint and its billing instead of the official Anthropic endpoint.
Codex CLI
Codex CLI is OpenAI's terminal coding agent. Use a provider that supports the platform's /v1/responses endpoint.
Installation
Windows using WSL2
wsl --install
# Restart if prompted, then enter WSL
wsl
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
nvm install 22
npm i -g @openai/codex
codex --version
macOS / Linux
npm install -g @openai/codex
codex --version
If installation reports a permissions error, check your Node.js installation and global package directory permissions.
Configuration
Edit ~/.codex/config.toml:
model = "gpt-5.2"
model_provider = "mrouter"
[model_providers.mrouter]
name = "MRouter"
base_url = "{baseUrl}/v1"
env_key = "MROUTER_API_KEY"
wire_api = "responses"
| Field | Purpose |
|---|---|
model | Default model, such as gpt-5.2 or gpt-5.3-codex. |
base_url | Includes /v1. |
env_key | Name of the environment variable containing your key. |
wire_api | responses selects /v1/responses. Both your Codex version and upstream provider must support it. |
Set the key environment variable:
macOS / Linux
# Add to your shell configuration, such as ~/.zshrc
export MROUTER_API_KEY="sk-your-api-key"
Windows PowerShell
[Environment]::SetEnvironmentVariable('MROUTER_API_KEY','sk-your-api-key','User')
Open a new terminal after updating persistent environment variables. For a WSL installation, set the key inside WSL.
Usage
cd /path/to/your/project
codex
# Switch models inside the session
/model
Example models from the source guide: gpt-5.3-codex, gpt-5.1-codex, gpt-5.2, and kimi-k2.7-code. Confirm Responses API support for the model and group you select.
CC Switch (AI CLI configuration manager)
CC Switch is an open-source, cross-platform tool for managing Claude Code, Codex, and Gemini CLI providers, MCP servers, and system prompts.
Installation
# macOS with Homebrew
brew tap farion1231/ccswitch
brew install --cask cc-switch
# Arch Linux
paru -S cc-switch-bin
# Web version for headless or SSH servers
wget https://github.com/farion1231/cc-switch/releases/latest/download/cc-switch-web-linux-x64.tar.gz
tar -xzf cc-switch-web-linux-x64.tar.gz
cd cc-switch-web/ && ./cc-switch-web
# Default port: 17666; open http://localhost:17666
On Windows, download the .msi installer or portable .zip from Releases.
Features
| Module | Purpose |
|---|---|
| Provider management | Switch Claude, Codex, and Gemini configurations; manage endpoints and latency checks. |
| Four model tiers | Configure Haiku, Sonnet, Opus, and custom models. |
| MCP servers | Manage stdio, HTTP, and SSE connections from one panel. |
| Prompts | Manage presets for CLAUDE.md, AGENTS.md, and GEMINI.md. |
| Skills | Manage shared extensions. |
Add a provider manually
- Open CC Switch and select + to add a provider.
- Select the target application: Claude, Codex, or Gemini.
- Enter:
| Setting | Value |
|---|---|
| Name | MRouter |
| API URL | Claude: {baseUrl}; Codex: {baseUrl}/v1 |
| API key | sk-your-api-key |
| Main model (required) | For example claude-sonnet-4-5-20250929 |
| Haiku model | claude-haiku-4-5-20251001 |
| Sonnet model | claude-sonnet-5 |
| Opus model | claude-opus-5 |
- Save and select Enable for the provider.
- Restart the target CLI so the configuration takes effect. Some versions support hot reload.
Under Settings → General → Window behavior, review options for launch at startup, silent launch, applying settings to the Claude Code extension, skipping initial setup confirmation, and minimizing to the tray. The source guide recommends these for a smoother first run; choose settings appropriate for your machine and client version.
Cline / Roo Code (VS Code extensions)
- Install Cline or Roo Code from the VS Code extension marketplace.
- Open the extension settings:
| Setting | Value |
|---|---|
| API Provider | OpenAI Compatible |
| Base URL | {baseUrl}/v1 |
| API Key | sk-your-api-key |
| Model ID | For example claude-sonnet-4-5-20250929 |
- Enable capability switches such as Supports Images or Supports Computer Use only when supported and needed.
- Save and start a conversation in the sidebar.
Cline can send many requests with long contexts. Set a quota cap for its token in the platform console.
Cursor
Cursor can override the OpenAI endpoint:
- Use
Ctrl/Cmd + Shift + P, search for OpenAI API Key, and enter your key if your version exposes this command. - Open Settings → Models → OpenAI API Key, enable Override OpenAI Base URL, and enter
{baseUrl}/v1. - Select Verify.
- Add custom model IDs such as
claude-sonnet-4-5-20250929orgpt-5.2. - Disable other built-in models if necessary to select your custom model. Built-in features such as Tab completion still use Cursor's own service.
Agent and Composer compatibility depends on model capabilities and the Cursor version. If Agent mode fails, try Chat mode.
Continue (VS Code / JetBrains)
For versions using JSON configuration, edit ~/.continue/config.json. Use your installed version's configuration format if it differs.
{
"models": [
{
"title": "MRouter - GPT-5.2",
"provider": "openai",
"model": "gpt-5.2",
"apiBase": "{baseUrl}/v1",
"apiKey": "sk-your-api-key"
},
{
"title": "MRouter - Claude Sonnet",
"provider": "openai",
"model": "claude-sonnet-4-5-20250929",
"apiBase": "{baseUrl}/v1",
"apiKey": "sk-your-api-key"
}
],
"tabAutocompleteModel": {
"title": "MRouter - Completion",
"provider": "openai",
"model": "gpt-5-mini",
"apiBase": "{baseUrl}/v1",
"apiKey": "sk-your-api-key"
}
}