Skip to content

docs: add llm.txt for LLM and contributor onboarding - #84

Merged
diegosouzapw merged 1 commit into
mainfrom
fix/issue-83-add-llm-txt
Feb 20, 2026
Merged

docs: add llm.txt for LLM and contributor onboarding#84
diegosouzapw merged 1 commit into
mainfrom
fix/issue-83-add-llm-txt

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Summary

Adds a comprehensive llm.txt file to the project root, following the llms.txt standard.

Content includes:

  • Project overview and purpose
  • Tech stack (Next.js 16, TypeScript, SQLite, React 19)
  • Full project structure with explanations
  • Key architectural decisions (7 decisions documented)
  • Main flows (Proxy Request, OAuth, Model Listing)
  • Important notes for LLMs analyzing the codebase
  • Links to all project resources

Why?

This file enables any LLM (or new contributor) to quickly understand the project's architecture, patterns, and conventions — reducing onboarding time and repetitive explanations.

Closes #83

Copilot AI review requested due to automatic review settings February 20, 2026 01:16
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@github-actions

Copy link
Copy Markdown
Contributor

@codex review

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @diegosouzapw, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new llm.txt file, adhering to the llms.txt standard, to the project's root directory. This document serves as a detailed guide, outlining the project's core components, technical foundation, structural layout, and critical design choices. Its primary purpose is to streamline the comprehension of the codebase for both AI models and new developers, facilitating quicker integration and reducing the need for repetitive explanations.

Highlights

  • New llm.txt file added: A comprehensive llm.txt file has been added to the project root, following the llms.txt standard. This file details the project's overview, tech stack, full structure, key architectural decisions, main operational flows, and important notes specifically for LLMs analyzing the codebase.
  • Improved onboarding for LLMs and contributors: The addition of llm.txt aims to significantly reduce onboarding time for both large language models and new human contributors by providing a centralized, structured resource for understanding the project's architecture, patterns, and conventions.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • llm.txt
    • Added a new llm.txt file containing detailed project documentation for LLMs and new contributors.
Activity
  • No human activity has occurred on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@diegosouzapw
diegosouzapw merged commit c80f054 into main Feb 20, 2026
6 checks passed
@diegosouzapw
diegosouzapw deleted the fix/issue-83-add-llm-txt branch February 20, 2026 01:16

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The addition of llm.txt is a valuable resource for onboarding both human contributors and LLMs. However, the document contains several technical inaccuracies regarding the tech stack versions, the database migration strategy, and the architectural implementation of the proxy pipeline. Correcting these will ensure that the documentation remains a reliable source of truth for the project's architecture and conventions.

Comment thread llm.txt
## Tech Stack

- **Runtime:** Node.js >= 18
- **Framework:** Next.js 16 (App Router) with TypeScript

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Next.js 16 is not yet released (the current stable version is 15). This appears to be a typo and should be corrected to reflect the actual version used in the project.

- **Framework:** Next.js 15 (App Router) with TypeScript

Comment thread llm.txt

## Tech Stack

- **Runtime:** Node.js >= 18

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is an inconsistency regarding the required Node.js version. This file specifies >= 18, while the README.md (line 917) states Node.js 20+. These should be aligned to avoid confusion during environment setup.

- **Runtime:** Node.js >= 20

Comment thread llm.txt

4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Comment thread llm.txt

6. **Tests use Node.js built-in test runner:** Run `npm test` or `node --test tests/unit/*.test.mjs`. Playwright is used for E2E tests.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive llm.txt file to the project root, following the llmstxt.org standard to facilitate LLM and contributor onboarding. The file provides a structured overview of OmniRoute's architecture, tech stack, project structure, key architectural decisions, main flows, and important implementation notes.

Changes:

  • Added llm.txt with project overview, tech stack (Next.js 16, React 19, TypeScript, SQLite), complete project structure, 7 key architectural decisions, 3 main flows (Proxy Request, OAuth, Model Listing), important notes for LLMs, and links to project resources

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread llm.txt
├── open-sse/ # Standalone SSE server (npm workspace)
│ ├── config/ # Model registries (embedding, image, audio, rerank, moderation)
│ ├── handlers/ # Request handlers per API type
│ └── translators/ # Format translators (OpenAI ↔ Claude ↔ Gemini ↔ Responses)

Copilot AI Feb 20, 2026

Copy link

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/.

Suggested change
│ └── translators/ # Format translators (OpenAI ↔ Claude ↔ Gemini ↔ Responses)
│ └── translator/ # Format translators (OpenAI ↔ Claude ↔ Gemini ↔ Responses)

Copilot uses AI. Check for mistakes.
Comment thread llm.txt

1. **OpenAI-compatible API surface:** All incoming requests follow the OpenAI API format (`/v1/chat/completions`, `/v1/models`, etc.). This makes OmniRoute a drop-in replacement for any tool that supports custom OpenAI endpoints.

2. **Provider abstraction via format translators:** Each AI provider (Claude, Gemini, etc.) has a translator in `open-sse/translators/` that converts between the OpenAI format and the provider's native format. This happens transparently.

Copilot AI Feb 20, 2026

Copy link

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 uses AI. Check for mistakes.
Comment thread llm.txt

3. **The `open-sse/` directory is a separate npm workspace** with its own config, handlers, and translators. It handles the actual SSE streaming and format translation.

4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.

Copilot AI Feb 20, 2026

Copy link

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
Comment thread llm.txt

4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.

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.

Copilot AI Feb 20, 2026

Copy link

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
Comment thread llm.txt

6. **Tests use Node.js built-in test runner:** Run `npm test` or `node --test tests/unit/*.test.mjs`. Playwright is used for E2E tests.

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.

Copilot AI Feb 20, 2026

Copy link

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.

Suggested change
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).

Copilot uses AI. Check for mistakes.
Comment thread llm.txt
- **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

Copilot AI Feb 20, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package used is "bcryptjs" not "bcrypt". While they are functionally similar, the actual dependency in package.json is "bcryptjs": "^3.0.3".

Suggested change
- **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 uses AI. Check for mistakes.
diegosouzapw added a commit that referenced this pull request Mar 7, 2026
Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adicionar llm.txt para explicação do projeto via LLM

2 participants