OmniRoute is an AI gateway that gives coding agents one endpoint for accessing models from many providers, with quota-aware fallback between them. It is for people using Claude Code, Codex, Cursor, OpenCode, Cline, Copilot, and similar tools who want a single route to their available AI models.
Borrowing it
Nothing to install: this file belongs to diegosouzapw/OmniRoute. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/diegosouzapw/OmniRoute/release/v3.8.53/AGENTS.mdgit clone --depth 1 https://github.com/diegosouzapw/OmniRouteWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/diegosouzapw/omniroute/agents-md)<a href="https://agentmods.dev/instructions/diegosouzapw/omniroute/agents-md"><img src="https://agentmods.dev/badge/instructions/diegosouzapw/omniroute/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/diegosouzapw/omniroute/agents-md"><img src="https://agentmods.dev/badge/instructions/diegosouzapw/omniroute/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.10247 | $0.10247 |
| Opus 5.5 | $0.04099 | $0.04099 |
| Sonnet 5.5 | $0.02049 | $0.02049 |
| Haiku 4.5 | $0.01025 | $0.01025 |
Grade B, and why
OmniRoute AGENTS.md scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- **(b) Never merge, push, rebase, or force-push a PR / branch / worktree that another session is actively working** — including a PR whose head is a live fix worktree in `.claude/worktrees/` you did **not** create, even How it starts
The opening of the file, as written. The whole thing — 448 lines — stays where its author put it; the contents beside it link to each section on GitHub.
OmniRoute agent guide
Single source of truth. This file holds ALL project rules, conventions, architecture notes and Hard Rules for every AI assistant working this repository (Claude Code, Gemini, Codex, Copilot, and any other agent).
CLAUDE.mdandGEMINI.mdonly add assistant-specific deltas and point back here. When a rule needs to change, change it HERE — never re-fork it into an assistant-specific file.
Quick Start
npm install # Install deps (auto-generates .env from .env.example)
npm run dev # Dev server at http://localhost:20128
npm run build # Production build (Next.js 16 standalone)
npm run build:release # Release build
npm run lint # ESLint (0 errors expected; warnings are pre-existing)
npm run typecheck:core # TypeScript check (should be clean)
npm run typecheck:noimplicit:core # Strict check (no implicit any)
npm run test:coverage # Unit tests + coverage gate (67.33 / 67.33 / 72.02 / 65.08 — statements/lines/functions/branches, enforced by the blocking ratchet in config/quality/quality-baseline.json; test:coverage itself hardcodes 60)
npm run check # lint + test combined
npm run check:cycles # Detect circular dependencies (advisory — lists the SCCs)
npm run check:cycles:ratchet # Same scan, blocking above the quality-baseline ceiling
npm run check:docs-all # Run after changing documentation (includes fabricated-docs validation)
Running tests: see Testing below (run the most focused test for changed code first).
Project at a Glance
OmniRoute — unified AI proxy/router. One endpoint, 375 LLM providers, auto-fallback.
- API Routes —
src/app/api/v1/(Next.js App Router entry points) - Handlers —
open-sse/handlers/(request processing: chat, embeddings, etc) - Executors —
open-sse/executors/(provider-specific HTTP dispatch) - Translators —
open-sse/translator/(format conversion OpenAI↔Claude↔Gemini) - Transformer —
open-sse/transformer/(Responses API ↔ Chat Completions) - Services —
open-sse/services/(combo routing, rate limits, caching, etc) - Database —
src/lib/db/(SQLite domain modules, 209 migrations) - Domain/Policy —
src/domain/(policy engine, cost rules, fallback logic) - MCP Server —
open-sse/mcp-server/(110 tools: 45 canonical + memory/skill/GitHub/pool/gamification/plugin/Notion/Obsidian/local-corpus/RTK modules; 3 transports: stdio / SSE / Streamable HTTP; 33 scopes) - A2A Server —
src/lib/a2a/(JSON-RPC 2.0 agent protocol) - Skills —
src/lib/skills/(extensible skill framework); Memory —src/lib/memory/(persistent conversational memory)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago Changed · -345 lines · -5,388 tokens per session 1ebb9ad5ebf9
- 7d ago Changed · +2 lines · +38 tokens per session 0ef93eee3cbd
- 8d ago Changed 6c6314362280
- 15d ago Changed 11f594633e5d
- 17d ago Changed · +6 lines · +459 tokens per session d27b9bad1ece
- 23d ago Changed · +1 lines · +30 tokens per session ea703be88fa1
- 26d ago Changed a598133547a2
- 27d ago Changed 28cf63ddbbc0
- 1mo ago Changed 16d8013114d3
- 1mo ago First seen · 784 lines · 15,108 tokens per session scan B 104065b760ed
OmniRoute AGENTS.md is an instructions file published in the GitHub repository diegosouzapw/OmniRoute (80,849 stars, last pushed yesterday), licensed MIT. It adds 10,247 tokens to every session, about $0.0410 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.