mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-06 07:12:12 +03:00
- Add collapsible '16 Real Pain Points' section to all 30 READMEs - Fix 5 files bypassing dataPaths.ts with hardcoded os.homedir() (closes #156) - Add per-provider User-Agent env var overrides in base executor (closes #155) - Sync .env and .env.example with 9 provider UA defaults - Update CHANGELOG.md for v1.7.0
1214 lines
51 KiB
Markdown
1214 lines
51 KiB
Markdown
<div align="center">
|
||
<img src="./docs/screenshots/MainOmniRoute.png" alt="OmniRoute Dashboard" width="800"/>
|
||
|
||
# 🚀 OmniRoute — Il Gateway IA Gratuito
|
||
|
||
### Non smettere mai di programmare. Routing intelligente verso **modelli IA GRATUITI e economici** con fallback automatico.
|
||
|
||
_Il tuo proxy API universale — un endpoint, 36+ provider, zero downtime._
|
||
|
||
**Chat Completions • Embeddings • Generazione Immagini • Audio • Reranking • 100% TypeScript**
|
||
|
||
---
|
||
|
||
### 🤖 Provider IA gratuito per i tuoi agenti di programmazione preferiti
|
||
|
||
_Connetti qualsiasi IDE o strumento CLI con IA tramite OmniRoute — gateway API gratuito per programmazione illimitata._
|
||
|
||
<table>
|
||
<tr>
|
||
<td align="center" width="110">
|
||
<a href="https://github.com/cline/cline">
|
||
<img src="./public/providers/openclaw.png" alt="OpenClaw" width="48"/><br/>
|
||
<b>OpenClaw</b>
|
||
</a><br/>
|
||
<sub>⭐ 205K</sub>
|
||
</td>
|
||
<td align="center" width="110">
|
||
<a href="https://github.com/HKUDS/nanobot">
|
||
<img src="./public/providers/nanobot.png" alt="NanoBot" width="48"/><br/>
|
||
<b>NanoBot</b>
|
||
</a><br/>
|
||
<sub>⭐ 20.9K</sub>
|
||
</td>
|
||
<td align="center" width="110">
|
||
<a href="https://github.com/sipeed/picoclaw">
|
||
<img src="./public/providers/picoclaw.jpg" alt="PicoClaw" width="48"/><br/>
|
||
<b>PicoClaw</b>
|
||
</a><br/>
|
||
<sub>⭐ 14.6K</sub>
|
||
</td>
|
||
<td align="center" width="110">
|
||
<a href="https://github.com/zeroclaw-labs/zeroclaw">
|
||
<img src="./public/providers/zeroclaw.png" alt="ZeroClaw" width="48"/><br/>
|
||
<b>ZeroClaw</b>
|
||
</a><br/>
|
||
<sub>⭐ 9.9K</sub>
|
||
</td>
|
||
<td align="center" width="110">
|
||
<a href="https://github.com/nearai/ironclaw">
|
||
<img src="./public/providers/ironclaw.png" alt="IronClaw" width="48"/><br/>
|
||
<b>IronClaw</b>
|
||
</a><br/>
|
||
<sub>⭐ 2.1K</sub>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center" width="110">
|
||
<a href="https://github.com/anomalyco/opencode">
|
||
<img src="./public/providers/opencode.svg" alt="OpenCode" width="48"/><br/>
|
||
<b>OpenCode</b>
|
||
</a><br/>
|
||
<sub>⭐ 106K</sub>
|
||
</td>
|
||
<td align="center" width="110">
|
||
<a href="https://github.com/openai/codex">
|
||
<img src="./public/providers/codex.png" alt="Codex CLI" width="48"/><br/>
|
||
<b>Codex CLI</b>
|
||
</a><br/>
|
||
<sub>⭐ 60.8K</sub>
|
||
</td>
|
||
<td align="center" width="110">
|
||
<a href="https://github.com/anthropics/claude-code">
|
||
<img src="./public/providers/claude.png" alt="Claude Code" width="48"/><br/>
|
||
<b>Claude Code</b>
|
||
</a><br/>
|
||
<sub>⭐ 67.3K</sub>
|
||
</td>
|
||
<td align="center" width="110">
|
||
<a href="https://github.com/google-gemini/gemini-cli">
|
||
<img src="./public/providers/gemini-cli.png" alt="Gemini CLI" width="48"/><br/>
|
||
<b>Gemini CLI</b>
|
||
</a><br/>
|
||
<sub>⭐ 94.7K</sub>
|
||
</td>
|
||
<td align="center" width="110">
|
||
<a href="https://github.com/Kilo-Org/kilocode">
|
||
<img src="./public/providers/kilocode.png" alt="Kilo Code" width="48"/><br/>
|
||
<b>Kilo Code</b>
|
||
</a><br/>
|
||
<sub>⭐ 15.5K</sub>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<sub>📡 Tutti gli agenti si connettono via <code>http://localhost:20128/v1</code> o <code>http://cloud.omniroute.online/v1</code> — una configurazione, modelli e quota illimitati</sub>
|
||
|
||
---
|
||
|
||
[](https://www.npmjs.com/package/omniroute)
|
||
[](https://hub.docker.com/r/diegosouzapw/omniroute)
|
||
[](https://github.com/diegosouzapw/OmniRoute/blob/main/LICENSE)
|
||
[](https://omniroute.online)
|
||
[](https://chat.whatsapp.com/JI7cDQ1GyaiDHhVBpLxf8b?mode=gi_t)
|
||
|
||
[🌐 Sito Web](https://omniroute.online) • [🚀 Avvio Rapido](#-avvio-rapido) • [💡 Funzionalità](#-funzionalità-principali) • [📖 Docs](#-documentazione) • [💰 Prezzi](#-panoramica-prezzi)
|
||
|
||
🌐 **Available in:** 🇺🇸 [English](README.md) | 🇧🇷 [Português (Brasil)](README.pt-BR.md) | 🇪🇸 [Español](README.es.md) | 🇫🇷 [Français](README.fr.md) | 🇮🇹 [Italiano](README.it.md) | 🇷🇺 [Русский](README.ru.md) | 🇨🇳 [中文 (简体)](README.zh-CN.md) | 🇩🇪 [Deutsch](README.de.md) | 🇮🇳 [हिन्दी](README.in.md) | 🇹🇭 [ไทย](README.th.md) | 🇺🇦 [Українська](README.uk-UA.md) | 🇸🇦 [العربية](README.ar.md) | 🇯🇵 [日本語](README.ja.md) | 🇻🇳 [Tiếng Việt](README.vi.md) | 🇧🇬 [Български](README.bg.md) | 🇩🇰 [Dansk](README.da.md) | 🇫🇮 [Suomi](README.fi.md) | 🇮🇱 [עברית](README.he.md) | 🇭🇺 [Magyar](README.hu.md) | 🇮🇩 [Bahasa Indonesia](README.id.md) | 🇰🇷 [한국어](README.ko.md) | 🇲🇾 [Bahasa Melayu](README.ms.md) | 🇳🇱 [Nederlands](README.nl.md) | 🇳🇴 [Norsk](README.no.md) | 🇵🇹 [Português (Portugal)](README.pt.md) | 🇷🇴 [Română](README.ro.md) | 🇵🇱 [Polski](README.pl.md) | 🇸🇰 [Slovenčina](README.sk.md) | 🇸🇪 [Svenska](README.sv.md) | 🇵🇭 [Filipino](README.phi.md)
|
||
|
||
</div>
|
||
|
||
---
|
||
|
||
## 🤔 Perché OmniRoute?
|
||
|
||
**Smetti di sprecare soldi e di sbattere contro i limiti:**
|
||
|
||
- <img src="https://img.shields.io/badge/✗-e74c3c?style=flat-square" height="16"/> La quota dell'abbonamento scade inutilizzata ogni mese
|
||
- <img src="https://img.shields.io/badge/✗-e74c3c?style=flat-square" height="16"/> I limiti di rate ti fermano nel mezzo della programmazione
|
||
- <img src="https://img.shields.io/badge/✗-e74c3c?style=flat-square" height="16"/> API costose ($20-50/mese per provider)
|
||
- <img src="https://img.shields.io/badge/✗-e74c3c?style=flat-square" height="16"/> Cambio manuale tra provider
|
||
|
||
**OmniRoute risolve tutto questo:**
|
||
|
||
- ✅ **Massimizza gli abbonamenti** — Traccia le quote, usa tutto prima del reset
|
||
- ✅ **Fallback automatico** — Abbonamento → API Key → Economico → Gratuito, zero downtime
|
||
- ✅ **Multi-account** — Round-robin tra account per provider
|
||
- ✅ **Universale** — Funziona con Claude Code, Codex, Gemini CLI, Cursor, Cline, OpenClaw, qualsiasi strumento CLI
|
||
|
||
---
|
||
|
||
## 🔄 Come Funziona
|
||
|
||
```
|
||
┌─────────────┐
|
||
│ Il tuo CLI │ (Claude Code, Codex, Gemini CLI, OpenClaw, Cursor, Cline...)
|
||
│ Tool │
|
||
└──────┬──────┘
|
||
│ http://localhost:20128/v1
|
||
↓
|
||
┌─────────────────────────────────────────┐
|
||
│ OmniRoute (Router Intelligente) │
|
||
│ • Traduzione formato (OpenAI ↔ Claude) │
|
||
│ • Tracciamento quote + Embeddings + Immagini │
|
||
│ • Rinnovo automatico dei token │
|
||
└──────┬──────────────────────────────────┘
|
||
│
|
||
├─→ [Tier 1: ABBONAMENTO] Claude Code, Codex, Gemini CLI
|
||
│ ↓ quota esaurita
|
||
├─→ [Tier 2: API KEY] DeepSeek, Groq, xAI, Mistral, NVIDIA NIM, ecc.
|
||
│ ↓ limite budget
|
||
├─→ [Tier 3: ECONOMICO] GLM ($0.6/1M), MiniMax ($0.2/1M)
|
||
│ ↓ limite budget
|
||
└─→ [Tier 4: GRATUITO] iFlow, Qwen, Kiro (illimitato)
|
||
|
||
Risultato: Non smettere mai di programmare, costo minimo
|
||
```
|
||
|
||
---
|
||
|
||
## 🎯 What OmniRoute Solves — 16 Real Pain Points
|
||
|
||
> **Every developer using AI tools faces these problems daily.** OmniRoute was built to solve them all — from cost overruns to regional blocks, from broken OAuth flows to zero observability.
|
||
|
||
<details>
|
||
<summary><b>💸 1. "I pay for an expensive subscription but still get interrupted by limits"</b></summary>
|
||
|
||
Developers pay $20–200/month for Claude Pro, Codex Pro, or GitHub Copilot. Even paying, quota has a ceiling — 5h of usage, weekly limits, or per-minute rate limits. Mid-coding session, the provider stops responding and the developer loses flow and productivity.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **Smart 4-Tier Fallback** — If subscription quota runs out, automatically redirects to API Key → Cheap → Free with zero manual intervention
|
||
- **Real-Time Quota Tracking** — Shows token consumption in real-time with reset countdown (5h, daily, weekly)
|
||
- **Multi-Account Support** — Multiple accounts per provider with auto round-robin — when one runs out, switches to the next
|
||
- **Custom Combos** — Customizable fallback chains with 6 balancing strategies (fill-first, round-robin, P2C, random, least-used, cost-optimized)
|
||
- **Codex Business Quotas** — Business/Team workspace quota monitoring directly in the dashboard
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🔌 2. "I need to use multiple providers but each has a different API"</b></summary>
|
||
|
||
OpenAI uses one format, Claude (Anthropic) uses another, Gemini yet another. If a dev wants to test models from different providers or fallback between them, they need to reconfigure SDKs, change endpoints, deal with incompatible formats. Custom providers (FriendLI, NIM) have non-standard model endpoints.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **Unified Endpoint** — A single `http://localhost:20128/v1` serves as proxy for all 36+ providers
|
||
- **Format Translation** — Automatic and transparent: OpenAI ↔ Claude ↔ Gemini ↔ Responses API
|
||
- **Response Sanitization** — Strips non-standard fields (`x_groq`, `usage_breakdown`, `service_tier`) that break OpenAI SDK v1.83+
|
||
- **Role Normalization** — Converts `developer` → `system` for non-OpenAI providers; `system` → `user` for GLM/ERNIE
|
||
- **Think Tag Extraction** — Extracts `<think>` blocks from models like DeepSeek R1 into standardized `reasoning_content`
|
||
- **Structured Output for Gemini** — `json_schema` → `responseMimeType`/`responseSchema` automatic conversion
|
||
- **`stream` defaults to `false`** — Aligns with OpenAI spec, avoiding unexpected SSE in Python/Rust/Go SDKs
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🌐 3. "My AI provider blocks my region/country"</b></summary>
|
||
|
||
Providers like OpenAI/Codex block access from certain geographic regions. Users get errors like `unsupported_country_region_territory` during OAuth and API connections. This is especially frustrating for developers from developing countries.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **3-Level Proxy Config** — Configurable proxy at 3 levels: global (all traffic), per-provider (one provider only), and per-connection/key
|
||
- **Color-Coded Proxy Badges** — Visual indicators: 🟢 global proxy, 🟡 provider proxy, 🔵 connection proxy, always showing the IP
|
||
- **OAuth Token Exchange Through Proxy** — OAuth flow also goes through the proxy, solving `unsupported_country_region_territory`
|
||
- **Connection Tests via Proxy** — Connection tests use the configured proxy (no more direct bypass)
|
||
- **SOCKS5 Support** — Full SOCKS5 proxy support for outbound routing
|
||
- **TLS Fingerprint Spoofing** — Browser-like TLS fingerprint via `wreq-js` to bypass bot detection
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🆓 4. "I want to use AI for coding but I have no money"</b></summary>
|
||
|
||
Not everyone can pay $20–200/month for AI subscriptions. Students, devs from emerging countries, hobbyists, and freelancers need access to quality models at zero cost.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **Free Tier Providers Built-in** — Native support for 100% free providers: iFlow (8 unlimited models), Qwen (3 unlimited models), Kiro (Claude for free), Gemini CLI (180K/month free)
|
||
- **Free-Only Combos** — Chain `gc/gemini-3-flash → if/kimi-k2-thinking → qw/qwen3-coder-plus` = $0/month with zero downtime
|
||
- **NVIDIA NIM Free Credits** — 1000 free credits integrated
|
||
- **Cost Optimized Strategy** — Routing strategy that automatically chooses the cheapest available provider
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🔒 5. "I need to protect my AI gateway from unauthorized access"</b></summary>
|
||
|
||
When exposing an AI gateway to the network (LAN, VPS, Docker), anyone with the address can consume the developer's tokens/quota. Without protection, APIs are vulnerable to misuse, prompt injection, and abuse.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **API Key Management** — Generation, rotation, and scoping per provider with a dedicated `/dashboard/api-manager` page
|
||
- **Model-Level Permissions** — Restrict API keys to specific models (`openai/*`, wildcard patterns), with Allow All/Restrict toggle
|
||
- **API Endpoint Protection** — Require a key for `/v1/models` and block specific providers from the listing
|
||
- **Auth Guard + CSRF Protection** — All dashboard routes protected with `withAuth` middleware + CSRF tokens
|
||
- **Rate Limiter** — Per-IP rate limiting with configurable windows
|
||
- **IP Filtering** — Allowlist/blocklist for access control
|
||
- **Prompt Injection Guard** — Sanitization against malicious prompt patterns
|
||
- **AES-256-GCM Encryption** — Credentials encrypted at rest
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🛑 6. "My provider went down and I lost my coding flow"</b></summary>
|
||
|
||
AI providers can become unstable, return 5xx errors, or hit temporary rate limits. If a dev depends on a single provider, they're interrupted. Without circuit breakers, repeated retries can crash the application.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **Circuit Breaker per-provider** — Auto-open/close with configurable thresholds and cooldown (Closed/Open/Half-Open)
|
||
- **Exponential Backoff** — Progressive retry delays
|
||
- **Anti-Thundering Herd** — Mutex + semaphore protection against concurrent retry storms
|
||
- **Combo Fallback Chains** — If the primary provider fails, automatically falls through the chain with no intervention
|
||
- **Combo Circuit Breaker** — Auto-disables failing providers within a combo chain
|
||
- **Health Dashboard** — Uptime monitoring, circuit breaker states, lockouts, cache stats, p50/p95/p99 latency
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🔧 7. "Configuring each AI tool is tedious and repetitive"</b></summary>
|
||
|
||
Developers use Cursor, Claude Code, Codex CLI, OpenClaw, Gemini CLI, Kilo Code... Each tool needs a different config (API endpoint, key, model). Reconfiguring when switching providers or models is a waste of time.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **CLI Tools Dashboard** — Dedicated page with one-click setup for Claude Code, Codex CLI, OpenClaw, Kilo Code, Antigravity, Cline
|
||
- **GitHub Copilot Config Generator** — Generates `chatLanguageModels.json` for VS Code with bulk model selection
|
||
- **Onboarding Wizard** — Guided 4-step setup for first-time users
|
||
- **One endpoint, all models** — Configure `http://localhost:20128/v1` once, access 36+ providers
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🔑 8. "Managing OAuth tokens from multiple providers is hell"</b></summary>
|
||
|
||
Claude Code, Codex, Gemini CLI, Copilot — all use OAuth 2.0 with expiring tokens. Developers need to re-authenticate constantly, deal with `client_secret is missing`, `redirect_uri_mismatch`, and failures on remote servers. OAuth on LAN/VPS is particularly problematic.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **Auto Token Refresh** — OAuth tokens refresh in background before expiration
|
||
- **OAuth 2.0 (PKCE) Built-in** — Automatic flow for Claude Code, Codex, Gemini CLI, Copilot, Kiro, Qwen, iFlow
|
||
- **Multi-Account OAuth** — Multiple accounts per provider via JWT/ID token extraction
|
||
- **OAuth LAN/Remote Fix** — Private IP detection for `redirect_uri` + manual URL mode for remote servers
|
||
- **OAuth Behind Nginx** — Uses `window.location.origin` for reverse proxy compatibility
|
||
- **Remote OAuth Guide** — Step-by-step guide for Google Cloud credentials on VPS/Docker
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>📊 9. "I don't know how much I'm spending or where"</b></summary>
|
||
|
||
Developers use multiple paid providers but have no unified view of spending. Each provider has its own billing dashboard, but there's no consolidated view. Unexpected costs can pile up.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **Cost Analytics Dashboard** — Per-token cost tracking and budget management per provider
|
||
- **Budget Limits per Tier** — Spending ceiling per tier that triggers automatic fallback
|
||
- **Per-Model Pricing Configuration** — Configurable prices per model
|
||
- **Usage Statistics Per API Key** — Request count and last-used timestamp per key
|
||
- **Analytics Dashboard** — Stat cards, model usage chart, provider table with success rates and latency
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🐛 10. "I can't diagnose errors and problems in AI calls"</b></summary>
|
||
|
||
When a call fails, the dev doesn't know if it was a rate limit, expired token, wrong format, or provider error. Fragmented logs across different terminals. Without observability, debugging is trial-and-error.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **Unified Logs Dashboard** — 4 tabs: Request Logs, Proxy Logs, Audit Logs, Console
|
||
- **Console Log Viewer** — Real-time terminal-style viewer with color-coded levels, auto-scroll, search, filter
|
||
- **SQLite Proxy Logs** — Persistent logs that survive server restarts
|
||
- **Translator Playground** — 4 debugging modes: Playground (format translation), Chat Tester (round-trip), Test Bench (batch), Live Monitor (real-time)
|
||
- **Request Telemetry** — p50/p95/p99 latency + X-Request-Id tracing
|
||
- **File-Based Logging with Rotation** — Console interceptor captures everything to JSON log with size-based rotation
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🏗️ 11. "Deploying and maintaining the gateway is complex"</b></summary>
|
||
|
||
Installing, configuring, and maintaining an AI proxy across different environments (local, VPS, Docker, cloud) is labor-intensive. Problems like hardcoded paths, `EACCES` on directories, port conflicts, and cross-platform builds add friction.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **npm global install** — `npm install -g omniroute && omniroute` — done
|
||
- **Docker Multi-Platform** — AMD64 + ARM64 native (Apple Silicon, AWS Graviton, Raspberry Pi)
|
||
- **Docker Compose Profiles** — `base` (no CLI tools) and `cli` (with Claude Code, Codex, OpenClaw)
|
||
- **Electron Desktop App** — Native app for Windows/macOS/Linux with system tray, auto-start, offline mode
|
||
- **Split-Port Mode** — API and Dashboard on separate ports for advanced scenarios (reverse proxy, container networking)
|
||
- **Cloud Sync** — Config synchronization across devices via Cloudflare Workers
|
||
- **DB Backups** — Automatic backup, restore, export and import of all settings
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🌍 12. "The interface is English-only and my team doesn't speak English"</b></summary>
|
||
|
||
Teams in non-English-speaking countries, especially in Latin America, Asia, and Europe, struggle with English-only interfaces. Language barriers reduce adoption and increase configuration errors.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **Dashboard i18n — 30 Languages** — All 500+ keys translated including Arabic, Bulgarian, Danish, German, Spanish, Finnish, French, Hebrew, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean, Malay, Dutch, Norwegian, Polish, Portuguese (PT/BR), Romanian, Russian, Slovak, Swedish, Thai, Ukrainian, Vietnamese, Chinese, Filipino, English
|
||
- **RTL Support** — Right-to-left support for Arabic and Hebrew
|
||
- **Multi-Language READMEs** — 30 complete documentation translations
|
||
- **Language Selector** — Globe icon in header for real-time switching
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🔄 13. "I need more than chat — I need embeddings, images, audio"</b></summary>
|
||
|
||
AI isn't just chat completion. Devs need to generate images, transcribe audio, create embeddings for RAG, rerank documents, and moderate content. Each API has a different endpoint and format.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **Embeddings** — `/v1/embeddings` with 6 providers and 9+ models
|
||
- **Image Generation** — `/v1/images/generations` with 4 providers and 9+ models
|
||
- **Audio Transcription** — `/v1/audio/transcriptions` — Whisper-compatible
|
||
- **Text-to-Speech** — `/v1/audio/speech` — Multi-provider audio synthesis
|
||
- **Moderations** — `/v1/moderations` — Content safety checks
|
||
- **Reranking** — `/v1/rerank` — Document relevance reranking
|
||
- **Responses API** — Full `/v1/responses` support for Codex
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🧪 14. "I have no way to test and compare quality across models"</b></summary>
|
||
|
||
Developers want to know which model is best for their use case — code, translation, reasoning — but comparing manually is slow. No integrated eval tools exist.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **LLM Evaluations** — Golden set testing with 10 pre-loaded cases covering greetings, math, geography, code generation, JSON compliance, translation, markdown, safety refusal
|
||
- **4 Match Strategies** — `exact`, `contains`, `regex`, `custom` (JS function)
|
||
- **Translator Playground Test Bench** — Batch testing with multiple inputs and expected outputs, cross-provider comparison
|
||
- **Chat Tester** — Full round-trip with visual response rendering
|
||
- **Live Monitor** — Real-time stream of all requests flowing through the proxy
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>📈 15. "I need to scale without losing performance"</b></summary>
|
||
|
||
As request volume grows, without caching the same questions generate duplicate costs. Without idempotency, duplicate requests waste processing. Per-provider rate limits must be respected.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **Semantic Cache** — Two-tier cache (signature + semantic) reduces cost and latency
|
||
- **Request Idempotency** — 5s deduplication window for identical requests
|
||
- **Rate Limit Detection** — Per-provider RPM, min gap, and max concurrent tracking
|
||
- **Editable Rate Limits** — Configurable defaults in Settings → Resilience with persistence
|
||
- **API Key Validation Cache** — 3-tier cache for production performance
|
||
- **Health Dashboard with Telemetry** — p50/p95/p99 latency, cache stats, uptime
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🤖 16. "I want to control model behavior globally"</b></summary>
|
||
|
||
Developers who want all responses in a specific language, with a specific tone, or want to limit reasoning tokens. Configuring this in every tool/request is impractical.
|
||
|
||
**How OmniRoute solves it:**
|
||
|
||
- **System Prompt Injection** — Global prompt applied to all requests
|
||
- **Thinking Budget Validation** — Reasoning token allocation control per request (passthrough, auto, custom, adaptive)
|
||
- **6 Routing Strategies** — Global strategies that determine how requests are distributed
|
||
- **Wildcard Router** — `provider/*` patterns route dynamically to any provider
|
||
- **Combo Enable/Disable Toggle** — Toggle combos directly from the dashboard
|
||
- **Provider Toggle** — Enable/disable all connections for a provider with one click
|
||
- **Blocked Providers** — Exclude specific providers from `/v1/models` listing
|
||
|
||
</details>
|
||
|
||
## ⚡ Avvio Rapido
|
||
|
||
**1. Installa globalmente:**
|
||
|
||
```bash
|
||
npm install -g omniroute
|
||
omniroute
|
||
```
|
||
|
||
🎉 La Dashboard si apre su `http://localhost:20128`
|
||
|
||
| Comando | Descrizione |
|
||
| ----------------------- | ------------------------------------------- |
|
||
| `omniroute` | Avviare il server (porta predefinita 20128) |
|
||
| `omniroute --port 3000` | Usare una porta personalizzata |
|
||
| `omniroute --no-open` | Non aprire il browser automaticamente |
|
||
| `omniroute --help` | Mostrare l'aiuto |
|
||
|
||
**2. Connetti un provider GRATUITO:**
|
||
|
||
Dashboard → Provider → Connetti **Claude Code** o **Antigravity** → Login OAuth → Fatto!
|
||
|
||
**3. Usa nel tuo strumento CLI:**
|
||
|
||
```
|
||
Claude Code/Codex/Gemini CLI/OpenClaw/Cursor/Cline Impostazioni:
|
||
Endpoint: http://localhost:20128/v1
|
||
API Key: [copia dalla dashboard]
|
||
Model: if/kimi-k2-thinking
|
||
```
|
||
|
||
**Tutto qui!** Inizia a programmare con modelli IA GRATUITI.
|
||
|
||
**Alternativa — eseguire dal codice sorgente:**
|
||
|
||
```bash
|
||
cp .env.example .env
|
||
npm install
|
||
PORT=20128 NEXT_PUBLIC_BASE_URL=http://localhost:20128 npm run dev
|
||
```
|
||
|
||
---
|
||
|
||
## 🐳 Docker
|
||
|
||
OmniRoute è disponibile come immagine Docker pubblica su [Docker Hub](https://hub.docker.com/r/diegosouzapw/omniroute).
|
||
|
||
**Avvio rapido:**
|
||
|
||
```bash
|
||
docker run -d \
|
||
--name omniroute \
|
||
--restart unless-stopped \
|
||
-p 20128:20128 \
|
||
-v omniroute-data:/app/data \
|
||
diegosouzapw/omniroute:latest
|
||
```
|
||
|
||
**Con file di ambiente:**
|
||
|
||
```bash
|
||
# Copia e modifica il .env prima
|
||
cp .env.example .env
|
||
|
||
docker run -d \
|
||
--name omniroute \
|
||
--restart unless-stopped \
|
||
--env-file .env \
|
||
-p 20128:20128 \
|
||
-v omniroute-data:/app/data \
|
||
diegosouzapw/omniroute:latest
|
||
```
|
||
|
||
**Con Docker Compose:**
|
||
|
||
```bash
|
||
# Profilo base (senza strumenti CLI)
|
||
docker compose --profile base up -d
|
||
|
||
# Profilo CLI (Claude Code, Codex, OpenClaw integrati)
|
||
docker compose --profile cli up -d
|
||
```
|
||
|
||
| Immagine | Tag | Dimensione | Descrizione |
|
||
| ------------------------ | -------- | ---------- | ----------------------- |
|
||
| `diegosouzapw/omniroute` | `latest` | ~250MB | Ultima versione stabile |
|
||
| `diegosouzapw/omniroute` | `1.0.6` | ~250MB | Versione attuale |
|
||
|
||
---
|
||
|
||
---
|
||
|
||
## 🖥️ Desktop App — Offline & Always-On
|
||
|
||
> 🆕 **NEW!** OmniRoute is now available as a **native desktop application** for Windows, macOS, and Linux.
|
||
|
||
- 🖥️ **Native Window** — Dedicated app window with system tray integration
|
||
- 🔄 **Auto-Start** — Launch OmniRoute on system login
|
||
- 🔔 **Native Notifications** — Get alerts for quota exhaustion or provider issues
|
||
- ⚡ **One-Click Install** — NSIS (Windows), DMG (macOS), AppImage (Linux)
|
||
- 🌐 **Offline Mode** — Works fully offline with bundled server
|
||
|
||
```bash
|
||
npm run electron:dev # Development mode
|
||
npm run electron:build # Current platform
|
||
npm run electron:build:win # Windows (.exe)
|
||
npm run electron:build:mac # macOS (.dmg)
|
||
npm run electron:build:linux # Linux (.AppImage)
|
||
```
|
||
|
||
📖 Full documentation: [`electron/README.md`](electron/README.md)
|
||
|
||
---
|
||
|
||
## 💰 Panoramica Prezzi
|
||
|
||
| Tier | Provider | Costo | Reset Quota | Ideale Per |
|
||
| ------------------ | ----------------- | ---------------------------- | --------------------- | ------------------------------- |
|
||
| **💳 ABBONAMENTO** | Claude Code (Pro) | $20/mese | 5h + settimanale | Già abbonato |
|
||
| | Codex (Plus/Pro) | $20-200/mese | 5h + settimanale | Utenti OpenAI |
|
||
| | Gemini CLI | **GRATUITO** | 180K/mese + 1K/giorno | Tutti! |
|
||
| | GitHub Copilot | $10-19/mese | Mensile | Utenti GitHub |
|
||
| **🔑 API KEY** | NVIDIA NIM | **GRATUITO** (1000 crediti) | Una tantum | Test gratuiti |
|
||
| | DeepSeek | A consumo | Nessuno | Miglior rapporto qualità-prezzo |
|
||
| | Groq | Livello gratis + a pagamento | Limitato | Inferenza ultra-veloce |
|
||
| | xAI (Grok) | A consumo | Nessuno | Modelli Grok |
|
||
| | Mistral | Livello gratis + a pagamento | Limitato | IA Europea |
|
||
| | OpenRouter | A consumo | Nessuno | 100+ modelli |
|
||
| **💰 ECONOMICO** | GLM-4.7 | $0.6/1M | Giornaliero 10h | Backup economico |
|
||
| | MiniMax M2.1 | $0.2/1M | Rotativo 5h | Opzione più economica |
|
||
| | Kimi K2 | $9/mese fisso | 10M token/mese | Costo prevedibile |
|
||
| **🆓 GRATUITO** | iFlow | $0 | Illimitato | 8 modelli gratuiti |
|
||
| | Qwen | $0 | Illimitato | 3 modelli gratuiti |
|
||
| | Kiro | $0 | Illimitato | Claude gratuito |
|
||
|
||
**💡 Consiglio Pro:** Inizia con Gemini CLI (180K gratis/mese) + iFlow (illimitato gratis) = $0 di costo!
|
||
|
||
---
|
||
|
||
## 💡 Funzionalità Principali
|
||
|
||
### 🧠 Routing & Intelligenza
|
||
|
||
| Funzionalità | Cosa Fa |
|
||
| ---------------------------------------- | ----------------------------------------------------------------------------- |
|
||
| 🎯 **Fallback intelligente 4 livelli** | Auto-routing: Abbonamento → API Key → Economico → Gratuito |
|
||
| 📊 **Tracciamento quote in tempo reale** | Conteggio token live + countdown reset per provider |
|
||
| 🔄 **Traduzione di formato** | OpenAI ↔ Claude ↔ Gemini ↔ Cursor ↔ Kiro trasparente |
|
||
| 👥 **Supporto multi-account** | Account multipli per provider con selezione intelligente |
|
||
| 🔄 **Rinnovo automatico dei token** | I token OAuth si rinnovano automaticamente con retry |
|
||
| 🎨 **Combo personalizzati** | 6 strategie: fill-first, round-robin, p2c, random, least-used, cost-optimized |
|
||
| 🧩 **Modelli personalizzati** | Aggiungi qualsiasi ID modello a qualsiasi provider |
|
||
| 🌐 **Router wildcard** | Instrada pattern `provider/*` verso qualsiasi provider dinamicamente |
|
||
| 🧠 **Budget di ragionamento** | Modalità passthrough, auto, custom e adaptive per modelli di ragionamento |
|
||
| 💬 **Iniezione System Prompt** | System prompt globale applicato a tutte le richieste |
|
||
| 📄 **API Responses** | Supporto completo per OpenAI Responses API (`/v1/responses`) per Codex |
|
||
|
||
### 🎵 API Multi-modali
|
||
|
||
| Funzionalità | Cosa Fa |
|
||
| --------------------------- | ---------------------------------------------------- |
|
||
| 🖼️ **Generazione immagini** | `/v1/images/generations` — 4 provider, 9+ modelli |
|
||
| 📐 **Embeddings** | `/v1/embeddings` — 6 provider, 9+ modelli |
|
||
| 🎤 **Trascrizione audio** | `/v1/audio/transcriptions` — Compatibile Whisper |
|
||
| 🔊 **Testo a voce** | `/v1/audio/speech` — Sintesi audio multi-provider |
|
||
| 🛡️ **Moderazioni** | `/v1/moderations` — Controlli di sicurezza |
|
||
| 🔀 **Reranking** | `/v1/rerank` — Riclassificazione rilevanza documenti |
|
||
|
||
### 🛡️ Resilienza & Sicurezza
|
||
|
||
| Funzionalità | Cosa Fa |
|
||
| ------------------------------- | -------------------------------------------------------------- |
|
||
| 🔌 **Circuit Breaker** | Apertura/chiusura auto per provider con soglie configurabili |
|
||
| 🛡️ **Anti-Thundering Herd** | Mutex + semaforo rate-limit per provider con API key |
|
||
| 🧠 **Cache semantica** | Cache a due livelli (firma + semantica) riduce costi e latenza |
|
||
| ⚡ **Idempotenza richieste** | Finestra dedup 5s per richieste duplicate |
|
||
| 🔒 **Spoofing TLS Fingerprint** | Bypass rilevamento bot tramite wreq-js |
|
||
| 🌐 **Filtro IP** | Allowlist/blocklist per controllo accesso API |
|
||
| 📊 **Rate limit modificabili** | RPM, gap minimo e concorrenza massima configurabili |
|
||
|
||
### 📊 Osservabilità & Analytics
|
||
|
||
| Funzionalità | Cosa Fa |
|
||
| ----------------------------- | ------------------------------------------------------------ |
|
||
| 📝 **Log richieste** | Modalità debug con log completi richiesta/risposta |
|
||
| 💾 **Log SQLite** | Log proxy persistenti che sopravvivono ai riavvii |
|
||
| 📊 **Dashboard analytics** | Recharts: card statistiche, grafico uso, tabella provider |
|
||
| 📈 **Tracciamento progresso** | Eventi SSE di progresso opt-in per lo streaming |
|
||
| 🧪 **Valutazioni LLM** | Test con golden set e 4 strategie di corrispondenza |
|
||
| 🔍 **Telemetria richieste** | Aggregazione latenza p50/p95/p99 + tracciamento X-Request-Id |
|
||
| 📋 **Log + Quote** | Pagine dedicate per navigazione log e tracciamento quote |
|
||
| 🏥 **Dashboard salute** | Uptime, stati circuit breaker, lockout, statistiche cache |
|
||
| 💰 **Tracciamento costi** | Gestione budget + configurazione prezzi per modello |
|
||
|
||
### ☁️ Deploy & Sincronizzazione
|
||
|
||
| Funzionalità | Cosa Fa |
|
||
| -------------------------------- | -------------------------------------------------------------------------------- |
|
||
| 💾 **Cloud Sync** | Sincronizza impostazioni tra dispositivi via Cloudflare Workers |
|
||
| 🌐 **Deploy ovunque** | Localhost, VPS, Docker, Cloudflare Workers |
|
||
| 🔑 **Gestione API Key** | Genera, ruota e limita API key per provider |
|
||
| 🧙 **Assistente configurazione** | Setup guidato in 4 passaggi per nuovi utenti |
|
||
| 🔧 **Dashboard CLI Tools** | Configurazione con un clic per Claude, Codex, Cline, OpenClaw, Kilo, Antigravity |
|
||
| 🔄 **Backup DB** | Backup e ripristino automatici di tutte le impostazioni |
|
||
|
||
<details>
|
||
<summary><b>📖 Dettagli funzionalità</b></summary>
|
||
|
||
### 🎯 Fallback intelligente 4 livelli
|
||
|
||
Crea combo con fallback automatico:
|
||
|
||
```
|
||
Combo: "my-coding-stack"
|
||
1. cc/claude-opus-4-6 (il tuo abbonamento)
|
||
2. nvidia/llama-3.3-70b (API NVIDIA gratuita)
|
||
3. glm/glm-4.7 (backup economico, $0.6/1M)
|
||
4. if/kimi-k2-thinking (fallback gratuito)
|
||
|
||
→ Cambia automaticamente quando la quota si esaurisce o si verificano errori
|
||
```
|
||
|
||
### 📊 Tracciamento quote in tempo reale
|
||
|
||
- Consumo token per provider
|
||
- Countdown reset (5 ore, giornaliero, settimanale)
|
||
- Stima dei costi per livelli a pagamento
|
||
- Report spese mensili
|
||
|
||
### 🔄 Traduzione di formato
|
||
|
||
Traduzione trasparente tra formati:
|
||
|
||
- **OpenAI** ↔ **Claude** ↔ **Gemini** ↔ **OpenAI Responses**
|
||
- Il tuo CLI invia in formato OpenAI → OmniRoute traduce → Il provider riceve il formato nativo
|
||
- Funziona con qualsiasi strumento che supporti endpoint OpenAI personalizzati
|
||
|
||
### 👥 Supporto multi-account
|
||
|
||
- Aggiungi account multipli per provider
|
||
- Round-robin automatico o routing per priorità
|
||
- Fallback all'account successivo quando la quota viene raggiunta
|
||
|
||
### 🔄 Rinnovo automatico dei token
|
||
|
||
- I token OAuth si rinnovano automaticamente prima della scadenza
|
||
- Nessuna necessità di ri-autenticazione manuale
|
||
- Esperienza trasparente su tutti i provider
|
||
|
||
### 🎨 Combo personalizzati
|
||
|
||
- Crea combinazioni di modelli illimitate
|
||
- 6 strategie: fill-first, round-robin, power-of-two-choices, random, least-used, cost-optimized
|
||
- Condividi combo tra dispositivi con Cloud Sync
|
||
|
||
### 🏥 Dashboard salute
|
||
|
||
- Stato del sistema (uptime, versione, utilizzo memoria)
|
||
- Stati circuit breaker per provider (Closed/Open/Half-Open)
|
||
- Stato rate limit e lockout attivi
|
||
- Statistiche cache firme
|
||
- Telemetria latenza (p50/p95/p99) + cache prompt
|
||
- Reset salute con un clic
|
||
|
||
### 🔧 Playground del traduttore
|
||
|
||
- Debug, test e visualizzazione delle traduzioni di formato API
|
||
- Invia richieste e vedi come OmniRoute traduce tra formati dei provider
|
||
- Inestimabile per risolvere problemi di integrazione
|
||
|
||
### 💾 Cloud Sync
|
||
|
||
- Sincronizza provider, combo e impostazioni tra dispositivi
|
||
- Sincronizzazione in background automatica
|
||
- Archiviazione criptata sicura
|
||
|
||
</details>
|
||
|
||
---
|
||
|
||
## 🎯 Casi d'Uso
|
||
|
||
### Caso 1: "Ho un abbonamento Claude Pro"
|
||
|
||
**Problema:** La quota scade inutilizzata, limiti di rate durante la programmazione intensa
|
||
|
||
```
|
||
Combo: "maximize-claude"
|
||
1. cc/claude-opus-4-6 (usa l'abbonamento al massimo)
|
||
2. glm/glm-4.7 (backup economico quando la quota è esaurita)
|
||
3. if/kimi-k2-thinking (fallback d'emergenza gratuito)
|
||
|
||
Costo mensile: $20 (abbonamento) + ~$5 (backup) = $25 totale
|
||
vs. $20 + sbattere contro i limiti = frustrazione
|
||
```
|
||
|
||
### Caso 2: "Voglio costo zero"
|
||
|
||
**Problema:** Non può permettersi abbonamenti, ha bisogno di IA affidabile per programmare
|
||
|
||
```
|
||
Combo: "free-forever"
|
||
1. gc/gemini-3-flash (180K gratis/mese)
|
||
2. if/kimi-k2-thinking (illimitato gratis)
|
||
3. qw/qwen3-coder-plus (illimitato gratis)
|
||
|
||
Costo mensile: $0
|
||
Qualità: Modelli pronti per la produzione
|
||
```
|
||
|
||
### Caso 3: "Devo programmare 24/7, senza interruzioni"
|
||
|
||
**Problema:** Scadenze strette, non può permettersi downtime
|
||
|
||
```
|
||
Combo: "always-on"
|
||
1. cc/claude-opus-4-6 (migliore qualità)
|
||
2. cx/gpt-5.2-codex (secondo abbonamento)
|
||
3. glm/glm-4.7 (economico, reset giornaliero)
|
||
4. minimax/MiniMax-M2.1 (più economico, reset 5h)
|
||
5. if/kimi-k2-thinking (gratuito illimitato)
|
||
|
||
Risultato: 5 livelli di fallback = zero downtime
|
||
```
|
||
|
||
### Caso 4: "Voglio IA GRATUITA in OpenClaw"
|
||
|
||
**Problema:** Ha bisogno di assistente IA nelle app di messaggistica, completamente gratuito
|
||
|
||
```
|
||
Combo: "openclaw-free"
|
||
1. if/glm-4.7 (illimitato gratis)
|
||
2. if/minimax-m2.1 (illimitato gratis)
|
||
3. if/kimi-k2-thinking (illimitato gratis)
|
||
|
||
Costo mensile: $0
|
||
Accesso via: WhatsApp, Telegram, Slack, Discord, iMessage, Signal...
|
||
```
|
||
|
||
---
|
||
|
||
## 📖 Guida alla Configurazione
|
||
|
||
<details>
|
||
<summary><b>💳 Provider per abbonamento</b></summary>
|
||
|
||
### Claude Code (Pro/Max)
|
||
|
||
```bash
|
||
Dashboard → Provider → Connetti Claude Code
|
||
→ Login OAuth → Rinnovo automatico token
|
||
→ Tracciamento quota 5h + settimanale
|
||
|
||
Modelli:
|
||
cc/claude-opus-4-6
|
||
cc/claude-sonnet-4-5-20250929
|
||
cc/claude-haiku-4-5-20251001
|
||
```
|
||
|
||
**Consiglio Pro:** Usa Opus per compiti complessi, Sonnet per velocità. OmniRoute traccia la quota per modello!
|
||
|
||
### OpenAI Codex (Plus/Pro)
|
||
|
||
```bash
|
||
Dashboard → Provider → Connetti Codex
|
||
→ Login OAuth (porta 1455)
|
||
→ Reset 5h + settimanale
|
||
|
||
Modelli:
|
||
cx/gpt-5.2-codex
|
||
cx/gpt-5.1-codex-max
|
||
```
|
||
|
||
### Gemini CLI (GRATUITO 180K/mese!)
|
||
|
||
```bash
|
||
Dashboard → Provider → Connetti Gemini CLI
|
||
→ Google OAuth
|
||
→ 180K completions/mese + 1K/giorno
|
||
|
||
Modelli:
|
||
gc/gemini-3-flash-preview
|
||
gc/gemini-2.5-pro
|
||
```
|
||
|
||
**Miglior valore:** Livello gratuito enorme! Usa prima dei livelli a pagamento.
|
||
|
||
### GitHub Copilot
|
||
|
||
```bash
|
||
Dashboard → Provider → Connetti GitHub
|
||
→ OAuth via GitHub
|
||
→ Reset mensile (1° del mese)
|
||
|
||
Modelli:
|
||
gh/gpt-5
|
||
gh/claude-4.5-sonnet
|
||
gh/gemini-3-pro
|
||
```
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🔑 Provider per API Key</b></summary>
|
||
|
||
### NVIDIA NIM (GRATUITO 1000 crediti!)
|
||
|
||
1. Registrati: [build.nvidia.com](https://build.nvidia.com)
|
||
2. Ottieni una API key gratuita (1000 crediti di inferenza inclusi)
|
||
3. Dashboard → Aggiungi Provider → NVIDIA NIM:
|
||
- API Key: `nvapi-your-key`
|
||
|
||
**Modelli:** `nvidia/llama-3.3-70b-instruct`, `nvidia/mistral-7b-instruct` e 50+ altri
|
||
|
||
**Consiglio Pro:** API compatibile OpenAI — funziona perfettamente con la traduzione di formato di OmniRoute!
|
||
|
||
### DeepSeek
|
||
|
||
1. Registrati: [platform.deepseek.com](https://platform.deepseek.com)
|
||
2. Ottieni una API key
|
||
3. Dashboard → Aggiungi Provider → DeepSeek
|
||
|
||
**Modelli:** `deepseek/deepseek-chat`, `deepseek/deepseek-coder`
|
||
|
||
### Groq (Livello gratuito disponibile!)
|
||
|
||
1. Registrati: [console.groq.com](https://console.groq.com)
|
||
2. Ottieni una API key (livello gratuito incluso)
|
||
3. Dashboard → Aggiungi Provider → Groq
|
||
|
||
**Modelli:** `groq/llama-3.3-70b`, `groq/mixtral-8x7b`
|
||
|
||
**Consiglio Pro:** Inferenza ultra-veloce — ideale per programmazione in tempo reale!
|
||
|
||
### OpenRouter (100+ modelli)
|
||
|
||
1. Registrati: [openrouter.ai](https://openrouter.ai)
|
||
2. Ottieni una API key
|
||
3. Dashboard → Aggiungi Provider → OpenRouter
|
||
|
||
**Modelli:** Accesso a 100+ modelli da tutti i principali provider tramite una singola API key.
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>💰 Provider economici (Backup)</b></summary>
|
||
|
||
### GLM-4.7 (Reset giornaliero, $0.6/1M)
|
||
|
||
1. Registrati: [Zhipu AI](https://open.bigmodel.cn/)
|
||
2. Ottieni la API key dal Coding Plan
|
||
3. Dashboard → Aggiungi API Key:
|
||
- Provider: `glm`
|
||
- API Key: `your-key`
|
||
|
||
**Usa:** `glm/glm-4.7`
|
||
|
||
**Consiglio Pro:** Il Coding Plan offre 3× quota a 1/7 del costo! Reset giornaliero alle 10:00.
|
||
|
||
### MiniMax M2.1 (Reset 5h, $0.20/1M)
|
||
|
||
1. Registrati: [MiniMax](https://www.minimax.io/)
|
||
2. Ottieni una API key
|
||
3. Dashboard → Aggiungi API Key
|
||
|
||
**Usa:** `minimax/MiniMax-M2.1`
|
||
|
||
**Consiglio Pro:** L'opzione più economica per contesto lungo (1M token)!
|
||
|
||
### Kimi K2 ($9/mese fisso)
|
||
|
||
1. Abbonati: [Moonshot AI](https://platform.moonshot.ai/)
|
||
2. Ottieni una API key
|
||
3. Dashboard → Aggiungi API Key
|
||
|
||
**Usa:** `kimi/kimi-latest`
|
||
|
||
**Consiglio Pro:** $9/mese fisso per 10M token = $0.90/1M di costo effettivo!
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🆓 Provider GRATUITI (Backup d'emergenza)</b></summary>
|
||
|
||
### iFlow (8 modelli GRATUITI)
|
||
|
||
```bash
|
||
Dashboard → Connetti iFlow
|
||
→ Login OAuth iFlow
|
||
→ Utilizzo illimitato
|
||
|
||
Modelli:
|
||
if/kimi-k2-thinking
|
||
if/qwen3-coder-plus
|
||
if/glm-4.7
|
||
if/minimax-m2
|
||
if/deepseek-r1
|
||
```
|
||
|
||
### Qwen (3 modelli GRATUITI)
|
||
|
||
```bash
|
||
Dashboard → Connetti Qwen
|
||
→ Autorizzazione con codice dispositivo
|
||
→ Utilizzo illimitato
|
||
|
||
Modelli:
|
||
qw/qwen3-coder-plus
|
||
qw/qwen3-coder-flash
|
||
```
|
||
|
||
### Kiro (Claude GRATUITO)
|
||
|
||
```bash
|
||
Dashboard → Connetti Kiro
|
||
→ AWS Builder ID o Google/GitHub
|
||
→ Utilizzo illimitato
|
||
|
||
Modelli:
|
||
kr/claude-sonnet-4.5
|
||
kr/claude-haiku-4.5
|
||
```
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🎨 Creare combo</b></summary>
|
||
|
||
### Esempio 1: Massimizzare abbonamento → Backup economico
|
||
|
||
```
|
||
Dashboard → Combo → Crea nuovo
|
||
|
||
Nome: premium-coding
|
||
Modelli:
|
||
1. cc/claude-opus-4-6 (Abbonamento principale)
|
||
2. glm/glm-4.7 (Backup economico, $0.6/1M)
|
||
3. minimax/MiniMax-M2.1 (Fallback più economico, $0.20/1M)
|
||
|
||
Usa nel CLI: premium-coding
|
||
```
|
||
|
||
### Esempio 2: Solo gratuiti (Costo zero)
|
||
|
||
```
|
||
Nome: free-combo
|
||
Modelli:
|
||
1. gc/gemini-3-flash-preview (180K gratis/mese)
|
||
2. if/kimi-k2-thinking (illimitato)
|
||
3. qw/qwen3-coder-plus (illimitato)
|
||
|
||
Costo: $0 per sempre!
|
||
```
|
||
|
||
</details>
|
||
|
||
<details>
|
||
<summary><b>🔧 Integrazione CLI</b></summary>
|
||
|
||
### Cursor IDE
|
||
|
||
```
|
||
Impostazioni → Modelli → Avanzato:
|
||
OpenAI API Base URL: http://localhost:20128/v1
|
||
OpenAI API Key: [dalla dashboard OmniRoute]
|
||
Model: cc/claude-opus-4-6
|
||
```
|
||
|
||
### Claude Code
|
||
|
||
Usa la pagina **CLI Tools** nella dashboard per la configurazione con un clic, o modifica `~/.claude/settings.json` manualmente.
|
||
|
||
### Codex CLI
|
||
|
||
```bash
|
||
export OPENAI_BASE_URL="http://localhost:20128"
|
||
export OPENAI_API_KEY="your-omniroute-api-key"
|
||
|
||
codex "your prompt"
|
||
```
|
||
|
||
### OpenClaw
|
||
|
||
**Opzione 1 — Dashboard (consigliato):**
|
||
|
||
```
|
||
Dashboard → CLI Tools → OpenClaw → Seleziona Modello → Applica
|
||
```
|
||
|
||
**Opzione 2 — Manuale:** Modifica `~/.openclaw/openclaw.json`:
|
||
|
||
```json
|
||
{
|
||
"models": {
|
||
"providers": {
|
||
"omniroute": {
|
||
"baseUrl": "http://127.0.0.1:20128/v1",
|
||
"apiKey": "sk_omniroute",
|
||
"api": "openai-completions"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
```
|
||
|
||
> **Nota:** OpenClaw funziona solo con OmniRoute locale. Usa `127.0.0.1` invece di `localhost` per evitare problemi di risoluzione IPv6.
|
||
|
||
### Cline / Continue / RooCode
|
||
|
||
```
|
||
Impostazioni → Configurazione API:
|
||
Provider: OpenAI Compatible
|
||
Base URL: http://localhost:20128/v1
|
||
API Key: [dalla dashboard OmniRoute]
|
||
Model: if/kimi-k2-thinking
|
||
```
|
||
|
||
</details>
|
||
|
||
---
|
||
|
||
## 🧪 Valutazioni (Evals)
|
||
|
||
OmniRoute include un framework di valutazione integrato per testare la qualità delle risposte LLM contro un golden set. Accesso via **Analytics → Evals** nella dashboard.
|
||
|
||
### Golden Set integrato
|
||
|
||
Il "OmniRoute Golden Set" precaricato contiene 10 casi di test:
|
||
|
||
- Saluti, matematica, geografia, generazione codice
|
||
- Conformità formato JSON, traduzione, markdown
|
||
- Rifiuto sicurezza (contenuto nocivo), conteggio, logica booleana
|
||
|
||
### Strategie di valutazione
|
||
|
||
| Strategia | Descrizione | Esempio |
|
||
| ---------- | ---------------------------------------------------------- | -------------------------------- |
|
||
| `exact` | L'output deve corrispondere esattamente | `"4"` |
|
||
| `contains` | L'output deve contenere la sottostringa (case-insensitive) | `"Paris"` |
|
||
| `regex` | L'output deve corrispondere al pattern regex | `"1.*2.*3"` |
|
||
| `custom` | Funzione JS personalizzata restituisce true/false | `(output) => output.length > 10` |
|
||
|
||
---
|
||
|
||
## 🐛 Risoluzione Problemi
|
||
|
||
<details>
|
||
<summary><b>Clicca per espandere la guida alla risoluzione problemi</b></summary>
|
||
|
||
**"Language model did not provide messages"**
|
||
|
||
- Quota del provider esaurita → Controlla il tracker quote nella dashboard
|
||
- Soluzione: Usa un combo con fallback o passa a un livello più economico
|
||
|
||
**Rate limiting**
|
||
|
||
- Quota abbonamento esaurita → Fallback a GLM/MiniMax
|
||
- Aggiungi combo: `cc/claude-opus-4-6 → glm/glm-4.7 → if/kimi-k2-thinking`
|
||
|
||
**Token OAuth scaduto**
|
||
|
||
- Rinnovato automaticamente da OmniRoute
|
||
- Se il problema persiste: Dashboard → Provider → Riconnetti
|
||
|
||
**Costi elevati**
|
||
|
||
- Controlla le statistiche di utilizzo in Dashboard → Costi
|
||
- Cambia il modello principale a GLM/MiniMax
|
||
- Usa il livello gratuito (Gemini CLI, iFlow) per compiti non critici
|
||
|
||
**La dashboard si apre sulla porta sbagliata**
|
||
|
||
- Imposta `PORT=20128` e `NEXT_PUBLIC_BASE_URL=http://localhost:20128`
|
||
|
||
**Errori cloud sync**
|
||
|
||
- Verifica che `BASE_URL` punti alla tua istanza in esecuzione
|
||
- Verifica che `CLOUD_URL` punti all'endpoint cloud previsto
|
||
- Mantieni i valori `NEXT_PUBLIC_*` allineati con i valori del server
|
||
|
||
**Il primo login non funziona**
|
||
|
||
- Controlla `INITIAL_PASSWORD` nel `.env`
|
||
- Se non impostata, la password predefinita è `123456`
|
||
|
||
**Nessun log delle richieste**
|
||
|
||
- Imposta `ENABLE_REQUEST_LOGS=true` nel `.env`
|
||
|
||
**Il test di connessione mostra "Invalid" per provider compatibili OpenAI**
|
||
|
||
- Molti provider non espongono l'endpoint `/models`
|
||
- OmniRoute v1.0.6+ include validazione fallback tramite chat completions
|
||
- Assicurati che la URL base includa il suffisso `/v1`
|
||
|
||
</details>
|
||
|
||
---
|
||
|
||
## 🛠️ Stack Tecnologico
|
||
|
||
- **Runtime**: Node.js 20+
|
||
- **Linguaggio**: TypeScript 5.9 — **100% TypeScript** in `src/` e `open-sse/` (v1.0.6)
|
||
- **Framework**: Next.js 16 + React 19 + Tailwind CSS 4
|
||
- **Database**: LowDB (JSON) + SQLite (stato dominio + log proxy)
|
||
- **Streaming**: Server-Sent Events (SSE)
|
||
- **Auth**: OAuth 2.0 (PKCE) + JWT + API Keys
|
||
- **Testing**: Node.js test runner (368+ test unitari)
|
||
- **CI/CD**: GitHub Actions (pubblicazione automatica npm + Docker Hub al rilascio)
|
||
- **Sito Web**: [omniroute.online](https://omniroute.online)
|
||
- **Pacchetto**: [npmjs.com/package/omniroute](https://www.npmjs.com/package/omniroute)
|
||
- **Docker**: [hub.docker.com/r/diegosouzapw/omniroute](https://hub.docker.com/r/diegosouzapw/omniroute)
|
||
- **Resilienza**: Circuit breaker, backoff esponenziale, anti-thundering herd, TLS spoofing
|
||
|
||
---
|
||
|
||
## 📖 Documentazione
|
||
|
||
| Documento | Descrizione |
|
||
| ----------------------------------------------- | -------------------------------------------------- |
|
||
| [Guida Utente](docs/USER_GUIDE.md) | Provider, combo, integrazione CLI, deploy |
|
||
| [Riferimento API](docs/API_REFERENCE.md) | Tutti gli endpoint con esempi |
|
||
| [Risoluzione Problemi](docs/TROUBLESHOOTING.md) | Problemi comuni e soluzioni |
|
||
| [Architettura](docs/ARCHITECTURE.md) | Architettura del sistema e dettagli interni |
|
||
| [Come Contribuire](CONTRIBUTING.md) | Setup di sviluppo e linee guida |
|
||
| [Spec OpenAPI](docs/openapi.yaml) | Specifica OpenAPI 3.0 |
|
||
| [Politica di Sicurezza](SECURITY.md) | Segnalazione vulnerabilità e pratiche di sicurezza |
|
||
|
||
---
|
||
|
||
## 📧 Supporto
|
||
|
||
> 💬 **Unisciti alla nostra community!** [Gruppo WhatsApp](https://chat.whatsapp.com/JI7cDQ1GyaiDHhVBpLxf8b?mode=gi_t) — Ottieni aiuto, condividi consigli e rimani aggiornato.
|
||
|
||
- **Sito Web**: [omniroute.online](https://omniroute.online)
|
||
- **GitHub**: [github.com/diegosouzapw/OmniRoute](https://github.com/diegosouzapw/OmniRoute)
|
||
- **Issues**: [github.com/diegosouzapw/OmniRoute/issues](https://github.com/diegosouzapw/OmniRoute/issues)
|
||
- **WhatsApp**: [Gruppo della comunità](https://chat.whatsapp.com/JI7cDQ1GyaiDHhVBpLxf8b?mode=gi_t)
|
||
- **WhatsApp**: [Gruppo della comunità](https://chat.whatsapp.com/JI7cDQ1GyaiDHhVBpLxf8b?mode=gi_t)
|
||
- **Progetto Originale**: [9router di decolua](https://github.com/decolua/9router)
|
||
|
||
---
|
||
|
||
## 👥 Contributori
|
||
|
||
[](https://github.com/diegosouzapw/OmniRoute/graphs/contributors)
|
||
|
||
### Come Contribuire
|
||
|
||
1. Fai il fork del repository
|
||
2. Crea il tuo branch di funzionalità (`git checkout -b feature/amazing-feature`)
|
||
3. Fai il commit delle modifiche (`git commit -m 'Add amazing feature'`)
|
||
4. Fai il push al branch (`git push origin feature/amazing-feature`)
|
||
5. Apri una Pull Request
|
||
|
||
Consulta [CONTRIBUTING.md](CONTRIBUTING.md) per le linee guida dettagliate.
|
||
|
||
### Rilasciare una nuova versione
|
||
|
||
```bash
|
||
# Crea un rilascio — la pubblicazione npm avviene automaticamente
|
||
gh release create v1.0.6 --title "v1.0.6" --generate-notes
|
||
```
|
||
|
||
---
|
||
|
||
## 📊 Cronologia Stelle
|
||
|
||
<a href="https://star-history.com/#diegosouzapw/OmniRoute&Date">
|
||
<picture>
|
||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=diegosouzapw/OmniRoute&type=Date&theme=dark" />
|
||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=diegosouzapw/OmniRoute&type=Date" />
|
||
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=diegosouzapw/OmniRoute&type=Date" />
|
||
</picture>
|
||
</a>
|
||
|
||
---
|
||
|
||
## 🙏 Ringraziamenti
|
||
|
||
Un ringraziamento speciale a **[9router](https://github.com/decolua/9router)** di **[decolua](https://github.com/decolua)** — il progetto originale che ha ispirato questo fork. OmniRoute si costruisce su quell'incredibile base con funzionalità aggiuntive, API multi-modali e una riscrittura completa in TypeScript.
|
||
|
||
Un ringraziamento speciale a **[CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI)** — l'implementazione originale in Go che ha ispirato questo porting in JavaScript.
|
||
|
||
---
|
||
|
||
## 📄 Licenza
|
||
|
||
Licenza MIT — vedi [LICENSE](LICENSE) per i dettagli.
|
||
|
||
---
|
||
|
||
<div align="center">
|
||
<sub>Fatto con ❤️ per gli sviluppatori che programmano 24/7</sub>
|
||
<br/>
|
||
<sub><a href="https://omniroute.online">omniroute.online</a></sub>
|
||
</div>
|