Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
## Project

Unified AI proxy/router — route any LLM through one endpoint. Multi-provider support
with **236 provider entries** (OpenAI, Anthropic, Gemini, DeepSeek, Groq, xAI, Mistral, Fireworks,
with **237 provider entries** (OpenAI, Anthropic, Gemini, DeepSeek, Groq, xAI, Mistral, Fireworks,
Cohere, NVIDIA, Cerebras, Pollinations, Puter, Cloudflare AI, HuggingFace, DeepInfra,
SambaNova, Meta Llama API, Moonshot AI, AI21 Labs, Databricks, Snowflake, and many more)
with **MCP Server** (94 tools), **A2A v0.3 Protocol**, and **Electron desktop app**.

> **Live counts (v3.8.40)**: providers 236 · MCP tools 94 · MCP scopes 30 · A2A skills 6 ·
> **Live counts (v3.8.40)**: providers 237 · MCP tools 94 · MCP scopes 30 · A2A skills 6 ·
> open-sse services 298 · routing strategies 17 · auto-combo scoring factors 12 ·
> DB modules 94 · DB migrations 106 · base tables 17 · search providers 11 ·
> i18n locales 42. **Refresh with `npm run check:docs-all`.**
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ For full test matrix, see `CONTRIBUTING.md` → "Running Tests". For deep archit

## Project at a Glance

**OmniRoute** — unified AI proxy/router. One endpoint, 236 LLM providers, auto-fallback.
**OmniRoute** — unified AI proxy/router. One endpoint, 237 LLM providers, auto-fallback.

| Layer | Location | Purpose |
| ------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# 🚀 OmniRoute — The Free AI Gateway

### Never stop coding. Connect every AI tool to **236 providers** — **50+ free** — through one endpoint.
### Never stop coding. Connect every AI tool to **237 providers** — **50+ free** — through one endpoint.

**Plug Claude Code, Codex, Cursor, Cline, Copilot & Antigravity into FREE Claude / GPT / Gemini. Auto-fallback.**
<br/>
Expand Down Expand Up @@ -138,11 +138,11 @@

</div>

> One endpoint. **236 providers.** Never stop building — and let OmniRoute pick the cheapest one that works.
> One endpoint. **237 providers.** Never stop building — and let OmniRoute pick the cheapest one that works.

<table>
<tr>
<td width="33%" valign="top"><b>🚫 Never hit limits</b><br/><sub>Auto-fallback across 236 providers in milliseconds. Quota out? Next provider takes over — zero downtime.</sub></td>
<td width="33%" valign="top"><b>🚫 Never hit limits</b><br/><sub>Auto-fallback across 237 providers in milliseconds. Quota out? Next provider takes over — zero downtime.</sub></td>
<td width="33%" valign="top"><b>💸 Save up to 95% tokens</b><br/><sub>RTK + Caveman stacked compression cuts 15–95% of eligible tokens (~89% avg on tool-heavy sessions).</sub></td>
<td width="33%" valign="top"><b>🆓 $0 to start</b><br/><sub>50+ providers with a free tier, 11 free <i>forever</i> (Kiro, Qoder, Pollinations, LongCat…). No card needed.</sub></td>
</tr>
Expand Down Expand Up @@ -301,7 +301,7 @@ Result: 4 layers of fallback = zero downtime
- **💸 Cost telemetry everywhere** — `X-OmniRoute-*` cost/usage headers on every endpoint (including media), a non-token cost engine, a cache-HIT `X-OmniRoute-Cost-Saved` header, and per-key USD spend quotas. → [API Reference](docs/reference/API_REFERENCE.md)
- **🧠 Memory you control** — opt-in int8 vector quantization (Qdrant + sqlite-vec), memory off by default, and a per-request `x-omniroute-no-memory` header. → [Memory](docs/frameworks/MEMORY.md)
- **🛡️ Security** — a prompt-injection guard across every LLM route (backed by a red-team suite), plus a free DuckDuckGo last-resort web search. → [Guardrails](docs/security/GUARDRAILS.md)
- **🤝 More providers & agents** — Cursor Cloud Agent (a 4th cloud agent), CodeBuddy CN (`copilot.tencent.com`), a Google Flow video-generation provider, new gateways **DGrid** and **Pioneer AI** (Fastino Labs), inbound **xAI Grok** translators plus **Grok Build (xAI)** with an OAuth import-token flow, GPT-4 / GPT-4o-mini on the GitHub Copilot provider, multi-model **Factory Droid**, **ZenMux Free** (session-cookie free tier), **Alibaba DashScope** text-to-video (`wan2.7-t2v`), a refreshed 236-provider catalog (OrcaRouter, Wafer AI, OpenAdapter, dit.ai, TokenRouter, …), Vertex AI media generation (speech / transcription / music / video), and one-click account import from CLIProxyAPI (`~/.cli-proxy-api/`). → [Providers](docs/reference/PROVIDER_REFERENCE.md)
- **🤝 More providers & agents** — Cursor Cloud Agent (a 4th cloud agent), CodeBuddy CN (`copilot.tencent.com`), a Google Flow video-generation provider, new gateways **DGrid** and **Pioneer AI** (Fastino Labs), inbound **xAI Grok** translators plus **Grok Build (xAI)** with an OAuth import-token flow, GPT-4 / GPT-4o-mini on the GitHub Copilot provider, multi-model **Factory Droid**, **ZenMux Free** (session-cookie free tier), **Alibaba DashScope** text-to-video (`wan2.7-t2v`), a refreshed 237-provider catalog (OrcaRouter, Wafer AI, OpenAdapter, dit.ai, TokenRouter, …), Vertex AI media generation (speech / transcription / music / video), and one-click account import from CLIProxyAPI (`~/.cli-proxy-api/`). → [Providers](docs/reference/PROVIDER_REFERENCE.md)
- **⚡ Local performance & infra** — a one-click local Redis launcher (`omniroute redis up`, plus a dashboard Redis panel), one-click **Cloudflare Workers** and **Deno Deploy** relay deployers wired into the proxy pool, and an optional Bifrost Go sidecar that offloads the hottest relay path (`BIFROST_BASE_URL`, with automatic fallback to the TypeScript path on timeout). → [Environment](docs/reference/ENVIRONMENT.md)

<br/>
Expand Down Expand Up @@ -348,7 +348,7 @@ Result: 4 layers of fallback = zero downtime

</div>

> The most complete catalog of any open-source router: **236 providers**, **50+ with a free tier**, **11 free forever**.
> The most complete catalog of any open-source router: **237 providers**, **50+ with a free tier**, **11 free forever**.

<div align="center">

Expand Down Expand Up @@ -804,7 +804,7 @@ Compression: aggressive (~50%) → double your free quota · Cost: $0/mo
**Will I be charged by OmniRoute?** No — it's free, open-source software on your machine. You only pay paid providers directly. OmniRoute has no billing system.
**Are FREE providers really unlimited?** Mostly — Qoder, Pollinations, LongCat, and Cloudflare are free with no per-account credit cap. Kiro is free too but capped at ~50 credits/month per account. Stack multiple free providers in a combo and auto-fallback keeps you serving for $0.
**Will compression hurt quality?** No — it only compresses the **input**; code, URLs, JSON are always protected.
**Does it work where AI is blocked?** Yes — 3-level proxy + 1proxy marketplace reach all 236 providers.
**Does it work where AI is blocked?** Yes — 3-level proxy + 1proxy marketplace reach all 237 providers.

📖 [User Guide](docs/guides/USER_GUIDE.md) · [API Reference](docs/reference/API_REFERENCE.md) · [Environment Config](docs/reference/ENVIRONMENT.md)

Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ It provides a single OpenAI-compatible endpoint (`/v1/*`) and routes traffic acr

Core capabilities:

- OpenAI-compatible API surface for CLI/tools (236 providers, 67 executors)
- OpenAI-compatible API surface for CLI/tools (237 providers, 68 executors)
- Request/response translation across provider formats
- Model combo fallback (multi-model sequence)
- Structured combo steps (`provider + model + connection`) with runtime ordering by `compositeTiers`
Expand Down Expand Up @@ -933,7 +933,7 @@ All other providers (including custom compatible nodes) use the `DefaultExecutor

## Provider Compatibility Matrix

> **Note:** The matrix below is a representative sample of the 236 registered providers in
> **Note:** The matrix below is a representative sample of the 237 registered providers in
> OmniRoute v3.8.0. For the canonical and continuously-updated list, refer to
> [`docs/reference/PROVIDER_REFERENCE.md`](../reference/PROVIDER_REFERENCE.md) (auto-generated) or the source of
> truth at `src/shared/constants/providers.ts` (Zod-validated at load).
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/CODEBASE_DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ open-sse/

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

67 provider executors, each extending `BaseExecutor` (`base.ts`):
68 provider executors, each extending `BaseExecutor` (`base.ts`):

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

> Note: providers not listed here are served by `default.ts` using the generic
> OpenAI-compatible executor. The full provider catalog (236 entries) lives in
> OpenAI-compatible executor. The full provider catalog (237 entries) lives in
> `src/shared/constants/providers.ts`.

### 4.3 `open-sse/translator/`
Expand Down
9 changes: 5 additions & 4 deletions docs/reference/PROVIDER_REFERENCE.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
title: "Provider Reference"
version: 3.8.40
lastUpdated: 2026-06-28
lastUpdated: 2026-06-29
---

# Provider Reference

> **Auto-generated** from `src/shared/constants/providers.ts` — do not edit by hand.
> Regenerate with: `npm run gen:provider-reference`
> **Last generated:** 2026-06-28
> **Last generated:** 2026-06-29

Total providers: **236**. See category breakdown below.
Total providers: **237**. See category breakdown below.

## Categories

Expand Down Expand Up @@ -56,14 +56,15 @@ Use the dashboard at `/dashboard/providers` to enable, configure, and test each
| `windsurf` | `ws` | Windsurf (Devin CLI) | OAuth | [link](https://windsurf.com) | In the Windsurf / VS Code IDE, open the command palette and run `Windsurf: Provide Auth Token` (or click the Jupyter "Get Windsurf Authentication Token" button), then copy the shown token and paste it here. Note: opening windsurf.com/show-auth-token directly only renders a "Redirecting" page — the IDE must initiate the flow (it adds a `?state=...` param) for the token to appear. |
| `zed` | `zd` | Zed IDE | OAuth | [link](https://zed.dev) | Zed stores LLM provider credentials (OpenAI, Anthropic, Google, Mistral, xAI) in the OS keychain. Use the Import button below to discover and import them automatically. |

## Web Cookie Providers (23)
## Web Cookie Providers (24)

| ID | Alias | Name | Tags | Website | Notes |
|----|-------|------|------|---------|-------|
| `adapta-web` | `adp-web` | Adapta.org (Adapta One Web) | Web cookie | [link](https://agent.adapta.one) | Paste your __client cookie value from .clerk.agent.adapta.one (DevTools → Application → Cookies) |
| `blackbox-web` | `bb-web` | Blackbox Web (Subscription) | Web cookie | [link](https://app.blackbox.ai) | Paste your __Secure-authjs.session-token value or full cookie header from app.blackbox.ai |
| `chatgpt-web` | `cgpt-web` | ChatGPT Web (Plus/Pro) | Web cookie | [link](https://chatgpt.com) | Paste your __Secure-next-auth.session-token cookie value from chatgpt.com |
| `claude-web` | `cw` | Claude Web | Web cookie | [link](https://claude.ai) | Paste your session cookie from claude.ai |
| `copilot-m365-web` | `m365copilot` | Microsoft 365 Copilot (BizChat) | Web cookie | [link](https://m365.cloud.microsoft/chat) | Paste the access_token and account-specific Chathub path from the Microsoft 365 Copilot WebSocket URL. |
| `copilot-web` | `copilot` | Microsoft Copilot Web | Web cookie | [link](https://copilot.microsoft.com) | Paste your access_token from copilot.microsoft.com (or export a .har file from DevTools while logged in) |
| `deepseek-web` | `ds-web` | DeepSeek Web | Web cookie | [link](https://chat.deepseek.com) | Paste your userToken from chat.deepseek.com — DevTools → Application → Local Storage → userToken |
| `doubao-web` | `db` | Doubao Web (ByteDance) | Web cookie | [link](https://www.doubao.com) | Paste your session cookie from doubao.com (DevTools → Application → Cookies) |
Expand Down
2 changes: 2 additions & 0 deletions open-sse/config/providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ import { openrouterProvider } from "./registry/openrouter/index.ts";
import { orcarouterProvider } from "./registry/orcarouter/index.ts";
import { glhfProvider } from "./registry/glhf/index.ts";
import { copilot_webProvider } from "./registry/copilot-web/index.ts";
import { copilot_m365_webProvider } from "./registry/copilot-m365-web/index.ts";
import { stepfunProvider } from "./registry/stepfun/index.ts";
import { freemodel_devProvider } from "./registry/freemodel-dev/index.ts";
import { gitlawb_gmiProvider } from "./registry/gitlawb/gmi/index.ts";
Expand Down Expand Up @@ -274,6 +275,7 @@ export const REGISTRY: Record<string, RegistryEntry> = {
orcarouter: orcarouterProvider,
glhf: glhfProvider,
"copilot-web": copilot_webProvider,
"copilot-m365-web": copilot_m365_webProvider,
stepfun: stepfunProvider,
"freemodel-dev": freemodel_devProvider,
"gitlawb-gmi": gitlawb_gmiProvider,
Expand Down
12 changes: 12 additions & 0 deletions open-sse/config/providers/registry/copilot-m365-web/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { RegistryEntry } from "../../shared.ts";

export const copilot_m365_webProvider: RegistryEntry = {
id: "copilot-m365-web",
alias: "m365copilot",
format: "openai",
executor: "copilot-m365-web",
baseUrl: "wss://substrate.office.com/m365Copilot/Chathub",
authType: "apikey",
authHeader: "cookie",
models: [{ id: "copilot-m365", name: "Microsoft 365 Copilot (BizChat)" }],
};
55 changes: 54 additions & 1 deletion open-sse/executors/copilot-m365-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,61 @@ export const M365_INDIVIDUAL_DEFAULTS = {
scenario: "OfficeWebPaidConsumerCopilot",
} as const;

export const M365_DEFAULT_VARIANTS = [
"EnableMcpServerWidgets",
"feature.EnableMcpServerWidgets",
"feature.EnableLuForChatCIQ",
"feature.enableChatCIQPlugin",
"EnableRequestPlugins",
"feature.EnableSensitivityLabels",
"EnableUnsupportedUrlDetector",
"feature.IsCustomEngineCopilotEnabled",
"feature.bizchatfluxv3",
"feature.enablechatpages",
"feature.enableCodeCanvas",
"feature.turnOnDARecommendation",
"feature.IsStreamingModeInChatRequestEnabled",
"IncludeSourceAttributionsConcise",
"SkipPublishEmptyMessage",
"feature.EnableDeduplicatingSourceAttributions",
"Enable3PActionProgressMessages",
"feature.enableClientWebRtc",
"feature.EnableMeetingRecapOfSeriesMeetingWithCiq",
"feature.cwcfluxv3fe",
"feature.cwcfluxv3fem",
"feature.EnableReferencesListCompleteSignal",
"feature.StorageMessageSplitDisabled",
"feature.EnableCuaTakeControlApi",
"SingletonEnvOn",
"EnableComposeWidget",
"feature.cwcallowedos",
"feature.EnableMergingPureDeltas",
"feature.disabledisallowedmsgs",
"feature.enableCitationsForSynthesisData",
"feature.EnableConversationShareApis",
"feature.enableGenerateGraphicArtOptionsSet",
"cdximagen",
"feature.EnableUpdatedUXForConfirmationDialog",
"feature.EnableContentApiandDocTypeHtmlInRichAnswers",
"cdxgrounding_api_v2_rich_web_answers_reference_bottom_force",
"cdxenablerenderforisocomp",
"feature.EnableClientFileURLSupportForOfficeWebPaidCopilot",
"feature.EnableDesignEditorImageGrounding",
"feature.EnableDesignerEditor",
"feature.EnableSkipRehydrationForSpeCIdImages",
"feature.EnablePersonalizationForMSA",
"agt_bizchat_enableRichResponses",
"feature.EnableBase64DataInMessageAnnotations",
"feature.EnableSkipEmittingMessageOnFlush",
"feature.EnableRemoveEmptySourceAttributions",
"feature.EnableRemoveStreamingMode",
] as const;

export interface M365ConnectionParams {
host: string;
chathubPath: string; // "<user-oid>@<tenant-id>"
accessToken: string;
variants?: string;
}

/** A new 32-hex chat session id (== XRoutingParameterSessionKey == clientrequestid). */
Expand Down Expand Up @@ -63,7 +114,8 @@ export function resolveConnectionParams(
};
}
const host = (typeof psd.host === "string" && psd.host) || M365_INDIVIDUAL_DEFAULTS.host;
return { host, chathubPath, accessToken };
const variants = typeof psd.variants === "string" && psd.variants ? psd.variants : undefined;
return { host, chathubPath, accessToken, variants };
}

/**
Expand All @@ -80,6 +132,7 @@ export function buildWsUrl(params: M365ConnectionParams): string {
"X-SessionId": randomUUID(),
ConversationId: randomUUID(),
access_token: params.accessToken,
variants: params.variants ?? M365_DEFAULT_VARIANTS.join(","),
source: M365_INDIVIDUAL_DEFAULTS.source,
product: M365_INDIVIDUAL_DEFAULTS.product,
agentHost: M365_INDIVIDUAL_DEFAULTS.agentHost,
Expand Down
31 changes: 30 additions & 1 deletion open-sse/executors/copilot-m365-frames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,34 @@ export const ALLOWED_MESSAGE_TYPES = [
"GenerateContentQuery",
] as const;

export const M365_DEFAULT_OPTION_SETS = [
"search_result_progress_messages_with_search_queries",
"update_textdoc_response_after_streaming",
"deepleo_networking_timeout_10minutes_canmore",
"cwc_flux_image",
"cwc_code_interpreter",
"cwc_code_interpreter_amsfix",
"enable_msa_user",
"cwcgptv",
"flux_v3_gptv_enable_upload_multi_image_in_turn_wo_ch",
"gptvnorm2048",
"pdnascan",
"cwc_code_interpreter_citation_fix",
"code_interpreter_interactive_charts",
"cwc_code_interpreter_interactive_charts_inline_image",
"code_interpreter_matplotlib_patching",
"cwc_fileupload_odb",
"update_memory_plugin",
"add_custom_instructions",
"cwc_flux_v3",
"flux_v3_progress_messages",
"enable_batch_token_processing",
"enable_gg_gpt",
"flux_v3_image_gen_enable_non_watermarked_storage",
"flux_v3_image_gen_enable_story",
"rich_responses",
] as const;

/** Append the record separator to a JSON-serializable frame. */
export function encodeFrame(obj: unknown): string {
return JSON.stringify(obj) + RECORD_SEPARATOR;
Expand Down Expand Up @@ -118,7 +146,7 @@ export function buildChatInvocation(opts: ChatInvocationOptions): Record<string,
source: "officeweb",
clientCorrelationId: opts.traceId,
sessionId: opts.sessionId,
optionsSets: opts.optionsSets ?? [],
optionsSets: opts.optionsSets ?? [...M365_DEFAULT_OPTION_SETS],
streamingMode: "ConciseWithPadding",
spokenTextMode: "None",
options: {},
Expand Down Expand Up @@ -180,6 +208,7 @@ export function extractBotText(frame: Record<string, unknown> | null): string |
if (!m) continue;
const author = m.author;
const text = m.text;
if (m.messageType === "Progress" || m.contentType === "EarlyProgress") continue;
if ((author === "bot" || author === undefined) && typeof text === "string" && text.length > 0) {
return text;
}
Expand Down
Loading
Loading