Using Any LLM with Claude Code: A Complete Guide to Claudish

Claudish is a proxy that lets you use OpenRouter, OpenAI, Gemini, and any other LLM providers with Claude Code's CLI interface. Instead of being limited to Anthropic's models, you can route requests through any provider while keeping Claude Code's powerful agentic capabilities.

Why Claudish?

  • Cost control: Use cheaper models for subagents or testing
  • Provider flexibility: Switch between OpenAI, Google, Anthropic, or local models
  • Model experimentation: Test cutting-edge models as they're released
  • Seamless integration: Works as a drop-in replacement for Claude Code

Prerequisites

  1. Claude Code installed
  2. API key from at least one provider:
  3. For non-Pro/Max users only: Set placeholder Anthropic keys (skip if subscribed)
export ANTHROPIC_API_KEY="sk-ant-api03-placeholder"
export ANTHROPIC_AUTH_TOKEN="placeholder"

Installation

Choose your package manager:
npm install -g claudish
bun install -g claudish
brew install claudish
curl -fsSL https://raw.githubusercontent.com/MadAppGang/claudish/main/install.sh | sh
Optional: Run claudish --init to add Claudish as a skill to your current project.

Configuration

Claudish uses environment variables to configure models and API keys. You need to set these in two places: your shell environment and Claude Code's settings.

Environment Variables Reference

Variable Purpose
OPENROUTER_API_KEY OpenRouter API authentication
CLAUDISH_MODEL Default model for interactive/single-shot mode
CLAUDISH_MODEL_OPUS Model for opus tier subagents
CLAUDISH_MODEL_SONNET Model for sonnet tier subagents
CLAUDISH_MODEL_HAIKU Model for haiku tier subagents
ANTHROPIC_API_KEY Your Anthropic key (or placeholder)
ANTHROPIC_AUTH_TOKEN Your Anthropic token (or placeholder)

Windows Setup

Environment Variables (sysdm.cpl → Advanced → Environment Variables):
ANTHROPIC_API_KEY=your-anthropic-key
ANTHROPIC_AUTH_TOKEN=your-anthropic-token
OPENROUTER_API_KEY=sk-or-v1-xxxxxxxxxxxxxxxx
CLAUDISH_MODEL=openrouter@openai/gpt-4.1
CLAUDISH_MODEL_OPUS=openrouter@openai/gpt-4.1
CLAUDISH_MODEL_SONNET=openrouter@openai/gpt-4.1-mini
CLAUDISH_MODEL_HAIKU=openrouter@openai/gpt-4.1-nano
Claude Code Settings (C:\Users\[username]\.claude\settings.json):
{
  "env": {
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5",
    "OPENROUTER_API_KEY": "sk-or-v1-xxxxxxxxxxxxxxxx",
    "CLAUDISH_MODEL": "openrouter@openai/gpt-4.1",
    "CLAUDISH_MODEL_OPUS": "openrouter@openai/gpt-4.1",
    "CLAUDISH_MODEL_SONNET": "openrouter@openai/gpt-4.1-mini",
    "CLAUDISH_MODEL_HAIKU": "openrouter@openai/gpt-4.1-nano"
  }
}
Verification:
$env:CLAUDISH_MODEL
$env:OPENROUTER_API_KEY

Unix-like Systems (WSL, Linux, macOS)

Create ~/.env:
ANTHROPIC_API_KEY=your-anthropic-key
ANTHROPIC_AUTH_TOKEN=your-anthropic-token
OPENROUTER_API_KEY=sk-or-v1-xxxxxxxxxxxxxxxx
CLAUDISH_MODEL=openrouter@openai/gpt-4.1
CLAUDISH_MODEL_OPUS=openrouter@openai/gpt-4.1
CLAUDISH_MODEL_SONNET=openrouter@openai/gpt-4.1-mini
CLAUDISH_MODEL_HAIKU=openrouter@openai/gpt-4.1-nano
Load environment (add to ~/.bashrc, ~/.zshrc, or ~/.bash_profile):
if [ -f "$HOME/.env" ]; then
    set -a
    source "$HOME/.env"
    set +a
fi
Claude Code Settings (~/.claude/settings.json):
{
  "env": {
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5",
    "OPENROUTER_API_KEY": "sk-or-v1-xxxxxxxxxxxxxxxx",
    "CLAUDISH_MODEL": "openrouter@openai/gpt-4.1",
    "CLAUDISH_MODEL_OPUS": "openrouter@openai/gpt-4.1",
    "CLAUDISH_MODEL_SONNET": "openrouter@openai/gpt-4.1-mini",
    "CLAUDISH_MODEL_HAIKU": "openrouter@openai/gpt-4.1-nano"
  }
}
Verification:
source ~/.bashrc
echo $CLAUDISH_MODEL
echo $OPENROUTER_API_KEY

Usage

Interactive Mode

Start an interactive session with your default model:
claudish
No model selector appears—it starts immediately with CLAUDISH_MODEL.

Single-shot Mode

Execute a task with one command:
claudish "task description"

claudish --model "openrouter@openai/gpt-4.1" "task description"

Tier-based Routing (Subagents)

When Claude Code spawns subagents with different tiers, Claudish automatically routes:
  • opus tier → CLAUDISH_MODEL_OPUS
  • sonnet tier → CLAUDISH_MODEL_SONNET
  • haiku tier → CLAUDISH_MODEL_HAIKU

Native Claude vs Claudish

claude --model sonnet "task"

claudish "task"
Claudish doesn't manage conversation history—Claude Code handles that.

Model Selection

Discovering Models

claudish --models

claudish --models "sonnet"
claudish --models "gpt"

claudish --top-models

Example Model IDs

Use the provider@model format:
openrouter@openai/gpt-4.1
openrouter@openai/gpt-4.1-mini
openrouter@openai/gpt-4.1-nano
openrouter@anthropic/claude-opus-4-5
openrouter@google/gemini-3-pro
openrouter@deepseek/deepseek-r1

Configuration Precedence

Claudish reads tier configurations in this order (highest priority first):
  1. CLI flags: --model-opus, --model-sonnet, --model-haiku
  2. CLAUDISH_MODEL_* environment variables
  3. ANTHROPIC_DEFAULT_*_MODEL environment variables
  4. Profile defaults

Advanced Configuration

Custom API Endpoints

Override default API endpoints for specialized deployments:
GEMINI_BASE_URL=https://custom-gemini-endpoint.com
OPENAI_BASE_URL=https://custom-openai-endpoint.com
OPENROUTER_BASE_URL=https://custom-openrouter-endpoint.com
OLLAMA_BASE_URL=http://192.168.1.100:11434
OLLAMA_HOST=http://192.168.1.100:11434

Monitoring Usage

Track your model usage and costs at the OpenRouter dashboard.

Troubleshooting

Environment Variables Not Loaded

Unix/Linux/macOS/WSL:
source ~/.bashrc
env | grep CLAUDISH
Windows PowerShell:
$env:CLAUDISH_MODEL

Model Not Found

echo $OPENROUTER_API_KEY

claudish --models --force-update

Settings Not Applied

Windows: C:\Users\[username]\.claude\settings.json
Unix: ~/.claude/settings.json

cat ~/.claude/settings.json | jq '.env'

Conclusion

Claudish unlocks the full potential of Claude Code by giving you access to any LLM provider. Whether you're optimizing costs, experimenting with new models, or running local inference, Claudish provides the flexibility you need while preserving Claude Code's powerful agentic workflows.

© 2025 Process Point. All rights reserved.