Skip to main content

OpenRouter Integration

CCS v7.0.0 introduces OpenRouter as a first-class provider. Access 300+ AI models through a unified API with intelligent model selection and tier mapping.

Overview

OpenRouter API Profiles - Dark

Key Features

300+ Models

Access Claude, GPT, Gemini, Llama, and more through one API

Interactive Picker

Visual model selection with search and filtering in CLI and UI

Tier Mapping

Automatic opus/sonnet/haiku tier assignment for model routing

Dynamic Discovery

Real-time detection of newest models from OpenRouter catalog

Quick Start

Via CLI

ccs api create --preset openrouter
The CLI launches an interactive model picker:
  1. Enter your OpenRouter API key
  2. Browse or search available models
  3. Select models for each tier (opus, sonnet, haiku)
  4. Profile is created and ready to use

Via Dashboard

1

Open Dashboard

ccs config
2

Navigate to API Profiles

Click “API Profiles” in the sidebar (note the OpenRouter badge).
3

Create Profile

Click “Create Profile” and select “OpenRouter” from Provider Presets.
4

Configure Models

Use the model picker to select models for each tier.

Model Tier Mapping

CCS maps OpenRouter models to Claude Code’s tier system for intelligent model routing:
TierPurposeRecommended Models
OpusComplex reasoning, architectureClaude 3.5 Opus, GPT-4o
SonnetGeneral coding, balancedClaude 3.5 Sonnet, Gemini Pro
HaikuQuick tasks, cost-efficientClaude 3 Haiku, GPT-4o-mini

Exacto Models

CCS prioritizes Exacto-tuned models for agentic performance. These models are optimized for:
  • Tool calling accuracy
  • Code generation quality
  • Instruction following
Look for models tagged with “Exacto” in the picker for best results with Claude Code workflows.

Configuration

Profile Structure

OpenRouter profiles use the standard CCS settings format:
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://openrouter.ai/api",
    "ANTHROPIC_AUTH_TOKEN": "sk-or-v1-xxxxx",
    "ANTHROPIC_MODEL": "anthropic/claude-3.5-sonnet",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "anthropic/claude-3-opus",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "anthropic/claude-3-haiku"
  }
}

Environment Variables

VariableDescription
ANTHROPIC_BASE_URLMust be https://openrouter.ai/api
ANTHROPIC_AUTH_TOKENYour OpenRouter API key
ANTHROPIC_MODELDefault model (sonnet tier)
ANTHROPIC_DEFAULT_OPUS_MODELModel for opus tier
ANTHROPIC_DEFAULT_HAIKU_MODELModel for haiku tier

Usage

# Use OpenRouter profile
ccs openrouter "implement the authentication service"

# Parallel workflows
ccs openrouter "design the system"    # Terminal 1: Architecture
ccs glm "implement the service"       # Terminal 2: Bulk coding

Model Selection Tips

  • anthropic/claude-3.5-sonnet - Excellent tool use
  • openai/gpt-4o - Strong reasoning
  • Models with “Exacto” tag - Optimized for agents
  • anthropic/claude-3-haiku - Fast and cheap
  • openai/gpt-4o-mini - Good balance
  • meta-llama/llama-3.1-8b-instruct - Open source
  • anthropic/claude-3.5-sonnet - 200K context
  • google/gemini-pro-1.5 - 1M context
  • anthropic/claude-3-opus - 200K context

Troubleshooting

Verify your key at openrouter.ai/keys:
curl -H "Authorization: Bearer sk-or-v1-xxxxx" \
     https://openrouter.ai/api/v1/models
Some models require credits or have access restrictions. Check model availability on the OpenRouter dashboard.
OpenRouter has per-model rate limits. Switch models or upgrade your plan if hitting limits.
Get your API key at openrouter.ai/keys. New accounts receive free credits to get started.