diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000000..a06ab2dbc2 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,55 @@ +name: Publish to Docker Hub + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + docker: + name: Build & Push Docker Image + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Extract version from release tag + id: version + run: | + VERSION="${GITHUB_REF_NAME}" + VERSION="${VERSION#v}" + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + echo "Publishing Docker image version: $VERSION" + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + target: runner-base + push: true + tags: | + diegosouzapw/omniroute:${{ steps.version.outputs.version }} + diegosouzapw/omniroute:latest + cache-from: type=gha + cache-to: type=gha,mode=max + platforms: linux/amd64 + + - name: Update Docker Hub description + uses: peter-evans/dockerhub-description@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + repository: diegosouzapw/omniroute + short-description: "OmniRoute โ€” Unified AI proxy. Route any LLM through one endpoint." + readme-filepath: ./README.md diff --git a/CHANGELOG.md b/CHANGELOG.md index f877a0a314..03961f01fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,401 +2,133 @@ All notable changes to OmniRoute are documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). --- -## [Unreleased] +## [0.7.0] โ€” 2026-02-16 + +### Added + +- ๐Ÿณ **Docker Hub public image** โ€” `diegosouzapw/omniroute` available on [Docker Hub](https://hub.docker.com/r/diegosouzapw/omniroute) with `latest` and versioned tags +- ๐Ÿ”„ **Docker CI/CD** โ€” GitHub Actions workflow (`docker-publish.yml`) auto-builds and pushes Docker image on every release +- โ˜๏ธ **Akamai VM deployment** โ€” Nanode 1GB instance created for remote hosting +- ๐ŸŽฏ **Provider model filtering** โ€” Filter model suggestions by selected provider in Translator and Chat Tester +- ๐Ÿ”Œ **CLI status badges** โ€” Extract `CliStatusBadge` component; status visible on collapsed tool cards +- โ˜๏ธ **Cloud connection UX** โ€” GET status endpoint, toast feedback, and sidebar indicator for cloud sync +- ๐Ÿ” **OAuth provider secrets** โ€” Default cloud URL and OAuth provider secrets set via environment variables +- โšก **Edge compatibility** โ€” Replace `uuid` package with native `crypto.randomUUID()` for Cloudflare Workers compatibility --- ## [0.6.0] โ€” 2026-02-16 -Provider metrics, cost analytics page, health enhancements, and visual rebrand. - ### Added -#### Dashboard & UI - -- **Costs Page** โ€” New dedicated `/dashboard/costs` page with cost analytics and breakdown -- **Provider Metrics API** โ€” New `/api/provider-metrics` endpoint exposing per-provider usage metrics -- **Health Provider Status** โ€” Enhanced health page with detailed provider status display and configuration indicators -- **Model Import for Passthrough Providers** โ€” Model import now saves as default (non-custom) for passthrough providers (Deepgram, AssemblyAI, NanoBanana) - -#### Visual & Branding - -- **App Icon Redesign** โ€” New network node graph icon with updated color scheme reflecting "Modern Tech Warmth" aesthetic - -### Fixed - -- **Provider Metrics Display** โ€” Providers page now shows real-time usage metrics per provider -- **Home Page Providers Overview** โ€” Enhanced provider card display on dashboard home +- ๐Ÿ’ฐ **Costs & Budget page** โ€” Dedicated dashboard page for cost tracking and budget management +- ๐Ÿ“Š **Provider metrics display** โ€” Show per-provider usage metrics and statistics +- ๐Ÿ“ฅ **Model import for passthrough providers** โ€” Import models from API-compatible providers (Deepgram, AssemblyAI, NanoBanana) +- ๐ŸŽจ **App icon redesign** โ€” New network node graph icon with updated color scheme --- ## [0.5.0] โ€” 2026-02-15 -Dashboard refinements, LLM evaluation framework, combo strategies expansion, and UI/UX polish. - ### Added -#### Dashboard & UI - -- **Shared UI Component Library** โ€” Refactored dashboard with reusable component architecture -- **ModelAvailabilityBadge** โ€” New component showing model availability status per provider -- **Landing Page Retheme** โ€” Visual refresh with updated color palette and modern aesthetic -- **Providers Overview Modal** โ€” Click provider cards to view available models with copy-to-clipboard - -#### Combo Strategies - -- **Random Strategy** โ€” Random model selection for even distribution -- **Least-Used Strategy** โ€” Routes to the least recently used model using combo metrics -- **Cost-Optimized Strategy** โ€” Leverages pricing infrastructure to route to cheapest available model - -#### LLM Evaluations - -- **Golden Set Testing** โ€” Built-in evaluation framework with 10 test cases -- **API Key Integration** โ€” EvalsTab now makes real LLM calls through the proxy endpoint -- **Provider Alias Filtering** โ€” Enhanced model filtering with provider-aware aliases -- **4 Match Strategies** โ€” exact, contains, regex, and custom JS function evaluation - -#### Phase 5 โ€” Foundation & Security - -- **Domain State Persistence** โ€” SQLite-backed persistence for 4 domain modules via `domainState.js` -- **Write-Through Cache** โ€” In-memory Map + SQLite write-through for state survival across restarts -- **Race Condition Fix** โ€” `route.js` `ensureInitialized()` with Promise-based singleton - -#### Phase 6 โ€” Architecture Refactoring - -- **OAuth Provider Extraction** โ€” `providers.js` (1051 โ†’ 144 lines) split into 12 modules -- **Policy Engine** โ€” Centralized request evaluation (`policyEngine.js`) -- **Deterministic Round-Robin** โ€” Persistent counter per combo -- **Telemetry Window Accuracy** โ€” `recordedAt` timestamps with accurate `windowMs` filtering - -#### Tests - -- 22 new tests: `domain-persistence.test.mjs` (16), `policy-engine.test.mjs` (6) -- Total: **295+ tests passing** (up from 273 in v0.3.0) +- ๐Ÿงช **LLM Evaluations (Evals)** โ€” Golden set testing framework with 4 match strategies (`exact`, `contains`, `regex`, `custom`) +- ๐ŸŽฒ **Advanced combo strategies** โ€” `random`, `least-used`, and `cost-optimized` balancing strategies for combos +- ๐Ÿ“Š **API key usage in Evals** โ€” Evals tab uses API key auth for real LLM calls through the proxy +- ๐Ÿท๏ธ **Model availability badge** โ€” Visual indicator for model availability per provider +- ๐ŸŽจ **Landing page retheme** โ€” Updated landing page design with new aesthetic +- ๐Ÿงฉ **Shared UI component library** โ€” Refactored dashboard with reusable component library ### Fixed -- **Proxy decoupling** โ€” `proxy.js` imports `getSettings()` directly from `localDb` -- **Default password** โ€” `.env.example` `INITIAL_PASSWORD` changed to `CHANGEME` -- **Server init error handling** โ€” `server-init.js` uses `console.error` + `process.exit(1)` -- **Chat completions TypeError** โ€” Fixed `ensureInitialized` error in API route -- **Evals Tab** โ€” Fixed case count display and added real LLM call integration -- **Routing Tab** โ€” Removed deprecated random strategy option +- ๐Ÿ› Fix `TypeError` in `chat/completions` `ensureInitialized` call + +--- + +## [0.4.0] โ€” 2026-02-15 + +### Added + +- ๐Ÿง  **LLM Gateway Intelligence** (Phase 9) โ€” Smart routing, semantic caching, request idempotency, progress tracking +- ๐Ÿ“„ **Missing flows & pages** (Phase 8) โ€” Error pages, UX components, telemetry dashboards +- ๐Ÿ”ง **API & code quality** (Phase 7) โ€” API restructuring, JSDoc documentation, code quality improvements +- ๐Ÿ“š **Documentation restructuring** (Phase 10) โ€” Component decomposition, docs cleanup +- โœ… **26 action items** from critical analysis resolved + +### Changed + +- โ™ป๏ธ **Architecture refactor** (Phase 5-6) โ€” Domain persistence, policy engine, OAuth extraction, proxy decoupling + +### Fixed + +- ๐Ÿ› Fix CI build and lint failures +- ๐Ÿ› Fix ghost import in `chatHelpers.js` SSE handling --- ## [0.3.0] โ€” 2026-02-15 -Major release: security hardening, domain layer architecture, pipeline integration, full frontend coverage, and resilience overhaul with circuit breaker, anti-thundering herd, and Resilience UI. - ### Added -#### Security Hardening (FASE-01 to FASE-09) - -- **FASE-01 to FASE-06** โ€” Core security hardening across authentication, input validation, and access control -- **FASE-07 to FASE-09** โ€” Advanced features including enhanced monitoring, security audit improvements, and operational hardening - -#### Domain Layer & Infrastructure - -- **Model Availability** โ€” TTL-based cooldown tracking per model (`modelAvailability.js`) -- **Cost Rules** โ€” Per-API-key budget management with daily/monthly limits (`costRules.js`) -- **Fallback Policy** โ€” Declarative fallback chain routing with CRUD API (`fallbackPolicy.js`) -- **Error Codes Catalog** โ€” 24 standardized error codes in 6 categories with `createErrorResponse` helper (`errorCodes.js`) -- **Correlation ID** โ€” AsyncLocalStorage-based `x-request-id` propagation for end-to-end tracing (`requestId.js`) -- **Fetch Timeout** โ€” AbortController wrapper with configurable `FETCH_TIMEOUT_MS` (`fetchTimeout.js`) -- **Combo Resolver** โ€” Priority/round-robin/random/least-used strategies (`comboResolver.js`) -- **Lockout Policy** โ€” Sliding window lockout with force-unlock capability (`lockoutPolicy.js`) -- **Request Telemetry** โ€” 7-phase lifecycle tracking with p50/p95/p99 latency aggregation (`requestTelemetry.js`) - -#### Pipeline Wiring (7 Backend Modules) - -- **Circuit Breaker** integration into request pipeline for provider resilience -- **Model Availability** wired with TTL cooldowns for per-model health tracking -- **Request Telemetry** lifecycle tracking across 7 phases -- **Cost Rules** budget check and cost recording per request -- **Compliance** audit logging with `noLog` opt-out per API key -- **Fetch Timeout** via `fetchWithTimeout` replacing bare `fetch()` in proxy -- **Request ID** (`X-Request-Id` header) for end-to-end tracing - -#### 9 New API Routes - -- `/api/cache/stats` โ€” GET cache stats, DELETE flush -- `/api/models/availability` โ€” GET availability report, POST clear cooldown -- `/api/telemetry/summary` โ€” GET p50/p95/p99 latency metrics -- `/api/usage/budget` โ€” GET cost summary, POST set budget per key -- `/api/fallback/chains` โ€” GET/POST/DELETE fallback chain management -- `/api/compliance/audit-log` โ€” GET filterable audit log -- `/api/evals` โ€” GET list suites, POST run suite -- `/api/evals/[suiteId]` โ€” GET suite details -- `/api/policies` โ€” GET circuit breaker + lockout status, POST force-unlock - -#### Frontend โ€” 100% Backend API Coverage (7 Batches) - -- **Batch 1** โ€” Pipeline wiring integration verified across all backend modules -- **Batch 2** โ€” 9 API routes created for backend module access -- **Batch 3** โ€” 6 shared UI components exported (Breadcrumbs, EmptyState, NotificationToast, FilterBar, ColumnToggle, DataTable) + `notificationStore` wired into layout -- **Batch 4** โ€” Usage page: BudgetTelemetryCards (latency p50/p95/p99, cache, system health); Settings page: ComplianceTab (audit log), CacheStatsCard (prompt cache + flush); Combos page: EmptyState component -- **Batch 5** โ€” Integration-wiring tests: 44 tests across 12 suites verifying all batches -- **Batch 6** โ€” Frontend now covers every backend API surface -- **Batch 7** โ€” Final wiring and verification pass - -#### Refactoring & Decomposition - -- **usageDb.js** decomposed from 969 โ†’ 40 lines into 5 focused modules: `migrations.js`, `usageHistory.js`, `costCalculator.js`, `usageStats.js`, `callLogs.js` -- **handleSingleModelChat** decomposed from 183 โ†’ 80 lines with extracted helpers (`handleNoCredentials`, `safeResolveProxy`, `safeLogEvents`) -- **Shared UI primitives** extracted: FilterBar, ColumnToggle, DataTable (3230 total lines) - -#### Rate Limit Overhaul (4 Phases) - -- **Phase 1** โ€” Provider-specific resilience profiles (OAuth vs API key), exponential backoff (5sโ†’60s), default API limits (100 RPM, 200ms minTime) -- **Phase 2** โ€” Circuit breaker integration in combo pipeline with `canExecute()` checks, early exit when all models are OPEN, semaphore marking for 502/503/504 -- **Phase 3** โ€” Anti-thundering herd: mutex on `markAccountUnavailable`, auto rate-limit for API key providers with elevated defaults -- **Phase 4** โ€” Resilience UI tab in settings with 3 cards: ProviderProfilesCard, CircuitBreakerCard (real-time, auto-refresh 5s, reset), RateLimitOverviewCard -- `/api/resilience` โ€” GET (full state) + PATCH (save profiles) -- `/api/resilience/reset` โ€” POST (reset breakers + cooldowns) - -#### ADRs & Quality - -- **6 Architecture Decision Records**: SQLite, Fallback Strategy, OAuth, JS+JSDoc, Single-Tenant, Translator Registry -- **Accessibility audit** โ€” WCAG AA checker with aria-label, dialog role, alt text, label validation (`a11yAudit.js`) -- **Password Reset CLI** โ€” Interactive admin password reset tool (`bin/reset-password.mjs`) -- **Playwright E2E specs** โ€” Responsive viewport tests (375/768/1280) across 4 pages -- **Eval Framework** โ€” 4 strategies (exact, contains, regex, custom) + 10-case golden set (`evalRunner.js`) -- **Compliance module** โ€” audit_log table, `noLog` opt-out per API key, `LOG_RETENTION_DAYS` cleanup - -#### Tests - -- **63 new tests** for rate limit overhaul: error-classification, combo-circuit-breaker, thundering-herd -- **44 integration-wiring tests** across 12 suites -- **31 domain layer tests** for model availability, cost rules, error codes, request ID, fetch timeout -- **13 UX/telemetry tests** for error pages, breadcrumbs, empty states, telemetry, domain extraction -- **25 batch-B tests** for ADRs, eval framework, compliance, a11y, CLI, Playwright specs -- Total: **273+ tests passing** (up from ~144 in v0.2.0) - -#### Documentation - -- **JSDoc** coverage added to all new modules (100% exported functions documented) -- `@ts-check` added to 8 critical files - -### Fixed - -- **ESLint v10 โ†’ v9 downgrade** for `eslint-config-next` compatibility โ€” rewrote flat config, removed `defineConfig`/`globalIgnores` (ESLint 10-only APIs) -- **Unrecoverable refresh token errors** โ€” detect `refresh_token_reused` and similar errors, mark connections as expired requiring re-authentication -- **Record type annotation** added to `getAllFallbackChains` result -- **`.gitignore` cleanup** โ€” added `.analysis/` and `antigravity-manager-analysis/`, whitelisted FASE docs +- โšก **Resilience system** โ€” Exponential backoff, circuit breaker, anti-thundering herd mutex, Resilience UI settings page +- ๐Ÿ–ฅ๏ธ **100% frontend API coverage** โ€” 7 implementation batches covering all backend routes +- ๐Ÿ“Š **9 new API routes** โ€” Budget, telemetry, compliance, tags, storage health, and more +- ๐Ÿงช **Eval framework & compliance** โ€” ADRs, accessibility, CLI specs, Playwright test specs (46 tasks) +- ๐Ÿ—๏ธ **Pipeline integration** โ€” 7 backend modules wired into request processing pipeline +- ๐Ÿ” **Security hardening** โ€” Phases 01โ€“06 (input validation, CSRF, rate limiting, auth hardening) +- ๐Ÿค– **Advanced features** โ€” Phases 07โ€“09 (domain extraction, error codes, request ID, fetch timeout) +- ๐Ÿ”„ **Unrecoverable token handling** โ€” Detect and mark connections as expired on fatal refresh errors ### Changed -- **Error pages** โ€” Custom 404 and global error boundary with gradient design and dev details -- **Combo page** โ€” Inline empty state replaced with EmptyState component -- **Layout** โ€” Breadcrumbs rendered between Header and content, NotificationToast as global fixed overlay -- **Proxy module** โ€” bare `fetch()` replaced with `fetchWithTimeout` (5s timeout) + `X-Request-Id` header +- โ™ป๏ธ Decompose `usageDb`, `handleSingleModelChat`, and UI components for maintainability +- โฌ‡๏ธ Downgrade ESLint v10 โ†’ v9 for `eslint-config-next` compatibility --- ## [0.2.0] โ€” 2026-02-14 -Major feature release: advanced routing services, security hardening, cost analytics dashboard, and pricing management overhaul. - ### Added -#### Open-SSE Services - -- **Account Selector** โ€” intelligent provider account selection with priority and load-balancing strategies (`accountSelector.js`) -- **Context Manager** โ€” request context tracking and lifecycle management (`contextManager.js`) -- **IP Filter** โ€” allowlist/blocklist IP filtering with CIDR support (`ipFilter.js`) -- **Session Manager** โ€” persistent session tracking across requests (`sessionManager.js`) -- **Signature Cache** โ€” request signature caching for deduplication (`signatureCache.js`) -- **System Prompt** โ€” global system prompt injection into all chat completions (`systemPrompt.js`) -- **Thinking Budget** โ€” token budget management for reasoning models (`thinkingBudget.js`) -- **Wildcard Router** โ€” pattern-based model routing with glob matching (`wildcardRouter.js`) -- Enhanced **Rate Limit Manager** with sliding-window algorithm and per-key quotas - -#### Dashboard Settings - -- **IP Filter** settings tab โ€” configure allowed/blocked IPs from the UI (`IPFilterSection.js`) -- **System Prompt** settings tab โ€” set global system prompt injection (`SystemPromptTab.js`) -- **Thinking Budget** settings tab โ€” configure reasoning token budgets (`ThinkingBudgetTab.js`) -- **Pricing Tab** โ€” full-page redesign with provider-centric organization, inline editing, search/filter, and save/reset per provider (`PricingTab.js`) -- **Rate Limit Status** component on Usage page (`RateLimitStatus.js`) -- **Sessions Tab** on Usage page โ€” view and manage active sessions (`SessionsTab.js`) - -#### Usage & Cost Analytics - -- **Cost stat card** (amber accent) prominently displayed in analytics top row -- **Provider Cost Donut** โ€” new chart showing cost distribution across providers -- **Daily Cost Trend** โ€” cost line overlay (amber) on token trend chart with secondary Y-axis -- **Model Table Cost column** โ€” sortable cost column in model breakdown table -- Cost-aware tooltip formatting throughout analytics charts - -#### Pricing API - -- `/api/pricing/models` endpoint โ€” serves merged model catalog from 3 sources: registry, custom models (DB), and pricing-only models -- Custom model badge in pricing page for user-imported models -- `/api/rate-limits` endpoint for rate limit configuration -- `/api/sessions` endpoint for session management -- `/api/settings/ip-filter`, `/api/settings/system-prompt`, `/api/settings/thinking-budget` endpoints - -#### Cloudflare Worker - -- Cloud worker module for edge deployment (`cloud/`) - -#### Tests - -- Unit tests for account selector, context manager, IP filter, enhanced rate limiting, session manager, signature cache, system prompt, thinking budget, and wildcard router (9 new test files) - -#### Documentation - -- OpenAPI specification at `docs/openapi.yaml` covering all 89 API endpoints -- Enhanced `restart.sh` with clean build, health check, graceful shutdown (Ctrl+C), and real-time log tailing -- Updated architecture documentation and codebase docs with new services and API routes -- Model selector with autocomplete in Chat Tester and Test Bench modes - -### Fixed - -- Server port collision (EADDRINUSE) during restart โ€” now kills port before `next start` -- Icon rendering corrected from `material-symbols-rounded` to `material-symbols-outlined` -- Pricing page only showed hardcoded registry models โ€” now includes custom/imported models - -### Changed - -- Usage analytics layout reorganized: donuts separated into logical groupings, bottom stats simplified from 6 to 4 cards -- Daily trend chart upgraded from `BarChart` to `ComposedChart` with dual Y-axes -- Routing tab updated with new service integrations +- ๐Ÿ›ฃ๏ธ **Advanced routing services** โ€” Priority-based routing, global strategy configuration +- ๐Ÿ’ฐ **Cost analytics dashboard** โ€” Token cost tracking and analytics visualization +- ๐Ÿ’Ž **Pricing overhaul** โ€” Comprehensive pricing data for all supported providers and models +- ๐Ÿ“ฆ **npm badge & CLI options** โ€” npm version badge in README, CLI options table, automated release docs --- -## [0.0.1] โ€” 2026-02-13 - -Initial public release of OmniRoute (rebranded from 9router). +## [0.1.0] โ€” 2026-02-14 ### Added -- **28 AI Providers** โ€” OpenAI, Anthropic, Google Gemini, DeepSeek, Groq, xAI, Mistral, Perplexity, Together AI, Fireworks AI, Cerebras, Cohere, NVIDIA NIM, Nebius, GitHub Copilot, Cursor, Kiro, Kimi, MiniMax, iFlow, and more -- **OpenAI-compatible proxy** at `/api/v1/chat/completions` with automatic format translation, load balancing, and failover -- **Anthropic Messages API** at `/api/v1/messages` for Claude-native clients -- **OpenAI Responses API** at `/api/v1/responses` for modern OpenAI workflows -- **Embeddings API** at `/api/v1/embeddings` with 6 providers and 9 models -- **Image Generation API** at `/api/v1/images/generations` with 4 providers and 9 models -- **Format Translator** โ€” automatic request/response conversion between OpenAI, Anthropic, Gemini, and OpenAI Responses formats -- **Translator Playground** with 4 modes: Playground, Chat Tester, Test Bench, Live Monitor -- **Combo Routing** โ€” named route configurations with priority, weighted, and round-robin strategies -- **API Key Management** โ€” create/revoke keys with usage attribution -- **Usage Dashboard** โ€” analytics, call logs, request logger with API key filtering and cost tracking -- **Provider Health Diagnostics** โ€” structured status (runtime errors, auth failures, token refresh) with per-connection retest -- **CLI Tools Integration** โ€” runtime detection for Cline, Kiro, Droid, OpenClaw with backup/restore -- **OAuth Flows** โ€” for Cursor, Kiro, Kimi, and GitHub Copilot -- **Docker Support** โ€” multi-stage Dockerfile, docker-compose with 3 profiles (base, cli, host), production compose -- **SOCKS5 Proxy** โ€” outbound proxy support enabled by default (`ab8d752`) -- **Unified Storage** โ€” `DATA_DIR` / `XDG_CONFIG_HOME` resolution with auto-migration from `~/.omniroute` -- **In-app Documentation** at `/docs` with quick start, endpoint reference, and client compatibility notes -- **Dark Theme UI** โ€” modern dashboard with glassmorphism, responsive layout -- `` tag parser for reasoning models (DeepSeek, Qwen) -- Non-stream response translation for all formats -- Secure cookie handling for LAN/reverse-proxy deployments - -### Fixed - -- OAuth re-authentication no longer creates duplicate connections (`773f117`, `510aedd`) -- Connection test no longer corrupts valid OAuth tokens (`a2ba189`) -- Cloud sync disabled to prevent 404 log spam (`71d132e`) -- `.env.example` synced with current environment structure (`6bdc74b`) -- Select dropdown dark theme inconsistency (`1bd734d`) - -### Dependencies - -- `actions/github-script` bumped from 7 to 8 (`f6a994a`) -- `eslint` bumped from 9.39.2 to 10.0.0 (`ecd4aea`) +- ๐ŸŽ‰ **Initial OmniRoute release** โ€” Rebranded from 9router with full feature set +- ๐Ÿ”„ **28 AI providers** โ€” OpenAI, Claude, Gemini, Copilot, DeepSeek, Groq, xAI, Mistral, Qwen, iFlow, and more +- ๐ŸŽฏ **Smart fallback** โ€” 3-tier auto-routing (Subscription โ†’ Cheap โ†’ Free) +- ๐Ÿ”€ **Format translation** โ€” Seamless OpenAI โ†” Claude โ†” Gemini format conversion +- ๐Ÿ‘ฅ **Multi-account support** โ€” Multiple accounts per provider with round-robin +- ๐Ÿ” **OAuth 2.0 (PKCE)** โ€” Automatic token management and refresh +- ๐Ÿ“Š **Usage tracking** โ€” Real-time quota monitoring with reset countdown +- ๐ŸŽจ **Custom combos** โ€” Create model combinations with fallback chains +- โ˜๏ธ **Cloud sync** โ€” Sync configuration across devices via Cloudflare Worker +- ๐Ÿ“– **OpenAPI specification** โ€” Full API documentation +- ๐Ÿ›ก๏ธ **SOCKS5 proxy support** โ€” Outbound proxy for upstream provider calls +- ๐Ÿ”Œ **New endpoints** โ€” `/v1/rerank`, `/v1/audio/*`, `/v1/moderations` +- ๐Ÿ“ฆ **npm CLI package** โ€” `npm install -g omniroute` with auto-launch +- ๐Ÿณ **Docker support** โ€” Multi-stage Dockerfile with `base` and `cli` profiles +- ๐Ÿ”’ **Security policy** โ€” `SECURITY.md` with vulnerability reporting guidelines +- ๐Ÿงช **CI/CD pipeline** โ€” GitHub Actions for lint, build, test, and npm publish --- -## Pre-Release History (9router) - -> The following entries document the legacy 9router project before it was -> rebranded to OmniRoute. All changes below were included in the initial -> `0.0.1` release. - -### 0.2.75 โ€” 2026-02-11 - -- API key attribution in usage/call logs with per-key analytics aggregates -- Usage dashboard API key observability (distribution donut, filterable table) -- In-app docs page (`/docs`) with quick start, endpoint reference, and client compatibility notes -- Unified storage path policy (`DATA_DIR` โ†’ `XDG_CONFIG_HOME` โ†’ `~/.omniroute`) -- Build-phase guard for `usageDb` (in-memory during `next build`) -- LAN/reverse-proxy cookie security detection -- Hardened Gemini 3 Flash normalization and non-stream SSE fallback parsing -- CLI tool runtime and OAuth refresh reliability improvements -- Provider health diagnostics with structured error types - -### 0.2.74 โ€” 2026-02-11 - -- Model resolution fallback fix for unprefixed models -- GitHub Copilot dynamic endpoint selection (Codex โ†’ `/responses`) -- Non-stream translation path for OpenAI Responses -- Updated GitHub model catalog with compatibility aliases - -### 0.2.73 โ€” 2026-02-09 - -- Expanded provider registry from 18 โ†’ 28 providers (DeepSeek, Groq, xAI, Mistral, Perplexity, Together AI, Fireworks AI, Cerebras, Cohere, NVIDIA NIM) -- `/v1/embeddings` endpoint with 6 providers and 9 models -- `/v1/images/generations` endpoint with 4 providers and 9 models -- `` tag parser for reasoning models -- Available Endpoints card on Endpoint page (127 chat, 9 embedding, 9 image models) - -### 0.2.72 โ€” 2026-02-08 - -- Split Kimi into dual providers: `kimi` (OpenAI-compatible) and `kimi-coding` (Moonshot API) -- Hybrid CLI runtime support with Docker profiles (`runner-base`, `runner-cli`) -- Hardened cloud sync/auth flow with SSE fallback - -### 0.2.66 โ€” 2026-02-06 - -- Cursor provider end-to-end support with OAuth import flow -- `requireLogin` control and `hasPassword` state handling -- Usage/quota UX improvements -- Model support for custom providers -- Codex updates (GPT-5.3, thinking levels), Claude Opus 4.6, MiniMax Coding -- Auto-validation for provider API keys - -### 0.2.56 โ€” 2026-02-04 - -- Anthropic-compatible provider support -- Provider icons across dashboard -- Enhanced usage tracking pipeline - -### 0.2.52 โ€” 2026-02-02 - -- Codex Cursor compatibility and Next.js 16 proxy migration -- OpenAI-compatible provider nodes (CRUD/validation/test) -- Token expiration and key-validity checks -- Non-streaming response translation for multiple formats -- Kiro OAuth wiring and token refresh support - -### 0.2.43 โ€” 2026-01-27 - -- Fixed CLI tools model selection -- Fixed Kiro translator request handling - -### 0.2.36 โ€” 2026-01-19 - -- Usage dashboard page -- Outbound proxy support in Open SSE fetch pipeline -- Fixed combo fallback behavior - -### 0.2.31 โ€” 2026-01-18 - -- Fixed Kiro token refresh and executor behavior -- Fixed Kiro request translation handling - -### 0.2.27 โ€” 2026-01-15 - -- Added Kiro provider support with OAuth flow -- Fixed Codex provider behavior - -### 0.2.21 โ€” 2026-01-12 - -- Initial README and project setup +[0.7.0]: https://github.com/diegosouzapw/OmniRoute/compare/v0.6.0...v0.7.0 +[0.6.0]: https://github.com/diegosouzapw/OmniRoute/compare/v0.5.0...v0.6.0 +[0.5.0]: https://github.com/diegosouzapw/OmniRoute/compare/v0.4.0...v0.5.0 +[0.4.0]: https://github.com/diegosouzapw/OmniRoute/compare/v0.3.0...v0.4.0 +[0.3.0]: https://github.com/diegosouzapw/OmniRoute/compare/v0.2.0...v0.3.0 +[0.2.0]: https://github.com/diegosouzapw/OmniRoute/compare/v0.1.0...v0.2.0 +[0.1.0]: https://github.com/diegosouzapw/OmniRoute/releases/tag/v0.1.0 diff --git a/README.md b/README.md index 8e0581828a..79fe6cec50 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ > *This project is inspired by and originally forked from [9router](https://github.com/decolua/9router) by [decolua](https://github.com/decolua). Thank you for the incredible foundation!* [![npm version](https://img.shields.io/npm/v/omniroute?color=cb3837&logo=npm)](https://www.npmjs.com/package/omniroute) + [![Docker Hub](https://img.shields.io/docker/v/diegosouzapw/omniroute?label=Docker%20Hub&logo=docker&color=2496ED)](https://hub.docker.com/r/diegosouzapw/omniroute) [![License](https://img.shields.io/github/license/diegosouzapw/OmniRoute)](https://github.com/diegosouzapw/OmniRoute/blob/main/LICENSE) [๐Ÿš€ Quick Start](#-quick-start) โ€ข [๐Ÿ’ก Features](#-key-features) โ€ข [๐Ÿ“– Docs](#-documentation) @@ -113,6 +114,53 @@ PORT=20128 NEXT_PUBLIC_BASE_URL=http://localhost:20128 npm run dev --- +## ๐Ÿณ Docker + +OmniRoute is available as a public Docker image on [Docker Hub](https://hub.docker.com/r/diegosouzapw/omniroute). + +**Quick run:** + +```bash +docker run -d \ + --name omniroute \ + --restart unless-stopped \ + -p 20128:20128 \ + -v omniroute-data:/app/data \ + diegosouzapw/omniroute:latest +``` + +**With environment file:** + +```bash +# Copy and edit .env first +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 +``` + +**Using Docker Compose:** + +```bash +# Base profile (no CLI tools) +docker compose --profile base up -d + +# CLI profile (Claude Code, Codex, OpenClaw built-in) +docker compose --profile cli up -d +``` + +| Image | Tag | Size | Description | +| ------------------------ | -------- | ------ | --------------------- | +| `diegosouzapw/omniroute` | `latest` | ~250MB | Latest stable release | +| `diegosouzapw/omniroute` | `0.6.0` | ~250MB | Current version | + +--- + ## ๐Ÿ’ก Key Features | Feature | What It Does | @@ -212,6 +260,7 @@ registerSuite({ - **Testing**: Node.js test runner (320+ unit tests) - **CI/CD**: GitHub Actions (auto npm publish on release) - **Package**: [npmjs.com/package/omniroute](https://www.npmjs.com/package/omniroute) +- **Docker**: [hub.docker.com/r/diegosouzapw/omniroute](https://hub.docker.com/r/diegosouzapw/omniroute) - **Resilience**: Circuit breaker, exponential backoff, anti-thundering herd --- @@ -255,7 +304,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines. ```bash # Create a release โ€” npm publish happens automatically -gh release create v0.6.0 --title "v0.6.0" --generate-notes +gh release create v0.7.0 --title "v0.7.0" --generate-notes ``` --- diff --git a/package-lock.json b/package-lock.json index dc6e2e73ac..c8a695668c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "omniroute", - "version": "0.6.0", + "version": "0.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "omniroute", - "version": "0.6.0", + "version": "0.7.0", "license": "MIT", "workspaces": [ "open-sse" diff --git a/package.json b/package.json index 24ab3f6bc7..92e2734f24 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "omniroute", - "version": "0.6.0", + "version": "0.7.0", "description": "Smart AI Router with auto fallback โ€” route to FREE & cheap models, zero downtime. Works with Cursor, Cline, Claude Desktop, Codex, and any OpenAI-compatible tool.", "type": "module", "bin": {