Skip to main content

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

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"
}
}
VariablePurpose
ANTHROPIC_BASE_URLOmit /v1; Claude Code appends /v1/messages.
ANTHROPIC_AUTH_TOKENYour sk- model API key.
ANTHROPIC_MODELMain model, such as a Sonnet model.
ANTHROPIC_SMALL_FAST_MODELLightweight model for tasks such as background summaries, where supported by the client version.
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFICDisables 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 IDSource multiplierRole
claude-haiku-4-5-202510013.5Lightweight and fast
claude-sonnet-4-5-2025092910.5Balanced default
claude-sonnet-57Newer balanced model
claude-opus-4-5-2025110117.5High capability
claude-opus-517.5Flagship
claude-fable-535Higher 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"
FieldPurpose
modelDefault model, such as gpt-5.2 or gpt-5.3-codex.
base_urlIncludes /v1.
env_keyName of the environment variable containing your key.
wire_apiresponses 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​

ModulePurpose
Provider managementSwitch Claude, Codex, and Gemini configurations; manage endpoints and latency checks.
Four model tiersConfigure Haiku, Sonnet, Opus, and custom models.
MCP serversManage stdio, HTTP, and SSE connections from one panel.
PromptsManage presets for CLAUDE.md, AGENTS.md, and GEMINI.md.
SkillsManage shared extensions.

Add a provider manually​

  1. Open CC Switch and select + to add a provider.
  2. Select the target application: Claude, Codex, or Gemini.
  3. Enter:
SettingValue
NameMRouter
API URLClaude: {baseUrl}; Codex: {baseUrl}/v1
API keysk-your-api-key
Main model (required)For example claude-sonnet-4-5-20250929
Haiku modelclaude-haiku-4-5-20251001
Sonnet modelclaude-sonnet-5
Opus modelclaude-opus-5
  1. Save and select Enable for the provider.
  2. 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)​

  1. Install Cline or Roo Code from the VS Code extension marketplace.
  2. Open the extension settings:
SettingValue
API ProviderOpenAI Compatible
Base URL{baseUrl}/v1
API Keysk-your-api-key
Model IDFor example claude-sonnet-4-5-20250929
  1. Enable capability switches such as Supports Images or Supports Computer Use only when supported and needed.
  2. 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:

  1. Use Ctrl/Cmd + Shift + P, search for OpenAI API Key, and enter your key if your version exposes this command.
  2. Open Settings → Models → OpenAI API Key, enable Override OpenAI Base URL, and enter {baseUrl}/v1.
  3. Select Verify.
  4. Add custom model IDs such as claude-sonnet-4-5-20250929 or gpt-5.2.
  5. 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"
}
}