Files
OmniRoute/src/shared/constants/providers/noauth.ts
Diego Rodrigues de Sa e Souza 196375b8a9 feat(providers): add Augment (Auggie CLI) local provider (#5972)
* feat(providers): add Augment (Auggie CLI) local provider

Adds a new local, no-auth provider that spawns the user's local `auggie`
CLI (`auggie --print --quiet --model <m> --`) and pipes a flattened prompt
via stdin, wrapping stdout as an OpenAI-compatible SSE stream or a single
chat.completion JSON body depending on the request's `stream` flag.

Auth is delegated entirely to `auggie login` outside OmniRoute — the
connection is registered `noAuth: true` and `refreshCredentials()` is a
no-op, matching the existing `NOAUTH_PROVIDERS` credential-less flow
(synthetic connection, no DB row required). An optional connection row is
still admitted via `FREE_APIKEY_PROVIDER_IDS` for display/priority
tracking, consistent with `opencode`. The dashboard "Test Connection"
flow spawns `auggie --version` to confirm the CLI is installed and
runnable, since there is no API key to validate upstream.

Security hardening (spawn is an untrusted-input sink):
- Command injection: spawn no longer passes `shell: true` on Windows. The
  binary is resolved to a concrete path/name and argv is handed straight to
  the OS loader, so no cmd.exe metacharacter interpretation is possible.
- Argument injection (flag smuggling): `model` is validated against the
  registry allowlist (`auggieProvider.models`) before any spawn — a model
  that is unknown or starts with "-" is rejected with a sanitized error and
  the subprocess is never started. A trailing `--` marks end-of-options in
  the argv as belt-and-suspenders.

Co-authored-by: chamdanilukman <16629923+chamdanilukman@users.noreply.github.com>
Inspired-by: https://github.com/decolua/9router/pull/1200

* test(golden): regenerate translate-path for auggie provider

---------

Co-authored-by: chamdanilukman <16629923+chamdanilukman@users.noreply.github.com>
2026-07-03 00:35:43 -03:00

124 lines
4.1 KiB
TypeScript

/**
* Provider catalog data — extracted from providers.ts (god-file decomposition).
* Pure data literal; re-exported by the providers.ts barrel. No behavior change.
*/
export const NOAUTH_PROVIDERS = {
opencode: {
id: "opencode",
alias: "oc",
name: "OpenCode Free",
icon: "terminal",
color: "#E87040",
textIcon: "OC",
website: "https://opencode.ai",
noAuth: true,
hasFree: true,
serviceKinds: ["llm"],
authHint: "No API key required — uses OpenCode's public free endpoint.",
freeNote:
"No API key required — public OpenCode endpoint with Kimi, GLM, Qwen, MiMo, MiniMax models.",
notice: {
text: "OpenCode Free uses the public OpenCode endpoint (https://opencode.ai/zen/v1). No signup or API key needed. Rate limits apply.",
},
},
"duckduckgo-web": {
id: "duckduckgo-web",
alias: "ddgw",
name: "DuckDuckGo AI Chat",
icon: "auto_awesome",
color: "#DE5833",
textIcon: "DDG",
website: "https://duckduckgo.com/duckchat",
noAuth: true,
hasFree: true,
serviceKinds: ["llm"],
freeNote: "Free — anonymous access to multiple AI models via DuckDuckGo.",
authHint: "No credentials required — DuckDuckGo AI Chat is anonymous and free.",
},
theoldllm: {
id: "theoldllm",
alias: "tllm",
name: "The Old LLM (Free)",
icon: "auto_awesome",
color: "#8B5CF6",
textIcon: "TL",
website: "https://theoldllm.vercel.app",
noAuth: true,
hasFree: true,
serviceKinds: ["llm"],
freeNote:
"Free — GPT-5.4, Claude 4.6 Opus/Sonnet/Haiku, + more. No API key — tokens auto-generated via browser.",
authHint:
"No credentials required. The executor auto-generates access tokens via an embedded Playwright browser instance.",
},
chipotle: {
id: "chipotle",
alias: "pepper",
name: "Chipotle Pepper AI (Free)",
icon: "restaurant",
color: "#C41230",
textIcon: "🌯",
website: "https://amelia.chipotle.com",
noAuth: true,
hasFree: true,
serviceKinds: ["llm"],
freeNote:
"Free — Chipotle's Pepper AI (IPsoft Amelia). Anonymous sessions, no API key. Rate-limited.",
authHint:
"No credentials required. Uses Chipotle's public support chatbot via reverse-engineered SockJS/STOMP protocol.",
},
"veoaifree-web": {
id: "veoaifree-web",
alias: "veo-free",
name: "Veo AI Free",
icon: "videocam",
color: "#8B5CF6",
textIcon: "VF",
website: "https://veoaifree.com",
noAuth: true,
hasFree: true,
serviceKinds: ["video"],
freeNote: "Free video generation — VEO 3.1, Seedance. 6 requests/hour.",
authHint: "No auth required. Rate limited to 6 requests/hour per IP.",
},
mimocode: {
id: "mimocode",
alias: "mcode",
name: "MiMoCode (Free)",
icon: "devices",
color: "#FF6B35",
textIcon: "MC",
website: "https://mimo.mi.com",
noAuth: true,
hasFree: true,
serviceKinds: ["llm"],
freeNote:
"Free — Xiaomi MiMo models via bootstrap JWT auth. No API key required. Supports streaming.",
authHint:
"No API key required. The executor auto-generates JWT tokens via device fingerprint bootstrap.",
notice: {
text: "MiMoCode uses Xiaomi's public free AI endpoint with bootstrap-based JWT authentication. No signup needed. Rate limits apply.",
},
},
auggie: {
id: "auggie",
alias: "aug",
name: "Augment (Auggie CLI)",
icon: "terminal",
color: "#7C3AED",
textIcon: "AU",
website: "https://augmentcode.com",
noAuth: true,
hasFree: false,
serviceKinds: ["llm"],
isLocalCli: true,
freeNote:
"Local passthrough — runs the Augment CLI (`auggie`) on this machine. Auth is handled by `auggie login`, not OmniRoute.",
authHint:
"No API key stored by OmniRoute. Install the Auggie CLI and run `auggie login` on this machine, then OmniRoute spawns it locally for each request.",
notice: {
text: "Augment (Auggie CLI) requires the `auggie` binary installed and authenticated locally (`auggie login`). OmniRoute spawns it as a subprocess and never sees or stores your Augment credentials.",
},
},
};