Skip to content

Commit d15912e

Browse files
author
backryun
committed
fix(ci): align ChatGPT Web quality contracts
1 parent e1e1cff commit d15912e

69 files changed

Lines changed: 971 additions & 696 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Repository map and Reference Documentation sections below.
4646

4747
## Project at a Glance
4848

49-
**OmniRoute** — unified AI proxy/router. One endpoint, 354 LLM providers, auto-fallback.
49+
**OmniRoute** — unified AI proxy/router. One endpoint, 355 LLM providers, auto-fallback.
5050

5151
| Layer | Location | Purpose |
5252
| ------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -56,7 +56,7 @@ Repository map and Reference Documentation sections below.
5656
| Translators | `open-sse/translator/` | Format conversion (OpenAI↔Claude↔Gemini) |
5757
| Transformer | `open-sse/transformer/` | Responses API ↔ Chat Completions |
5858
| Services | `open-sse/services/` | Combo routing, rate limits, caching, etc |
59-
| Database | `src/lib/db/` | SQLite domain modules (167 migrations) |
59+
| Database | `src/lib/db/` | SQLite domain modules (168 migrations) |
6060
| Domain/Policy | `src/domain/` | Policy engine, cost rules, fallback logic |
6161
| 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 |
6262
| A2A Server | `src/lib/a2a/` | JSON-RPC 2.0 agent protocol |

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# 🚀 OmniRoute — The Free AI Gateway
99

10-
<img src="./docs/diagrams/readme-hero.svg" width="100%" alt="OmniRoute — Never stop coding. Every AI tool → 354 providers — 150+ free — through one endpoint. Claude Code, Codex, Cursor, Cline, Copilot & Antigravity into FREE Claude / GPT / Gemini with auto-fallback. RTK + Caveman stacked compression saves 15–95% tokens (~89% avg) — never hit limits. 354 AI providers · 150+ free tiers · ~1.51B free tokens/mo · 19 routing strategies · $0 to start."/>
10+
<img src="./docs/diagrams/readme-hero.svg" width="100%" alt="OmniRoute — Never stop coding. Every AI tool → 355 providers — 150+ free — through one endpoint. Claude Code, Codex, Cursor, Cline, Copilot & Antigravity into FREE Claude / GPT / Gemini with auto-fallback. RTK + Caveman stacked compression saves 15–95% tokens (~89% avg) — never hit limits. 355 AI providers · 150+ free tiers · ~1.51B free tokens/mo · 19 routing strategies · $0 to start."/>
1111

1212
</div>
1313

@@ -210,7 +210,7 @@ curl http://localhost:20128/v1/chat/completions \
210210

211211
</div>
212212

213-
<img src="./docs/diagrams/promise-pillars.svg" width="100%" alt="The Promise — One endpoint and 354 providers. Automatic fallback keeps routing while another healthy target is available. Six pillars: resilient fallback across 354 providers · up to 95% token savings on eligible workloads · $0 to start with 150+ free tiers and 53 recurring/keyless free-forever providers · 36 CLI/agent integrations through one config · OpenAI, Claude, Gemini and Responses API compatibility at /v1 · production controls including circuit breakers, TLS stealth, MCP 110 tools, A2A, memory, guardrails, evals and 39,000+ static test declarations across 5,100+ tracked test files."/>
213+
<img src="./docs/diagrams/promise-pillars.svg" width="100%" alt="The Promise — One endpoint and 355 providers. Automatic fallback keeps routing while another healthy target is available. Six pillars: resilient fallback across 355 providers · up to 95% token savings on eligible workloads · $0 to start with 150+ free tiers and 53 recurring/keyless free-forever providers · 36 CLI/agent integrations through one config · OpenAI, Claude, Gemini and Responses API compatibility at /v1 · production controls including circuit breakers, TLS stealth, MCP 110 tools, A2A, memory, guardrails, evals and 39,000+ static test declarations across 5,100+ tracked test files."/>
214214

215215
<br/>
216216
<br/>
@@ -463,7 +463,7 @@ All **19** strategies — mix & match per combo step:
463463

464464
</div>
465465

466-
<img src="./docs/diagrams/comparison-table.svg" width="100%" alt="What sets OmniRoute apart — a dated feature snapshot vs 9router, OpenRouter, CLIProxyAPI and LiteLLM across 13 capabilities. OmniRoute: 354 providers, 150+ free tiers built in, 19 routing strategies, 12-engine token compression, built-in MCP server with 110 tools, A2A agent protocol, persistent memory, guardrails, cloud agents, TLS fingerprint stealth, Desktop/Termux/PWA and 43 i18n UI locales. OmniRoute is MIT-licensed and self-hostable. Competitor capabilities and counts may change; see the linked methodology."/>
466+
<img src="./docs/diagrams/comparison-table.svg" width="100%" alt="What sets OmniRoute apart — a dated feature snapshot vs 9router, OpenRouter, CLIProxyAPI and LiteLLM across 13 capabilities. OmniRoute: 355 providers, 150+ free tiers built in, 19 routing strategies, 12-engine token compression, built-in MCP server with 110 tools, A2A agent protocol, persistent memory, guardrails, cloud agents, TLS fingerprint stealth, Desktop/Termux/PWA and 43 i18n UI locales. OmniRoute is MIT-licensed and self-hostable. Competitor capabilities and counts may change; see the linked methodology."/>
467467

468468
<sub>📊 Full methodology &amp; per-feature detail vs 9router, OpenRouter, CLIProxyAPI &amp; LiteLLM → [`docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md`](docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md)</sub>
469469

@@ -1208,7 +1208,7 @@ Métricas canônicas em 2026-08-24: **1.029 vídeos únicos** · **11.132.922 vi
12081208
<tr><td nowrap><b>Runtime</b></td><td>Node.js 22.x / 24.x LTS — <code>&gt;=22.22.2 &lt;23 || &gt;=24.0.0 &lt;27</code></td></tr>
12091209
<tr><td nowrap><b>Language</b></td><td>TypeScript 6.0 — <b>100% TypeScript</b> across <code>src/</code> and <code>open-sse/</code> (zero <code>any</code> in core since v2.0)</td></tr>
12101210
<tr><td nowrap><b>Framework</b></td><td>Next.js 16 + React 19 + Tailwind CSS 4</td></tr>
1211-
<tr><td nowrap><b>Database</b></td><td>better-sqlite3 (SQLite, WAL journaling) + LowDB (JSON legacy) — 122 domain modules, 167 migrations</td></tr>
1211+
<tr><td nowrap><b>Database</b></td><td>better-sqlite3 (SQLite, WAL journaling) + LowDB (JSON legacy) — 122 domain modules, 168 migrations</td></tr>
12121212
<tr><td nowrap><b>Memory</b></td><td>SQLite FTS5 full-text + int8-quantized vector embeddings, typed decay</td></tr>
12131213
<tr><td nowrap><b>Schemas</b></td><td>Zod 4 — MCP tool I/O validation + API contracts</td></tr>
12141214
<tr><td nowrap><b>Protocols</b></td><td>MCP (stdio / HTTP / SSE) + A2A v0.3 (JSON-RPC 2.0 + SSE)</td></tr>

docs/architecture/ARCHITECTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ It provides a single OpenAI-compatible endpoint (`/v1/*`) and routes traffic acr
1717

1818
Core capabilities:
1919

20-
- OpenAI-compatible API surface for CLI/tools (352 providers, 106 executors)
20+
- OpenAI-compatible API surface for CLI/tools (355 providers, 108 executors)
2121
- Request/response translation across provider formats
2222
- Model combo fallback (multi-model sequence)
2323
- Structured combo steps (`provider + model + connection`) with runtime ordering by `compositeTiers`

docs/architecture/CODEBASE_DOCUMENTATION.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ Domain modules (each owns one or more tables): `apiKeys.ts`, `backup.ts`,
348348
`syncTokens.ts`, `tierConfig.ts`, `upstreamProxy.ts`, `versionManager.ts`,
349349
`webhooks.ts`.
350350

351-
`migrations/` holds 167 versioned `.sql` files (idempotent, transactional) and is
351+
`migrations/` holds 168 versioned `.sql` files (idempotent, transactional) and is
352352
executed by `migrationRunner.ts` at boot.
353353

354354
Tables created across the migrations (123 total):
@@ -449,7 +449,7 @@ open-sse/
449449
├── types.d.ts
450450
├── config/ Provider registries, header profiles, identity, …
451451
├── handlers/ Request handlers (chat, embeddings, audio, image, …)
452-
├── executors/ 106 provider-specific HTTP executors
452+
├── executors/ 108 provider-specific HTTP executors
453453
├── translator/ Format conversion (OpenAI ↔ Claude ↔ Gemini ↔ Cursor ↔ Kiro)
454454
├── transformer/ Responses API ↔ Chat Completions stream transformer
455455
├── services/ 80+ service modules (combos, fallback, quotas, identity, …)
@@ -479,7 +479,7 @@ open-sse/
479479

480480
### 4.2 `open-sse/executors/`
481481

482-
106 provider executors, each extending `BaseExecutor` (`base.ts`):
482+
108 provider executors, each extending `BaseExecutor` (`base.ts`):
483483

484484
`antigravity`, `azure-openai`, `blackbox-web`, `cliproxyapi`,
485485
`chatgpt-web-codex`, `cloudflare-ai`, `codex`, `commandCode`, `cursor`, `default`, `devin-cli`,
@@ -488,7 +488,7 @@ open-sse/
488488
(shared identity helper) and `index.ts` (registry).
489489

490490
> Note: providers not listed here are served by `default.ts` using the generic
491-
> OpenAI-compatible executor. The full provider catalog (352 providers) lives in
491+
> OpenAI-compatible executor. The full provider catalog (355 providers) lives in
492492
> `src/shared/constants/providers.ts`.
493493
494494
### 4.3 `open-sse/translator/`

docs/architecture/REPOSITORY_MAP.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ src/
180180
| `compliance/` | Audit log + provider audit — see `docs/security/COMPLIANCE.md` |
181181
| `compression/` | Compression engine glue (engines live in `open-sse/services/compression/`) |
182182
| `config/` | Runtime config helpers |
183-
| `db/` | 120+ domain DB modules + 167 migrations (always go through here for SQLite) |
183+
| `db/` | 120+ domain DB modules + 168 migrations (always go through here for SQLite) |
184184
| `quota/` | Quota Sharing Engine: `dimensions.ts` (types/Zod), `types.ts` (QuotaStore interface), `sqliteQuotaStore.ts`, `redisQuotaStore.ts`, `storeFactory.ts`, `fairShare.ts`, `burnRate.ts`, `planResolver.ts`, `planRegistry.ts`, `saturationSignals.ts`, `enforce.ts`, `spendRecorder.ts` — see `docs/routing/QUOTA_SHARE.md` |
185185
| `radar/` | Radar free-model catalog client: `feedSchema.ts`, `pinnedKeys.ts`, `verify.ts`, `sync.ts`, `applyFeed.ts`, `index.ts` (`getRadarCatalog()`) — see `docs/frameworks/RADAR.md` |
186186
| `display/` | UI formatting helpers (cost, latency, etc.) |
@@ -206,7 +206,7 @@ src/
206206
| `cacheLayer.ts`, `idempotencyLayer.ts` | Request caching + idempotency |
207207
| (~30 more top-level files) | Specialized helpers (logEnv, modelsDevSync, piiSanitizer, etc.) |
208208

209-
### `src/lib/db/` — Database (122 modules + 167 migrations)
209+
### `src/lib/db/` — Database (122 modules + 168 migrations)
210210

211211
| Subdir | Purpose |
212212
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -241,7 +241,7 @@ src/
241241

242242
| Module | Purpose |
243243
| -------------------------------- | ---------------------------------------------------------------------- |
244-
| `constants/providers.ts` | **352 providers** with Zod validation (source of truth) |
244+
| `constants/providers.ts` | **355 providers** with Zod validation (source of truth) |
245245
| `constants/cliTools.ts` | External CLI tool registry |
246246
| `constants/routingStrategies.ts` | **19 routing strategies** with priorities |
247247
| `constants/publicApiRoutes.ts` | Routes that require Bearer (vs management) auth |
@@ -398,7 +398,7 @@ open-sse/
398398
| `CLI-TOOLS.md` | External CLI integrations + Internal OmniRoute CLI |
399399
| `I18N.md` | i18n architecture, adding a language, 43 locales |
400400
| `UNINSTALL.md` | Clean uninstall steps |
401-
| `PROVIDER_REFERENCE.md` | **Auto-generated** catalog of 352 providers (regen: `npm run gen:provider-reference`) |
401+
| `PROVIDER_REFERENCE.md` | **Auto-generated** catalog of 355 providers (regen: `npm run gen:provider-reference`) |
402402

403403
### Subsystem deep-dives
404404

docs/diagrams/cli-terminal.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)