orq.aiAdvent of RoutingDocs

Door 4 · still sealed

Hands off the wax, elf. This door opens on Dec 4.

-days--hours--min--sec

Rudolph is still polishing this one. Back to the calendar

Door 4 · Dec 4 Coding agents on any model (orq launch)

Every elf's own workbench

Run Claude Code, Codex and seven more coding agents through the AI Router on the model you pick: one command, every call traced, nothing left on disk.

The toy-train app ships at noon. Sprocket's coding agent has been going round the same sleigh-bell bug since breakfast, like the train on its track.

  1. Sprocket

    It's gone round this bug all morning! Can a GPT model have a go?

  2. Tinsel

    Same elf, new brain. Pass --model.

  3. Sprocket

    Great! I'll rewrite my agent config, paste a key into my dotfiles and put it all back tonight!

  4. Tinsel

    Leave the dotfiles. orq launch sets up your bench for one shift and sweeps it clean when you clock off.

  5. Sprocket

    Even better: I'll keep my own Claude plan and just point it at the GPT model!

agentClaude CodeagentCodexcliorq launch--model provider/modelorq.aiAI Router/v3/router · /v3/anthropicworkspaceAny model, tracedcost · tokens · latencyoptionalYour own plananthropic/ or openai/own plan
  1. agentClaude Code
    agentCodex
  2. cliorq launch--model provider/model
  3. orq.aiAI Router/v3/router · /v3/anthropic
  4. workspaceAny model, tracedcost · tokens · latency
    optionalYour own plananthropic/ or openai/
`orq launch` sets up the bench for one shift: the agent's calls go through the AI Router to any model, or to your own plan, and every one lands in a trace.

How it works

Tinsel’s fix is one command. orq launch <agent> starts a coding agent routed through the AI Router for that session only:

  1. Credentials. Launch picks a key, first match wins: an active profile (--profile, ORQ_PROFILE or orq auth profile use), then ORQ_API_KEY, then the key orq setup minted (if it belongs to the active workspace and has not expired), then your login session.
  2. Wiring. It hands the agent the router address and your key. Claude Code talks to https://my.orq.ai/v3/anthropic, Codex to https://my.orq.ai/v3/router. By default it also adds the Orq MCP server and links the Orq Skills.
  3. Session. The agent runs as usual. Every call is traced with cost, tokens and latency, and Budgets and rate limits apply.
  4. Clean-up. When you exit, nothing is left on disk.

Agents you can launch: claude, codex, copilot, gemini, kilo, kimi, omp, opencode and pi.

Run it

Install the CLI and sign in once. The installer also runs orq setup, which saves a key to ~/.orq/env and wires your agents permanently. To keep launch-only, skip it and sign in instead:

curl -fsSL https://cli.orq.ai/install.sh | sh -s -- --no-setup
orq auth login

Start an agent on any model. --model takes a provider/model id (Gemini CLI takes a bare Gemini id):

# Claude Code on an OpenAI model
orq launch claude --model openai/gpt-6.2-sol

# Codex on an Anthropic model
orq launch codex --model anthropic/claude-sonnet-5-5

Run it headless, for example in CI. With a prompt, the agent runs once and exits:

export ORQ_API_KEY=sk_live_...
orq launch claude -p "summarize yesterday's failed traces"

In CI, add --mcp-auth env (the MCP server then uses the same key) or --no-mcp. The MCP tools then need a workspace API key with their permissions: a key from orq setup only covers model calls. Launcher flags go before -p, for example orq launch claude --mcp-auth env -p "...".

For Claude Code, -p is Claude’s own flag, passed through. Other agents take -p or --prompt, and launch maps it to the agent’s own syntax.

Bring your own subscription

Add --subscription to bill model calls to your own Claude or ChatGPT plan. The agent keeps its own login, and Orq still traces the calls. Only claude and codex have this flag.

orq launch claude --subscription \
  --model anthropic/claude-sonnet-5-5
orq launch codex --subscription \
  --model openai/gpt-6-luna

The plan’s own usage limits still apply. Without --subscription (and, for Claude Code, without --no-gateway), usage bills to the workspace your API key belongs to.

Launch or connect

orq launch orq connect
Lasts One session Until orq disconnect
Leaves on disk Nothing, cleared on exit Each agent’s own config
Good for Trying a model, CI runs Your everyday setup

GitHub Copilot CLI and Gemini CLI are launch-only. Claude Code has no provider config, so launch is how its model calls go through the router.

Long sessions

A token from the login session expires after an hour. It cannot be refreshed mid-session, so an agent that runs past the hour starts failing. For long or unattended sessions, export an API key first.

Nice list

  • Running --dry-run first. It prints the command and environment the agent would get, with the key redacted, and starts nothing.
  • An exported API key for long or unattended sessions. A login-session token expires after an hour and cannot be refreshed mid-session.
  • --subscription with claude or codex when a call should use your own plan. The agent keeps its own login, and Orq still traces the call.
  • --no-mcp or --no-skills when you want a bare agent. By default launch wires in the Orq MCP server and links the Orq Skills.

Naughty list

  • Counting on the workspace to catch a rejected ChatGPT login. In Codex subscription mode the router does not fall back to the workspace's provider credentials.
  • Putting launcher flags after the agent's own flags. In orq launch claude -p 'hi' --dry-run, launch hands --dry-run to Claude Code, which does not know it, so you get no dry run.
  • Adding up Claude Code costs from the AI Router and the session trace. Each call is recorded in both. Pass --no-otel to keep one copy.
  • Leaving an old ORQ_API_KEY exported. It wins over the workspace you picked at orq auth login.

Elf's challenge

Try Sprocket's plan: run orq launch claude --subscription --model openai/gpt-6.2-sol --dry-run. Does it print a setup, and why or why not?

Stuck? Ask Tinsel for a hint

It stops with an error. A Claude plan only serves anthropic/ models. Swap in anthropic/claude-sonnet-5-5 and the dry-run prints the setup.

Christmas crackerWhy did Sprocket's .zshrc make the nice list this year?Pull it for the punchline

orq launch never laid a finger on it.