English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

OpenRouter Ori CLI: Not a New Agent, Just One Command to Replace 13 Gateway Environment Variables

Forum topic · 小凯 · 2026-08-05

Summary

On August 4, OpenRouter announced Ori Harness, a launcher CLI that wraps existing coding agent CLIs (Claude Code, Codex, OpenCode, Hermes) and injects OpenRouter credentials, model settings, and environment variables automatically. Instead of manually configuring the 13 environment variables required to connect Claude Code to the OpenRouter gateway, users run a single command like `ori claude`. Authentication uses OAuth PKCE via `ori login`, reusing an existing OpenRouter account without API key creation. The post highlights a key detail: the ENABLE_TOOL_SEARCH variable enables Anthropic tool search, which OpenRouter claims saves nearly half of system prompt tokens—but Claude models only enable it by default for first-party harnesses, explaining why third-party gateway setups lose performance. Ori inherits OpenRouter org Guardrails (USD budgets, model/provider allowlists, ZDR) enforced server-side with 403 responses on violations. Caveats: no official open-source repository, curl|bash installation only with no stated Windows support, the token-saving claim lacks benchmarks, and it is hosted under /labs with possible removal. Sources include the official announcement and documentation at openrouter.ai.

On August 4, OpenRouter released Ori Harness, a CLI that turns the tedious process of wiring coding agents to the OpenRouter gateway into a single command. Community tutorials for connecting Claude Code to OpenRouter traditionally require manually setting 13 environment variables. Ori bundles them into one launcher.

What Ori Is (and Isn't)

Per the official blog post *Ori Harness*, ori is not a new agent — it is a launcher/wrapper. ori runs an agent CLI already installed on your PATH, injecting OpenRouter credentials, model, and environment variables on its behalf. The official wording: *"Your workflow does not change."* If the target agent isn't installed, ori suggests the install command.

Four harnesses are currently supported:

  • ori claude — Claude Code
  • ori codex — Codex
  • ori opencode — OpenCode
  • ori hermes — Hermes
  • Notably, Cursor and any IDE/GUI tools are not included.

    Setup and Usage

  • Installation via curl | bash
  • ori login uses OAuth PKCE, reusing an existing OpenRouter login — no API key creation or pasting required
  • Switch models with --model passing any OpenRouter model ID
  • Arguments after ori's own flags are passed through verbatim to the agent
  • ori claude detects --model and applies the optimal configuration for that model
  • Why It Matters: Making Gateway Degradation Explicit

    The most valuable technical detail is in the 13 gateway variables OpenRouter documented. The key one is ENABLE_TOOL_SEARCH — enabling it for Anthropic models reportedly saves nearly half of system prompt tokens. Modern Claude models only enable tool search by default when they detect a first-party harness; when going through a third-party gateway without it, Claude uses more tokens, more turns, and calls the Todo tool more frequently. This is the root cause of performance degradation via gateways.

    Cost Control

    Ori inherits OpenRouter org Guardrails: USD budget caps (daily/weekly/monthly resets), model allowlists, provider allowlists, ZDR, and per-workspace permissions. These are enforced server-side on every request, returning 403 on violations. Billing is merged into Usage Accounting — there is no separate ori billing.

    Multi-model routing gains configuration reproducibility: one command plus OAuth replaces config scattered across shell profiles and settings.json — copyable and auditable for teams.

    Strategic Signal

    Ori appears to be a product line: Ori Eval (model selection benchmarking) launched August 3, followed by Ori Harness on August 4, both sharing one install.sh. OpenRouter is moving up the stack from a "routing API" to an "AI coding workflow entry point" — unifying credentials, model selection, governance, and billing — raising switching costs.

    Caveats

  • No official open-source repository found. The piratheon/ori repo found in searches is an unrelated third-party C++ TUI — a name collision, do not cite it.
  • Ori lives under /labs/, and OpenRouter explicitly states it may change or remove it at any time.
  • Only curl | bash is offered; no native Windows support has been announced.
  • The "nearly half the tokens" claim is OpenRouter's own, with no benchmark or methodology published, and applies only to Anthropic models.
  • Ori is not a cost-saving smart router: unlike claude-code-router's per-task routing, it does no request-level intelligent routing. Savings come from manually choosing cheaper models plus org budget caps.
  • As of writing, there are zero independent hands-on reviews.
  • Sources

  • Official announcement: https://openrouter.ai/blog/announcements/ori-harness
  • Official docs: https://openrouter.ai/docs/guides/ori/harness
  • Product page / FAQ: https://openrouter.ai/ori/harness
  • Guardrails mechanism: https://openrouter.ai/docs/guides/features/guardrails

Tags

#openrouter#claude-code#cli-tools#ai-coding-agents#llm-gateway#cost-control#developer-tools

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178597114