CodeRoute

CodeRoute Harness Setup Guide

CodeRoute exposes one OpenAI-compatible endpoint for coding agents:


Base URL: https://coderoute.ai/v1
Model:    coding-auto
API key:  your CODEROUTE_API_KEY
      

Start with coding-auto. Use coding-strong for harder architecture, debugging, and review work.

Get Your API Key


export CODEROUTE_API_KEY="$(ssh pchomelab 'docker exec coderoute-coderoute-api-1 printenv CODEROUTE_API_KEY')"
      

Do not commit the key to a repo. Prefer environment variables, each harness credential store, or a local ignored .env.

Model Aliases

AliasUse it for
coding-autoDefault route. Lets CodeRoute choose the model.
coding-localLocal-only work. Avoids cloud fallback.
coding-balancedRefactors, debugging, and tests.
coding-strongStrong local/frontier route, currently GLM-5.2 Q3_K_M on the Mac Studio.
coding-glm-openrouterHosted GLM-5.2 through OpenRouter for faster/full-model testing.
coding-reviewSecurity review, final review, and risk-heavy checks.

OpenCode

Create opencode.json in your project:


{
  "$schema": "https://opencode.ai/config.json",
  "model": "coderoute/coding-auto",
  "small_model": "coderoute/coding-auto",
  "provider": {
    "coderoute": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "CodeRoute",
      "options": {
        "baseURL": "https://coderoute.ai/v1",
        "apiKey": "{env:CODEROUTE_API_KEY}"
      },
      "models": {
        "coding-auto": { "name": "CodeRoute Auto", "tools": true },
        "coding-local": { "name": "CodeRoute Local", "tools": true },
        "coding-balanced": { "name": "CodeRoute Balanced", "tools": true },
        "coding-strong": { "name": "CodeRoute Strong", "tools": true },
        "coding-glm-openrouter": { "name": "CodeRoute GLM 5.2 Hosted", "tools": true },
        "coding-review": { "name": "CodeRoute Review", "tools": true }
      }
    }
  }
}
      

Run OpenCode:


export CODEROUTE_API_KEY="$(ssh pchomelab 'docker exec coderoute-coderoute-api-1 printenv CODEROUTE_API_KEY')"
opencode
      

In OpenCode, use /models and pick CodeRoute Auto or CodeRoute Strong.

One-shot CLI smoke test:


opencode run --model coderoute/coding-auto \
  "Do not edit files. Reply with exactly: CodeRoute ready"
      

Hosted GLM-5.2 smoke test:


opencode run --model coderoute/coding-glm-openrouter \
  "Do not edit files. Reply with the model route you are using."
      

OpenAI Codex CLI

Codex supports custom model providers. Add a CodeRoute provider to your Codex config:


model = "coding-auto"
model_provider = "coderoute"

[model_providers.coderoute]
name = "CodeRoute"
base_url = "https://coderoute.ai/v1"
env_key = "CODEROUTE_API_KEY"
wire_api = "chat"
      

Run Codex from your project:


export CODEROUTE_API_KEY="$(ssh pchomelab 'docker exec coderoute-coderoute-api-1 printenv CODEROUTE_API_KEY')"
codex
      

For a focused strong-model session, set model = "coding-strong" in a project-local config or pass the equivalent model option your Codex version supports.

Cline

Use the OpenAI-compatible provider:

FieldValue
ProviderOpenAI Compatible
Base URLhttps://coderoute.ai/v1
API KeyCODEROUTE_API_KEY
Modelcoding-auto

Use coding-strong for difficult tasks. If Cline asks for a model list and does not discover aliases automatically, enter the CodeRoute alias manually.

Roo Code

Use Roo's OpenAI-compatible configuration:

FieldValue
API providerOpenAI Compatible
Base URLhttps://coderoute.ai/v1
API KeyCODEROUTE_API_KEY
Modelcoding-auto

Recommended mode mapping:

Roo modeCodeRoute alias
Codecoding-auto
Architectcoding-strong
Debugcoding-balanced
Askcoding-local
Reviewcoding-review

Cursor

Use Cursor's OpenAI-compatible custom model settings when available:

FieldValue
Base URLhttps://coderoute.ai/v1
API KeyCODEROUTE_API_KEY
Modelcoding-auto

If Cursor does not allow custom OpenAI-compatible chat models in your installed version or plan, use OpenCode or Codex CLI for CodeRoute-backed agent work and keep Cursor as the editor.

Aider

Use Aider's OpenAI-compatible environment variables:


export AIDER_MODEL=openai/coding-auto
export AIDER_OPENAI_API_BASE=https://coderoute.ai/v1
export AIDER_OPENAI_API_KEY="$CODEROUTE_API_KEY"
aider
      

For a stronger pass:


export AIDER_MODEL=openai/coding-strong
      

Continue

Add a custom OpenAI-compatible model to your Continue config:


{
  "models": [
    {
      "title": "CodeRoute Auto",
      "provider": "openai",
      "model": "coding-auto",
      "apiBase": "https://coderoute.ai/v1",
      "apiKey": "${CODEROUTE_API_KEY}"
    }
  ]
}
      

Use coding-balanced or coding-strong for project-level edits and review workflows.

Claude Code

Claude Code is not a first-class CodeRoute client yet because CodeRoute currently exposes an OpenAI-compatible API, while Claude Code expects Anthropic/Claude-compatible provider flows.

Current recommendation:

Planned CodeRoute work:

First Prompt For A New Project


Study this repository, identify the app architecture, then propose a short implementation plan. After I approve the plan, make the smallest useful change, run the relevant checks, and summarize what changed.
      

For a bigger build:


Build the requested feature end to end. Reuse existing patterns, keep changes scoped, run the test/build commands, and stop only when the app is usable or you hit a concrete blocker.
      

Troubleshooting