-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
docs: add llm.txt for LLM and contributor onboarding #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,134 @@ | ||||||
| # OmniRoute | ||||||
|
|
||||||
| > OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 36+ AI providers — all through a single OpenAI-compatible endpoint. | ||||||
|
|
||||||
| ## Overview | ||||||
|
|
||||||
| OmniRoute solves the problem of managing multiple AI provider subscriptions, quotas, and rate limits. It sits between your AI-powered tools (IDE agents, CLI tools) and AI providers, routing requests intelligently through a 4-tier fallback system: Subscription → API Key → Cheap → Free. | ||||||
|
|
||||||
| **Key value:** One endpoint (`http://localhost:20128/v1`), unlimited models, zero downtime, minimal cost. | ||||||
|
|
||||||
| ## Tech Stack | ||||||
|
|
||||||
| - **Runtime:** Node.js >= 18 | ||||||
| - **Framework:** Next.js 16 (App Router) with TypeScript | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| - **Database:** SQLite via better-sqlite3 (local, zero-config) | ||||||
| - **State management:** Zustand (client), lowdb (server JSON persistence) | ||||||
| - **UI:** React 19, Tailwind CSS 4, Recharts for analytics | ||||||
| - **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth | ||||||
|
||||||
| - **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth | |
| - **Auth:** OAuth 2.0 (PKCE) for providers, bcryptjs for local user auth |
Copilot
AI
Feb 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The directory name should be translator/ (singular) instead of translators/ (plural). The actual directory in the codebase is open-sse/translator/.
| │ └── translators/ # Format translators (OpenAI ↔ Claude ↔ Gemini ↔ Responses) | |
| │ └── translator/ # Format translators (OpenAI ↔ Claude ↔ Gemini ↔ Responses) |
Copilot
AI
Feb 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path should reference open-sse/translator/ (singular) instead of open-sse/translators/ (plural). The actual directory in the codebase is open-sse/translator/.
Copilot
AI
Feb 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The environment variable name is incorrect. According to .env.example, the variable is INITIAL_PASSWORD, not ADMIN_PASSWORD. Also, API_KEY is not a single environment variable in .env.example - instead there are provider-specific API keys like DEEPSEEK_API_KEY, GROQ_API_KEY, etc., and API_KEY_SECRET for encryption.
| 4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`. | |
| 4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars include: `PORT`, `NEXT_PUBLIC_BASE_URL`, `INITIAL_PASSWORD`, `API_KEY_SECRET`, and provider-specific keys like `DEEPSEEK_API_KEY`, `GROQ_API_KEY`, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The statement 'No migration framework' is inaccurate. The codebase implements a versioned migration system using a migrationRunner and tracks applied migrations in the _omniroute_migrations table (as seen in src/lib/db/core.ts).
5. **Database migrations:** SQLite schema is managed via a custom migration runner in `src/lib/db/migrationRunner.ts`. Schema changes are applied on startup and tracked in the `_omniroute_migrations` table.
Copilot
AI
Feb 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This statement is incorrect. The codebase does have a migration framework. There is a src/lib/db/migrationRunner.ts file that manages versioned SQL migrations from src/lib/db/migrations/ directory. The migration system reads numbered SQL files (e.g., 001_initial_schema.sql) and tracks applied migrations in the _omniroute_migrations table. The claim "No migration framework" contradicts the actual implementation.
| 5. **Database migrations:** SQLite schema is managed inline in `src/lib/db/core.ts` and `src/lib/db/providers.ts`. No migration framework — schema changes are applied on startup. | |
| 5. **Database migrations:** SQLite schema is managed via a migration framework in `src/lib/db/migrationRunner.ts`, which applies versioned SQL files from `src/lib/db/migrations/` and tracks applied migrations in the `_omniroute_migrations` table. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description of the proxy pipeline delegating to a 'separate Express instance' is incorrect based on the provided code. The API routes in src/app/api/v1/ import and call the SSE handlers directly as functions within the Next.js process.
7. **The proxy pipeline is in `src/sse/`**, not in `src/app/api/v1/`. The API routes in `src/app/api/v1/` call the SSE handlers directly from the `open-sse` workspace within the Next.js process.
Copilot
AI
Feb 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The claim about "SSE server running on a separate Express instance" is inaccurate. The SSE proxy pipeline in src/sse/ is integrated within the Next.js application and delegates directly from the API routes (e.g., src/app/api/v1/chat/completions/route.ts calls handleChat from src/sse/handlers/chat.ts). There is no separate Express server instance for SSE handling - it's all within the Next.js app.
| 7. **The proxy pipeline is in `src/sse/`**, not in `src/app/api/v1/`. The API routes in `src/app/api/v1/` delegate to the SSE server running on a separate Express instance. | |
| 7. **The proxy pipeline is in `src/sse/`**, not in `src/app/api/v1/`. The API routes in `src/app/api/v1/` call into the SSE handlers in `src/sse/` within the same Next.js application (no separate Express server). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an inconsistency regarding the required Node.js version. This file specifies
>= 18, while theREADME.md(line 917) statesNode.js 20+. These should be aligned to avoid confusion during environment setup.