mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 20:32:20 +03:00
* fix(gemini): preserve structured tool calls for antigravity * fix(gemini): parse prefixed textual tool calls * fix(antigravity): preserve textual SSE tool calls * fix(stream): normalize textual passthrough tool calls * fix(stream): normalize split textual tool calls * fix(stream): suppress malformed textual tool calls * fix(stream): suppress compact malformed tool calls * fix(stream): emit structured textual tool calls * fix(stream): suppress unknown textual tool calls * fix(stream): normalize responses textual tool calls * chore: ignore .claude/settings.local.json (per-user Claude Code permissions) * fix(opencode-go): route qwen3.x via claude messages + repair fixMissingToolResponses for Claude-shape upstreams (#2791) Integrated into release/v3.8.6 * fix: resolve npm install warnings — remove dead deps, relax engine constraint (#2792) Integrated into release/v3.8.6 * fix: register missing web-cookie validators (claude-web, gemini-web, copilot-web, t3-web) (#2793) Integrated into release/v3.8.6 * fix: Error: Unable to inspect existing database #2771 (#2795) Integrated into release/v3.8.6 * fix(oauth): repair Google loopback callback flow (#2796) Integrated into release/v3.8.6 * feat(logs): add clean history button (#2799) Integrated into release/v3.8.6 * [codex] home: restore settings-driven home layout and quota auto-refresh (#2800) Integrated into release/v3.8.6 * fix(gemini): emit signaturelessToolCallMode:text for GEMINI format models (#2801) Integrated into release/v3.8.6 * feat(modelSpecs): align opencode-go family with upstream provider limits (#2802) Integrated into release/v3.8.6 * chore: apply unit test fixes, polyfills, and environment precedence fixes * docs(agents): atualiza fluxos de release e triagem Expande os workflows de release para incluir auditoria de segurança, CHANGELOG completo por commits, quality gate obrigatório, homologação em VPS local, publicação oficial, deploy em Akamai e validação de artefatos. Reorganiza a triagem de features com arquivos permanentes por bucket, suporte a itens em andamento, regra de reclaim após 15 dias e novo tratamento para ideias viáveis catalogadas. Corrige a orientação de revisão de discussões para usar a ordem cronológica real dos comentários e respostas ao identificar a última atividade. * fix(lockout): classify Gemini Antigravity resource exhaustion as quota_exhausted * fix(reasoning): gate replay by interleaved field * docs(rule-16): permit human Co-authored-by, restrict only AI/bot trailers Rule #16 previously banned all `Co-Authored-By` trailers absolutely. That blocked the upstream-port workflows (`/port-upstream-features` and `/port-upstream-issues`), which must credit human upstream PR authors and issue reporters in OmniRoute commits. Refine the rule to ban only AI/bot-attributed trailers (Claude, GPT, Copilot, Bot; anthropic.com / openai.com / bot-owned noreply.github.com emails) while allowing standard human `Co-authored-by: Name <email>` attribution. Sync the rule across the source CLAUDE.md, the E2E shakedown doc note, and 41 i18n translations. * fix(gitlawb): add specialty validators for connection test — bypass /models probe GitLawB OpenGateway API (xiaomi-mimo compatible) does not expose a /models endpoint, causing validateOpenAILikeProvider to 404 on the initial probe and report 'Provider validation endpoint not supported'. Add specialty validators for both gitlawb and gitlawb-gmi that follow the same pattern as the existing xiaomi-mimo validator: skip GET /models, validate directly via POST /chat/completions with a minimal test message. Any 401/403 response means an invalid key; all other responses mean auth is OK. Fixes test-connection returning 404 for GitLawB providers. * test(gitlawb): add 12 unit tests for gitlawb and gitlawb-gmi specialty validators Covers success, auth failure (401/403), non-auth acceptance (400/422/429), network errors, and custom baseUrl overrides for both providers. * feat(gitlawb): serve models from static registry without API-unavailable warning GitLawB's OpenGateway API does not expose a /models endpoint per provider-path. Previously the models route fell through to the generic fallback which returned static catalog models with the misleading 'API unavailable — using local catalog' warning. Now gitlawb and gitlawb-gmi are handled as static model providers (same pattern as reka and qwen OAuth) — models are served from the provider registry without any warning, since all registered models are functional via POST /chat/completions. * refactor(gitlawb): extract shared opengateway validator factory, fix docs path in test - Extract gitlawb/gitlawb-gmi validators into buildOpengatewayValidator factory - Fix dockerignore-docs-coverage test: update stale docs/AUTO-COMBO.md -> docs/routing/AUTO-COMBO.md * fix(reasoning): guard interleaved capability lookup * feat(gitlawb): dynamic model fetch with gmi-cloud fallback Hybrid approach: - gitlawb (xiaomi-mimo): dynamic /models endpoint → 356 models - gitlawb-gmi (gmi-cloud): 404 fallback → local catalog gracefully Mimics Gitlawb/openclaude's model-routing pattern * i18n(pt-BR): complete missing translations and sync with en.json * feat(build): nix multi-OS package manager install (#2806) Integrated into release/v3.8.6 * fix(i18n): translate 144 new __MISSING__ pt-BR strings (#2816) Integrated into release/v3.8.6 * chore(docs): set coverage gate to 40/40/40/40 in CLAUDE.md Aligns the documented coverage gate with the v3.8.6 release decision (lowered from 75/75/75/70). Matches the threshold already set in package.json by the large feature PRs (planos 11-22). * fix(cli): respect PORT env var in serve command (#2845) Integrated into release/v3.8.6. * fix(deepseek-web): return 400 when client sends tools[] - chat.deepseek.com has no tool support (#2854) Integrated into release/v3.8.6. * fix(qoder): reject invalid/expired PATs returning Cosy 500 error (#2860) Integrated into release/v3.8.6. * fix(cli): register openclaw in tool-detector (#2833) (#2850) Integrated into release/v3.8.6. * fix(api): include noAuth providers in /v1/models catalog (#2798) (#2814) Integrated into release/v3.8.6. * fix(combo): resolve custom provider targets via combo name (#2778) (#2812) Integrated into release/v3.8.6. * fix(translator): strip safety_identifier in openai-responses cleanup (#2770) (#2809) Integrated into release/v3.8.6. * fix(quota): honor explicit per-connection preflight opt-out (#2831) (#2844) Integrated into release/v3.8.6. * fix(usage): un-invert GitHub Copilot Free/limited quota — limited_user_quotas is remaining (#2876) (#2881) Integrated into release/v3.8.6. * fix(nous-research): correct baseUrl to include /chat/completions (#2826) (#2835) Integrated into release/v3.8.6. * fix(opencode): qwen3.x max/plus models lack vision support (#2822) (#2836) Integrated into release/v3.8.6. * fix(translator): pass-through tool_search built-in tool type (#2766) (#2811) Integrated into release/v3.8.6. * fix(github): route claude-opus-4.6 via chat completions (#2821) Integrated into release/v3.8.6. * docs(oauth): add Windsurf login fix design (Phase 1 hotfix + Phase 2 Firebase OAuth) Two-phase plan to fix the broken Windsurf OAuth flow: - Phase 1: drop the dead app.devin.ai/editor/signin PKCE path, promote import-token from windsurf.com/show-auth-token as the primary path - Phase 2: port Firebase OAuth + RegisterUser flow from fendoushaonian/WindSurf-gRPC-API for full browser-based automation Spec only - no code changes yet. * docs(plan): Phase 1 windsurf login hotfix implementation plan 10 tasks covering: - TDD assertions for flowType + 410 Gone responses - Provider switch to import_token - Route handler retiring authorize/start-callback-server/poll-callback - OAuthModal UI override - i18n sync - Verification + PR steps * fix(cli): replace cli-table3 with hand-rolled formatter (#2752) (#2813) Integrated into release/v3.8.6. * fix(skills): skip interception for unregistered client-native tools (#2815) (#2817) Integrated into release/v3.8.6. * feat(sse): add RTK filters for kubectl, docker-build, composer, gh (#2824) Integrated into release/v3.8.6. * fix(geminiHelper): support rec.image content shape + warn on dropped remote URLs (refs #2807) (#2855) Integrated into release/v3.8.6. * fix(cli): allow nullable/optional apiKey in cliMitmStartSchema (#2857) Integrated into release/v3.8.6. * fix(combo): preserve system messages during context handoff summary generation (#2865) Integrated into release/v3.8.6. * fix: wire CLIProxyAPI fallback settings into chatCore routing engine (#2866) Integrated into release/v3.8.6. * fix(usage): add opencode quota fetcher (#2852) (#2867) Integrated into release/v3.8.6. * feat(claude): default xhigh support for newer Opus models (#2874) Integrated into release/v3.8.6. * fix(cli): restore omniroute logs command stream (#2756) (#2810) Integrated into release/v3.8.6. * fix(combo): normalize upstream Headers for Node 24 undici interop (#2751) (#2823) Integrated into release/v3.8.6. * Rename proxy log Public IP to Client IP (#2880) Integrated into release/v3.8.6. * fix(claude): preserve max effort for supported models (#2875) Integrated into release/v3.8.6. * fix(oauth): switch windsurf provider to import_token flow The PKCE auth URL targeting app.devin.ai/editor/signin returns 404 post-rebrand. Until Phase 2 ports Firebase OAuth + RegisterUser, the only supported path is import-token via windsurf.com/show-auth-token. - windsurf.ts: drop buildAuthUrl, set flowType=import_token - generateAuthData returns supported:false + helpful error for windsurf/devin-cli - tests: assert flowType + disabled stub * fix(oauth): return 410 Gone for retired windsurf/devin-cli PKCE actions start-callback-server, authorize, and poll-callback (GET + POST) now return 410 Gone with a pointer to /import-token. The 410 short-circuit runs before auth so the response is honest about the action being permanently gone, not gated. Codex PKCE flow unchanged. Tests: 5 new assertions cover GET + POST 410 paths and a Codex regression check. * refactor(oauth): annotate retired PKCE fields in WINDSURF_CONFIG No behaviour change - comment-only update documenting that authorizeUrl, codeChallengeMethod, callbackPort, callbackPath, apiServerUrl, and exchangePath are no longer consumed. Active fields (inferenceUrl, showAuthTokenUrl, firebaseApiKey, ideName) called out separately. * fix(cli,docs): use requireCliToolsAuth in logs route + document OPENCODE quota env Post-merge contract fixes for v3.8.6: - src/app/api/cli-tools/logs/route.ts (#2810) now uses the shared requireCliToolsAuth guard (param renamed req->request) to satisfy the cli-tools-auth-hardening contract test. - Document OMNIROUTE_OPENCODE_QUOTA_URL (#2867) in docs/reference/ENVIRONMENT.md to satisfy the env/docs sync contract. * fix(dashboard): force import-token panel for windsurf/devin-cli Phase 1 hotfix: hide the 'Browser Login' tab and start in Paste API Key mode. Removes windsurf/devin-cli from PKCE_CALLBACK_SERVER_PROVIDERS so no callback server is started for them. Codex still uses the PKCE flow. The 'Get token' link continues to point at windsurf.com/show-auth-token via the existing supportsTokenPaste form copy. * fix(oauth): windsurf import-token mapTokens signature mismatch The route at `src/app/api/oauth/[provider]/[action]/route.ts` invokes `providerData.mapTokens({ accessToken: token })` (object), matching the cursor/kiro signature. The windsurf provider was declared with `mapTokens(token: string)` instead, so the entire object was stored as `accessToken`. When the connection record reached the SQLite layer it crashed with: SQLite3 can only bind numbers, strings, bigints, buffers, and null Fix by aligning windsurf's `mapTokens` signature with the route caller and the cursor/kiro convention. Also dedupe a copy-pasted second `if (action === "import-token")` block in the route handler — the second block was unreachable but identical to the first. Adds two regression tests asserting that `provider.mapTokens({ accessToken })` returns a string `accessToken` for both windsurf and devin-cli, so a future signature drift trips the gate instead of the SQLite bind error in production. * feat(compression): expand pt-BR pack with troglodita rules (15 → 49) (#2818) Integrated into release/v3.8.6 * fix(sse): repair RTK engine defaults so dedup and direct calls work (#2825) Integrated into release/v3.8.6 * fix(mcp): redirect console.log/warn to stderr in --mcp stdio mode (#2840) Integrated into release/v3.8.6 * fix(gemini-cli): prefer real project IDs over default-project (#2841) Integrated into release/v3.8.6 * fix(opencode-go): add provider limits quota fetcher (#2861) Integrated into release/v3.8.6 * Audit & add web cookie providers: fix 4 missing registry entries + DuckDuckGo (#2862) Integrated into release/v3.8.6 * fix(antigravity): harden signatureless tool history (#2878) Integrated into release/v3.8.6 * fix: provider model sync pruning and dynamic antigravity MITM proxy mappings (#2886) Integrated into release/v3.8.6 * feat(usage): per-API-key token limits scoped to model/provider/global (#2888) Integrated into release/v3.8.6 * fix(audio): build multipart body manually to preserve Content-Type (#2842) Integrated into release/v3.8.6 * refactor: remove agent skill documentation files and streamline maintenance workflows * test(stabilization): resolve unit test failures in blackbox-web, schema-coercion, translator-helper-branches, usage-service-hardening, and audio-transcription * fix(security): mitigate Socket.dev supply-chain findings + secrets opt-in + minimal build profile (#2863) (#2871) Two real security gaps closed and four cosmetic Socket.dev fingerprints removed. See docs/security/SOCKET_DEV_FINDINGS.md for the per-finding maintainer attestation. Real bugs fixed: - cloudSync: HMAC verification of `X-Cloud-Sig` + opt-in `OMNIROUTE_CLOUD_SYNC_SECRETS=true` before overwriting `accessToken` / `refreshToken` / `providerSpecificData` from a remote response. Closes the silent-credential-swap surface (a misconfigured or hostile CLOUD_URL could previously replace local tokens unverified). - Zed import: split into 2-step `/discover` + `/import` flow. `/import` now requires `confirmedAccounts: [{ service, account, fingerprint }]` and re-reads the keychain server-side to filter by fingerprint, so a tampered discover response cannot trick the endpoint into saving an unrelated token. Cosmetic Socket.dev mitigations: - runElevatedPowerShell writes the elevated payload to a per-call temp `.ps1` file (mode 0o600) and references it via `-File`. Removes the textbook `-EncodedCommand <base64utf16le>` pattern flagged as malware by Socket's AI classifier. - Maintainer attestation `SECURITY-AUDITOR-NOTE:` blocks added at every flagged call site pointing to `docs/security/SOCKET_DEV_FINDINGS.md`. Build-time hardening: - `OMNIROUTE_BUILD_PROFILE=minimal` (`npm run build:secure`) physically removes the four sensitive modules from the standalone bundle via webpack `NormalModuleReplacementPlugin`. Stubs throw `FeatureDisabledError` at runtime. Intended for the `omniroute-secure` artifact. Tests: - 24 new unit tests in `tests/unit/security/` covering the wrapper builder, HMAC verification (4 cases), credential fingerprint determinism (5 cases), confirmedAccounts validation + fingerprint filtering (6 cases), and the minimal-build stubs (5 cases). Docs: - New `docs/security/SOCKET_DEV_FINDINGS.md` — per-finding attestation. - New `socket.yml` — Socket.dev v2 config pointing at the attestation. - Updated `SECURITY.md` — supply-chain scanner section. - Updated `.env.example` — three new env vars documented. Backwards compatibility: - Cloud sync token overwrite is OFF by default. Users who relied on it must set `OMNIROUTE_CLOUD_SYNC_SECRETS=true`. Breaking change documented in CHANGELOG. - Zed import 2-step is the new default; legacy 1-step preserved behind `OMNIROUTE_ZED_IMPORT_LEGACY_ONE_STEP=true` and will be removed in v3.9. Closes #2863 * fix(security): redact public Firebase Web key from windsurf spec; doc SHA-256 cache-key rationale (#2894) Two security-scanning findings on release/v3.8.6: - Secret-scanning alert 7 (google_api_key): the windsurf login-fix design spec embedded the literal public Firebase Web API key on two lines. Firebase Web API keys are non-sensitive by design (they identify the project; access is gated by Firebase Security Rules + key restrictions), but the literal trips secret scanning. Redacted to a placeholder; the embedded default still goes through resolvePublicCred per rule #11. - Code-scanning alert 261 (js/insufficient-password-hash): tokenCacheKey() uses SHA-256 to derive an in-memory cache key from the session token, not for password-at-rest storage. Added a comment documenting why CWE-916 KDFs do not apply (false positive). * fix(ci): resolve release/v3.8.6 gate failures (docs-sync, any-budget, pack-artifact) (#2895) * fix(ci): resolve release/v3.8.6 gate failures (docs-sync, any-budget, pack-artifact) Three CI gates failed on release/v3.8.6 (run 26630300877): - docs-sync: CHANGELOG had a spurious "## [3.8.6-patch]" section above "## [3.8.6]", so the latest release no longer matched package.json (3.8.6) and the 41 i18n CHANGELOG mirrors were flagged as missing that section. Fold the lone #2752 entry into [3.8.6] and drop the patch heading. - any-budget:t11: open-sse/handlers/chatCore.ts regressed to 1 explicit `any` (budget 0). Type the persist callback arg as Record<string, unknown>, which matches runWithOnPersist's RefreshPersistFn contract exactly. - pack-artifact: open-sse/utils/setupPolyfill.ts ships via package.json "files" (bin/omniroute.mjs imports it at startup) but was missing from the pack policy allowlist. Allow it and add a regression test. * fix(security): redact public Firebase Web key from windsurf spec Redact the literal public Firebase Web API key (secret-scanning #7) to a placeholder, mirroring the redaction on release/v3.8.6 (PR #2894) and the windsurf fix branch. Non-sensitive public Web key; trips secret scanning. * feat(combo): Zero-Latency Combos (Hedging, Proactive Compression, Predictive TTFT) (#2868) * feat(combo): implement zero-latency combo optimizations (hedging, proactive compression, predictive TTFT) * fix(combo): fix predictive TTFT skip logic and unhandled promise rejections --------- Co-authored-by: Automation <automation@omniroute> * feat: implement automated skill workflows and update system configuration and validation schemas * test: eliminate dynamic cast warnings in cloud-sync unit test * test: isolate services-branch-hardening database directory to avoid concurrency issues * feat(providers): add 7 new web-cookie providers + research catalog + discovery tool New providers: - huggingchat: free LLM chat via huggingface.co/chat (no subscription) - phind: free dev-focused AI chat via phind.com/api/agent - poe-web: multi-model chat via poe.com GraphQL (p-b cookie) - venice-web: privacy-focused AI chat via venice.ai (session cookie) - v0-vercel-web: Vercel v0 code gen via v0.dev (session cookie) - kimi-web: Moonshot Kimi chat via kimi.moonshot.cn (session cookie) - doubao-web: ByteDance Doubao chat via doubao.com (session cookie) Additional: - Research catalog: docs/research/UNLIMITED_LLM_ACCESS.md - Discovery tool design + stub: src/lib/discovery/ + migration 073 - Unit tests: 33 tests for all 7 providers - Shared helpers consolidated in error.ts (slop cleanup) - All registered in WEB_COOKIE_PROVIDERS + providerRegistry + webSessionCredentials Closes #2885 * fix(typecheck): resolve typecheck errors in combo spec and compression modules * feat(api,oauth): add `agy` (Antigravity CLI) standalone provider with CLI token import (#2899) Add a standalone OAuth provider `agy` (Antigravity CLI) next to gemini-cli/antigravity. It reuses the antigravity inference backend (identical Google client_id + daily-cloudcode-pa.googleapis.com endpoint, executor and token-refresh) but ships its own model catalog — including the Claude models the backend exposes (claude-opus-4-6-thinking, claude-sonnet-4-6) — its own account pool, and four ways to connect: - token-file import (paste/upload the agy oauth token JSON) - auto-detect a local CLI login (~/.gemini/antigravity-cli/antigravity-oauth-token) - browser OAuth (via the shared OAuthModal Google loopback flow) - bulk / ZIP import New routes: POST /api/providers/agy-auth/{import,import-bulk,zip-extract,apply-local}. Catalog pinned from the live :fetchAvailableModels endpoint. Docs (openapi.yaml, ENVIRONMENT.md, .env.example, CHANGELOG) updated; new unit tests for registration, the token parser, and route auth-hardening. * fix(security): redact public Firebase Web key from windsurf spec (#2896) Redact the literal public Firebase Web API key (secret-scanning #7) to a placeholder. Firebase Web API keys are non-sensitive by design but the literal trips GitHub secret scanning. Mirrors the redaction landed on release/v3.8.6 (PR #2894). Embedded default still flows through resolvePublicCred (rule #11). * Pr 2871 (#2897) * fix(security): mitigate Socket.dev supply-chain findings + secrets opt-in + minimal build profile (#2863) Two real security gaps closed and four cosmetic Socket.dev fingerprints removed. See docs/security/SOCKET_DEV_FINDINGS.md for the per-finding maintainer attestation. Real bugs fixed: - cloudSync: HMAC verification of `X-Cloud-Sig` + opt-in `OMNIROUTE_CLOUD_SYNC_SECRETS=true` before overwriting `accessToken` / `refreshToken` / `providerSpecificData` from a remote response. Closes the silent-credential-swap surface (a misconfigured or hostile CLOUD_URL could previously replace local tokens unverified). - Zed import: split into 2-step `/discover` + `/import` flow. `/import` now requires `confirmedAccounts: [{ service, account, fingerprint }]` and re-reads the keychain server-side to filter by fingerprint, so a tampered discover response cannot trick the endpoint into saving an unrelated token. Cosmetic Socket.dev mitigations: - runElevatedPowerShell writes the elevated payload to a per-call temp `.ps1` file (mode 0o600) and references it via `-File`. Removes the textbook `-EncodedCommand <base64utf16le>` pattern flagged as malware by Socket's AI classifier. - Maintainer attestation `SECURITY-AUDITOR-NOTE:` blocks added at every flagged call site pointing to `docs/security/SOCKET_DEV_FINDINGS.md`. Build-time hardening: - `OMNIROUTE_BUILD_PROFILE=minimal` (`npm run build:secure`) physically removes the four sensitive modules from the standalone bundle via webpack `NormalModuleReplacementPlugin`. Stubs throw `FeatureDisabledError` at runtime. Intended for the `omniroute-secure` artifact. Tests: - 24 new unit tests in `tests/unit/security/` covering the wrapper builder, HMAC verification (4 cases), credential fingerprint determinism (5 cases), confirmedAccounts validation + fingerprint filtering (6 cases), and the minimal-build stubs (5 cases). Docs: - New `docs/security/SOCKET_DEV_FINDINGS.md` — per-finding attestation. - New `socket.yml` — Socket.dev v2 config pointing at the attestation. - Updated `SECURITY.md` — supply-chain scanner section. - Updated `.env.example` — three new env vars documented. Backwards compatibility: - Cloud sync token overwrite is OFF by default. Users who relied on it must set `OMNIROUTE_CLOUD_SYNC_SECRETS=true`. Breaking change documented in CHANGELOG. - Zed import 2-step is the new default; legacy 1-step preserved behind `OMNIROUTE_ZED_IMPORT_LEGACY_ONE_STEP=true` and will be removed in v3.9. Closes #2863 * feat: implement automated skill workflows and update system configuration and validation schemas * test: eliminate dynamic cast warnings in cloud-sync unit test * test: isolate services-branch-hardening database directory to avoid concurrency issues * chore(docs): refresh generated docs collection index Update the generated Fumadocs browser collection mapping to keep documentation imports in sync with the current docs structure. * docs: update generated browser docs collection manifest Refresh the generated Fumadocs browser collection mapping so the docs site can resolve the current documentation files correctly. --------- Co-authored-by: OpenClaw <openclaw@kuzhomesrv.local> Co-authored-by: Dmitry Kuznetsov <139351986+dmitry@users.noreply.local> Co-authored-by: KuzyaBot <kuzya@local> Co-authored-by: JeferssonLemes <jeferssondev@gmail.com> Co-authored-by: Paijo <14921983+oyi77@users.noreply.github.com> Co-authored-by: Markus Hartung <mail@hartmark.se> Co-authored-by: akarray <akarray@users.noreply.github.com> Co-authored-by: Apostol Apostolov <theapoapostolov@gmail.com> Co-authored-by: Hernan Javier Ardila Sanchez <hjasgr@gmail.com> Co-authored-by: Dmitry Kuznetsov <dmitry@kuznetsov.me> Co-authored-by: Nikolay Alafuzov <alafuzov_nn@rusklimat.ru> Co-authored-by: oyi77 <oyi77@users.noreply.github.com> Co-authored-by: Ronaldo Davi <alltomatos@users.noreply.github.com> Co-authored-by: levonk <277861+levonk@users.noreply.github.com> Co-authored-by: Lenine Júnior <lenine@engrene.com.br> Co-authored-by: Annas Alghoffar <aag.annas@gmail.com> Co-authored-by: Tushar Agarwal <76201310+Tushar49@users.noreply.github.com> Co-authored-by: GreatLiu <eurasiaxz@qq.com> Co-authored-by: yuna amelia <230527278+yunaamelia@users.noreply.github.com> Co-authored-by: Randi <55005611+rdself@users.noreply.github.com> Co-authored-by: Container <78986709+disonjer@users.noreply.github.com> Co-authored-by: nickwizard <35692452+nickwizard@users.noreply.github.com> Co-authored-by: Rajvardhan Patil <rajvardhanpatil7890@gmail.com> Co-authored-by: Raxxoor <manker_lol@hotmail.com> Co-authored-by: Muhammad Mugni Hadi <mugnimaestra3@gmail.com> Co-authored-by: mi <123757457+soyelmismo@users.noreply.github.com> Co-authored-by: Automation <automation@omniroute>
3299 lines
87 KiB
YAML
3299 lines
87 KiB
YAML
openapi: 3.1.0
|
|
info:
|
|
title: OmniRoute API
|
|
version: 3.8.6
|
|
description: |
|
|
OmniRoute is a local-first AI API proxy router. It provides an OpenAI-compatible
|
|
endpoint that routes requests to multiple AI providers with load balancing,
|
|
failover, and usage tracking.
|
|
|
|
## Base URLs
|
|
- **Local**: `http://localhost:20128`
|
|
|
|
## Authentication
|
|
All proxy endpoints require a Bearer token (API key managed via the dashboard).
|
|
Management endpoints are protected when `requireLogin` is enabled.
|
|
contact:
|
|
name: OmniRoute
|
|
license:
|
|
name: MIT
|
|
|
|
servers:
|
|
- url: http://localhost:20128
|
|
description: Local development
|
|
|
|
tags:
|
|
- name: Chat
|
|
description: OpenAI-compatible chat completions
|
|
- name: Messages
|
|
description: Anthropic-compatible messages
|
|
- name: Responses
|
|
description: OpenAI Responses API
|
|
- name: Embeddings
|
|
description: Text embedding generation
|
|
- name: Images
|
|
description: Image generation
|
|
- name: Audio
|
|
description: Audio speech and transcription
|
|
- name: Moderations
|
|
description: Content moderation
|
|
- name: Rerank
|
|
description: Document reranking
|
|
- name: Models
|
|
description: Available model listing
|
|
- name: Providers
|
|
description: Provider connection management
|
|
- name: Provider Nodes
|
|
description: Provider node configuration
|
|
- name: API Keys
|
|
description: API key management
|
|
- name: Combos
|
|
description: Routing combo management
|
|
- name: Settings
|
|
description: Application settings
|
|
- name: Compression
|
|
description: Prompt compression, RTK filters, Caveman rules, and compression combos
|
|
- name: Usage
|
|
description: Usage analytics and logs
|
|
- name: Translator
|
|
description: Format translation debug & testing
|
|
- name: CLI Tools
|
|
description: CLI tool configuration management
|
|
- name: Embedded Services
|
|
description: >-
|
|
Install, start, stop, and monitor locally-running embedded services (9Router, CLIProxyAPI).
|
|
All routes are LOCAL_ONLY — accessible from loopback only (hard rule #17).
|
|
- name: OAuth
|
|
description: OAuth flows for provider authentication
|
|
- name: System
|
|
description: System management (restart, shutdown, backup)
|
|
- name: Pricing
|
|
description: Model pricing configuration
|
|
- name: Cloud
|
|
description: Cloud worker authentication and sync
|
|
- name: Fallback
|
|
description: Fallback chain management
|
|
- name: Telemetry
|
|
description: Telemetry and token health monitoring
|
|
|
|
paths:
|
|
# ─── Proxy Endpoints ──────────────────────────────────────────
|
|
|
|
/api/v1/chat/completions:
|
|
post:
|
|
tags: [Chat]
|
|
summary: Create chat completion
|
|
description: OpenAI-compatible chat completions endpoint. Routes to configured providers.
|
|
security:
|
|
- BearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ChatCompletionRequest"
|
|
responses:
|
|
"200":
|
|
description: Chat completion response (or SSE stream)
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ChatCompletionResponse"
|
|
text/event-stream:
|
|
schema:
|
|
type: string
|
|
"401":
|
|
$ref: "#/components/responses/Unauthorized"
|
|
"502":
|
|
description: All upstream providers failed
|
|
|
|
/api/v1/providers/{provider}/chat/completions:
|
|
post:
|
|
tags: [Chat]
|
|
summary: Create chat completion (provider-specific)
|
|
description: Routes to a specific provider by name.
|
|
security:
|
|
- BearerAuth: []
|
|
parameters:
|
|
- name: provider
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ChatCompletionRequest"
|
|
responses:
|
|
"200":
|
|
description: Chat completion response
|
|
"401":
|
|
$ref: "#/components/responses/Unauthorized"
|
|
|
|
/api/v1/api/chat:
|
|
post:
|
|
tags: [Chat]
|
|
summary: Ollama-compatible chat endpoint
|
|
description: Provides compatibility with Ollama's /api/chat format.
|
|
security:
|
|
- BearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Chat response (JSON or streaming)
|
|
|
|
/api/v1/messages:
|
|
post:
|
|
tags: [Messages]
|
|
summary: Create message (Anthropic-compatible)
|
|
description: Anthropic Messages API endpoint. Routes to Claude providers.
|
|
security:
|
|
- BearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/MessagesRequest"
|
|
responses:
|
|
"200":
|
|
description: Message response (or SSE stream)
|
|
"401":
|
|
$ref: "#/components/responses/Unauthorized"
|
|
|
|
/api/v1/messages/count_tokens:
|
|
post:
|
|
tags: [Messages]
|
|
summary: Count tokens for a message
|
|
security:
|
|
- BearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Token count
|
|
|
|
/api/v1/responses:
|
|
post:
|
|
tags: [Responses]
|
|
summary: Create response (OpenAI Responses API)
|
|
description: OpenAI Responses API endpoint.
|
|
security:
|
|
- BearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Response object or SSE stream
|
|
"401":
|
|
$ref: "#/components/responses/Unauthorized"
|
|
|
|
/api/v1/embeddings:
|
|
post:
|
|
tags: [Embeddings]
|
|
summary: Create embeddings
|
|
security:
|
|
- BearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [input, model]
|
|
properties:
|
|
input:
|
|
oneOf:
|
|
- type: string
|
|
- type: array
|
|
items:
|
|
type: string
|
|
model:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Embedding vectors
|
|
|
|
/api/v1/providers/{provider}/embeddings:
|
|
post:
|
|
tags: [Embeddings]
|
|
summary: Create embeddings (provider-specific)
|
|
security:
|
|
- BearerAuth: []
|
|
parameters:
|
|
- name: provider
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Embedding vectors
|
|
|
|
/api/v1/images/generations:
|
|
post:
|
|
tags: [Images]
|
|
summary: Generate images
|
|
security:
|
|
- BearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [prompt]
|
|
properties:
|
|
prompt:
|
|
type: string
|
|
model:
|
|
type: string
|
|
n:
|
|
type: integer
|
|
default: 1
|
|
size:
|
|
type: string
|
|
default: 1024x1024
|
|
responses:
|
|
"200":
|
|
description: Generated images
|
|
|
|
/api/v1/providers/{provider}/images/generations:
|
|
post:
|
|
tags: [Images]
|
|
summary: Generate images (provider-specific)
|
|
security:
|
|
- BearerAuth: []
|
|
parameters:
|
|
- name: provider
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Generated images
|
|
|
|
/api/v1/audio/speech:
|
|
post:
|
|
tags: [Audio]
|
|
summary: Generate speech audio
|
|
description: Text-to-speech endpoint. Routes to configured TTS providers.
|
|
security:
|
|
- BearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [input]
|
|
properties:
|
|
input:
|
|
type: string
|
|
model:
|
|
type: string
|
|
voice:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Audio data
|
|
|
|
/api/v1/audio/transcriptions:
|
|
post:
|
|
tags: [Audio]
|
|
summary: Transcribe audio
|
|
description: Audio-to-text transcription endpoint.
|
|
security:
|
|
- BearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
multipart/form-data:
|
|
schema:
|
|
type: object
|
|
required: [file]
|
|
properties:
|
|
file:
|
|
type: string
|
|
format: binary
|
|
model:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Transcription result
|
|
|
|
/api/v1/moderations:
|
|
post:
|
|
tags: [Moderations]
|
|
summary: Create moderation
|
|
description: Content moderation endpoint. Routes to configured moderation providers.
|
|
security:
|
|
- BearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [input]
|
|
properties:
|
|
input:
|
|
oneOf:
|
|
- type: string
|
|
- type: array
|
|
items:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Moderation result
|
|
|
|
/api/v1/rerank:
|
|
post:
|
|
tags: [Rerank]
|
|
summary: Rerank documents
|
|
description: Document reranking endpoint.
|
|
security:
|
|
- BearerAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [query, documents]
|
|
properties:
|
|
query:
|
|
type: string
|
|
documents:
|
|
type: array
|
|
items:
|
|
type: string
|
|
model:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Reranked documents
|
|
|
|
/api/v1:
|
|
get:
|
|
tags: [System]
|
|
summary: API v1 root endpoint
|
|
description: Returns basic API info and status.
|
|
security:
|
|
- BearerAuth: []
|
|
responses:
|
|
"200":
|
|
description: API info
|
|
|
|
/api/v1/models:
|
|
get:
|
|
tags: [Models]
|
|
summary: List available models
|
|
description: Returns all models available across configured providers.
|
|
security:
|
|
- BearerAuth: []
|
|
responses:
|
|
"200":
|
|
description: Model list
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
object:
|
|
type: string
|
|
example: list
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/Model"
|
|
|
|
/api/v1/providers/{provider}/models:
|
|
get:
|
|
tags: [Models]
|
|
summary: List models for a specific provider
|
|
description: Returns only models for the selected provider with provider prefix removed from each model id.
|
|
security:
|
|
- BearerAuth: []
|
|
parameters:
|
|
- in: path
|
|
name: provider
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: Provider id or alias (for example `openai`, `claude`, `cc`).
|
|
responses:
|
|
"200":
|
|
description: Provider-scoped model list
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
object:
|
|
type: string
|
|
example: list
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/Model"
|
|
"400":
|
|
description: Unknown provider
|
|
|
|
/api/models:
|
|
get:
|
|
tags: [Models]
|
|
summary: List models (management)
|
|
responses:
|
|
"200":
|
|
description: Internal model list with aliases
|
|
|
|
/api/models/alias:
|
|
post:
|
|
tags: [Models]
|
|
summary: Create or update a model alias
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Alias created/updated
|
|
|
|
/api/models/catalog:
|
|
get:
|
|
tags: [Models]
|
|
summary: Get full model catalog
|
|
responses:
|
|
"200":
|
|
description: Complete catalog with all providers
|
|
|
|
# ─── Management Endpoints ──────────────────────────────────────
|
|
|
|
/api/providers:
|
|
get:
|
|
tags: [Providers]
|
|
summary: List provider connections
|
|
responses:
|
|
"200":
|
|
description: Provider connection list
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
connections:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/ProviderConnection"
|
|
post:
|
|
tags: [Providers]
|
|
summary: Create provider connection
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ProviderConnectionCreate"
|
|
responses:
|
|
"201":
|
|
description: Created provider connection
|
|
|
|
/api/providers/{id}:
|
|
get:
|
|
tags: [Providers]
|
|
summary: Get provider connection
|
|
parameters:
|
|
- $ref: "#/components/parameters/ResourceId"
|
|
responses:
|
|
"200":
|
|
description: Provider connection details
|
|
"404":
|
|
description: Provider not found
|
|
patch:
|
|
tags: [Providers]
|
|
summary: Update provider connection
|
|
parameters:
|
|
- $ref: "#/components/parameters/ResourceId"
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ProviderConnectionCreate"
|
|
responses:
|
|
"200":
|
|
description: Updated provider
|
|
delete:
|
|
tags: [Providers]
|
|
summary: Delete provider connection
|
|
parameters:
|
|
- $ref: "#/components/parameters/ResourceId"
|
|
responses:
|
|
"200":
|
|
description: Provider deleted
|
|
|
|
/api/providers/{id}/test:
|
|
post:
|
|
tags: [Providers]
|
|
summary: Test provider connection
|
|
parameters:
|
|
- $ref: "#/components/parameters/ResourceId"
|
|
responses:
|
|
"200":
|
|
description: Test result
|
|
|
|
/api/providers/{id}/models:
|
|
get:
|
|
tags: [Providers]
|
|
summary: List models for a provider
|
|
parameters:
|
|
- $ref: "#/components/parameters/ResourceId"
|
|
responses:
|
|
"200":
|
|
description: Provider model list
|
|
|
|
/api/providers/test-batch:
|
|
post:
|
|
tags: [Providers]
|
|
summary: Test multiple providers at once
|
|
responses:
|
|
"200":
|
|
description: Batch test results
|
|
|
|
/api/providers/validate:
|
|
post:
|
|
tags: [Providers]
|
|
summary: Validate provider credentials
|
|
responses:
|
|
"200":
|
|
description: Validation result
|
|
|
|
/api/providers/client:
|
|
get:
|
|
tags: [Providers]
|
|
summary: Get client-side provider info
|
|
responses:
|
|
"200":
|
|
description: Provider info for frontend
|
|
|
|
/api/providers/agy-auth/import:
|
|
post:
|
|
tags: [Providers]
|
|
summary: Import an Antigravity CLI (agy) token file as an `agy` connection
|
|
responses:
|
|
"200":
|
|
description: Created or updated provider connection
|
|
|
|
/api/providers/agy-auth/import-bulk:
|
|
post:
|
|
tags: [Providers]
|
|
summary: Bulk-import multiple Antigravity CLI (agy) token files (up to 50)
|
|
responses:
|
|
"200":
|
|
description: Per-entry import results (success/failed counts)
|
|
|
|
/api/providers/agy-auth/zip-extract:
|
|
post:
|
|
tags: [Providers]
|
|
summary: Extract `.json` token files from an uploaded ZIP for agy bulk import
|
|
responses:
|
|
"200":
|
|
description: Extracted token-file entries
|
|
|
|
/api/providers/agy-auth/apply-local:
|
|
post:
|
|
tags: [Providers]
|
|
summary: Auto-detect and import the local Antigravity CLI (agy) login from disk
|
|
responses:
|
|
"200":
|
|
description: Created or updated provider connection
|
|
"404":
|
|
description: No local agy login found
|
|
|
|
/api/provider-nodes:
|
|
get:
|
|
tags: [Provider Nodes]
|
|
summary: List provider nodes
|
|
responses:
|
|
"200":
|
|
description: Provider node list
|
|
post:
|
|
tags: [Provider Nodes]
|
|
summary: Create provider node
|
|
responses:
|
|
"201":
|
|
description: Created node
|
|
|
|
/api/provider-nodes/{id}:
|
|
patch:
|
|
tags: [Provider Nodes]
|
|
summary: Update provider node
|
|
parameters:
|
|
- $ref: "#/components/parameters/ResourceId"
|
|
responses:
|
|
"200":
|
|
description: Updated node
|
|
delete:
|
|
tags: [Provider Nodes]
|
|
summary: Delete provider node
|
|
parameters:
|
|
- $ref: "#/components/parameters/ResourceId"
|
|
responses:
|
|
"200":
|
|
description: Node deleted
|
|
|
|
/api/provider-nodes/validate:
|
|
post:
|
|
tags: [Provider Nodes]
|
|
summary: Validate a provider node
|
|
responses:
|
|
"200":
|
|
description: Validation result
|
|
|
|
/api/provider-models:
|
|
get:
|
|
tags: [Provider Nodes]
|
|
summary: List provider models
|
|
responses:
|
|
"200":
|
|
description: Provider model list
|
|
|
|
/api/keys:
|
|
get:
|
|
tags: [API Keys]
|
|
summary: List API keys
|
|
responses:
|
|
"200":
|
|
description: API key list
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
keys:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/ApiKey"
|
|
post:
|
|
tags: [API Keys]
|
|
summary: Create API key
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [label]
|
|
properties:
|
|
label:
|
|
type: string
|
|
responses:
|
|
"201":
|
|
description: Created API key (includes full key value)
|
|
|
|
/api/keys/{id}:
|
|
delete:
|
|
tags: [API Keys]
|
|
summary: Delete API key
|
|
parameters:
|
|
- $ref: "#/components/parameters/ResourceId"
|
|
responses:
|
|
"200":
|
|
description: Key deleted
|
|
|
|
/api/combos:
|
|
get:
|
|
tags: [Combos]
|
|
summary: List routing combos
|
|
responses:
|
|
"200":
|
|
description: Combo list
|
|
post:
|
|
tags: [Combos]
|
|
summary: Create routing combo
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ComboCreate"
|
|
responses:
|
|
"201":
|
|
description: Created combo
|
|
|
|
/api/combos/{id}:
|
|
patch:
|
|
tags: [Combos]
|
|
summary: Update combo
|
|
parameters:
|
|
- $ref: "#/components/parameters/ResourceId"
|
|
responses:
|
|
"200":
|
|
description: Updated combo
|
|
delete:
|
|
tags: [Combos]
|
|
summary: Delete combo
|
|
parameters:
|
|
- $ref: "#/components/parameters/ResourceId"
|
|
responses:
|
|
"200":
|
|
description: Combo deleted
|
|
|
|
/api/combos/metrics:
|
|
get:
|
|
tags: [Combos]
|
|
summary: Get combo metrics
|
|
responses:
|
|
"200":
|
|
description: Metrics for combos
|
|
|
|
/api/combos/test:
|
|
post:
|
|
tags: [Combos]
|
|
summary: Test a combo configuration
|
|
responses:
|
|
"200":
|
|
description: Test result
|
|
|
|
/api/settings:
|
|
get:
|
|
tags: [Settings]
|
|
summary: Get application settings
|
|
responses:
|
|
"200":
|
|
description: Current settings
|
|
patch:
|
|
tags: [Settings]
|
|
summary: Update settings
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Updated settings
|
|
|
|
/api/settings/compression:
|
|
get:
|
|
tags: [Compression]
|
|
summary: Get global compression settings
|
|
security:
|
|
- ManagementSessionAuth: []
|
|
responses:
|
|
"200":
|
|
description: Current compression settings
|
|
put:
|
|
tags: [Compression]
|
|
summary: Update global compression settings
|
|
security:
|
|
- ManagementSessionAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
enabled:
|
|
type: boolean
|
|
defaultMode:
|
|
type: string
|
|
enum: [off, lite, standard, aggressive, ultra, rtk, stacked]
|
|
autoTriggerMode:
|
|
type: string
|
|
enum: [off, lite, standard, aggressive, ultra, rtk, stacked]
|
|
autoTriggerTokens:
|
|
type: integer
|
|
minimum: 0
|
|
rtkConfig:
|
|
type: object
|
|
additionalProperties: true
|
|
stackedPipeline:
|
|
type: array
|
|
items:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Updated compression settings
|
|
|
|
/api/compression/preview:
|
|
post:
|
|
tags: [Compression]
|
|
summary: Preview compression for a message payload
|
|
security:
|
|
- BearerAuth: []
|
|
- ManagementSessionAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [messages, mode]
|
|
properties:
|
|
mode:
|
|
type: string
|
|
enum: [off, lite, standard, aggressive, ultra, rtk, stacked]
|
|
messages:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required: [role, content]
|
|
properties:
|
|
role:
|
|
type: string
|
|
content:
|
|
oneOf:
|
|
- type: string
|
|
- type: array
|
|
items: {}
|
|
config:
|
|
type: object
|
|
additionalProperties: true
|
|
responses:
|
|
"200":
|
|
description: Compression preview with diff, validation, and stats
|
|
|
|
/api/compression/language-packs:
|
|
get:
|
|
tags: [Compression]
|
|
summary: List Caveman compression language packs
|
|
security:
|
|
- BearerAuth: []
|
|
- ManagementSessionAuth: []
|
|
responses:
|
|
"200":
|
|
description: Available languages and rule-pack metadata
|
|
|
|
/api/compression/rules:
|
|
get:
|
|
tags: [Compression]
|
|
summary: List Caveman compression rule metadata
|
|
security:
|
|
- BearerAuth: []
|
|
- ManagementSessionAuth: []
|
|
responses:
|
|
"200":
|
|
description: Caveman rule metadata
|
|
|
|
/api/context/rtk/config:
|
|
get:
|
|
tags: [Compression]
|
|
summary: Get RTK compression settings
|
|
security:
|
|
- ManagementSessionAuth: []
|
|
responses:
|
|
"200":
|
|
description: Current RTK config
|
|
put:
|
|
tags: [Compression]
|
|
summary: Update RTK compression settings
|
|
security:
|
|
- ManagementSessionAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
enabled:
|
|
type: boolean
|
|
intensity:
|
|
type: string
|
|
enum: [minimal, standard, aggressive]
|
|
customFiltersEnabled:
|
|
type: boolean
|
|
trustProjectFilters:
|
|
type: boolean
|
|
rawOutputRetention:
|
|
type: string
|
|
enum: [never, failures, always]
|
|
rawOutputMaxBytes:
|
|
type: integer
|
|
responses:
|
|
"200":
|
|
description: Updated RTK config
|
|
|
|
/api/context/rtk/filters:
|
|
get:
|
|
tags: [Compression]
|
|
summary: List RTK filters and load diagnostics
|
|
security:
|
|
- ManagementSessionAuth: []
|
|
responses:
|
|
"200":
|
|
description: RTK filter catalog and diagnostics
|
|
|
|
/api/context/rtk/test:
|
|
post:
|
|
tags: [Compression]
|
|
summary: Run RTK compression preview for text
|
|
security:
|
|
- ManagementSessionAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [text]
|
|
properties:
|
|
text:
|
|
type: string
|
|
command:
|
|
type: string
|
|
config:
|
|
type: object
|
|
additionalProperties: true
|
|
responses:
|
|
"200":
|
|
description: Detection and RTK compression result
|
|
|
|
/api/context/rtk/raw-output/{id}:
|
|
get:
|
|
tags: [Compression]
|
|
summary: Read retained redacted RTK raw output
|
|
security:
|
|
- ManagementSessionAuth: []
|
|
parameters:
|
|
- in: path
|
|
name: id
|
|
required: true
|
|
schema:
|
|
type: string
|
|
pattern: "^[a-f0-9]{24}$"
|
|
responses:
|
|
"200":
|
|
description: Raw output text
|
|
"404":
|
|
description: Raw output not found
|
|
|
|
/api/settings/payload-rules:
|
|
get:
|
|
tags: [Settings]
|
|
summary: Get payload rules configuration
|
|
description: |
|
|
Returns the current payload rules used to mutate outgoing request payloads before they
|
|
are sent upstream.
|
|
|
|
Requires a dashboard management session cookie when management auth is enabled.
|
|
security:
|
|
- ManagementSessionAuth: []
|
|
responses:
|
|
"200":
|
|
description: Current payload rules configuration
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/PayloadRulesConfig"
|
|
"401":
|
|
$ref: "#/components/responses/ManagementAuthenticationRequired"
|
|
"403":
|
|
$ref: "#/components/responses/ManagementInvalidToken"
|
|
"500":
|
|
description: Failed to read payload rules configuration
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ApiErrorResponse"
|
|
put:
|
|
tags: [Settings]
|
|
summary: Update payload rules configuration
|
|
description: |
|
|
Persists and hot reloads payload rules. The legacy input field `default-raw` is accepted
|
|
on writes and normalized to `defaultRaw` in responses/runtime state.
|
|
|
|
Requires a dashboard management session cookie when management auth is enabled.
|
|
security:
|
|
- ManagementSessionAuth: []
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/UpdatePayloadRulesRequest"
|
|
responses:
|
|
"200":
|
|
description: Updated payload rules configuration
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/PayloadRulesConfig"
|
|
"400":
|
|
$ref: "#/components/responses/ValidationError"
|
|
"401":
|
|
$ref: "#/components/responses/ManagementAuthenticationRequired"
|
|
"403":
|
|
$ref: "#/components/responses/ManagementInvalidToken"
|
|
"500":
|
|
description: Failed to update payload rules configuration
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ApiErrorResponse"
|
|
|
|
/api/settings/combo-defaults:
|
|
get:
|
|
tags: [Settings]
|
|
summary: Get combo default settings
|
|
responses:
|
|
"200":
|
|
description: Default combo settings
|
|
|
|
/api/settings/proxy:
|
|
get:
|
|
tags: [Settings]
|
|
summary: Get proxy settings
|
|
responses:
|
|
"200":
|
|
description: Current proxy settings
|
|
patch:
|
|
tags: [Settings]
|
|
summary: Update proxy settings
|
|
responses:
|
|
"200":
|
|
description: Updated proxy settings
|
|
|
|
/api/settings/proxy/test:
|
|
post:
|
|
tags: [Settings]
|
|
summary: Test proxy connection
|
|
responses:
|
|
"200":
|
|
description: Test result
|
|
|
|
/api/settings/require-login:
|
|
post:
|
|
tags: [Settings]
|
|
summary: Toggle login requirement
|
|
responses:
|
|
"200":
|
|
description: Updated
|
|
|
|
/api/settings/ip-filter:
|
|
get:
|
|
tags: [Settings]
|
|
summary: Get IP filter configuration
|
|
description: Returns the current IP filter settings including blacklist, whitelist, and temp bans.
|
|
responses:
|
|
"200":
|
|
description: IP filter configuration
|
|
put:
|
|
tags: [Settings]
|
|
summary: Update IP filter configuration
|
|
description: |
|
|
Configure IP filtering with blacklist/whitelist modes, add/remove individual IPs, and manage temp bans.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
enabled:
|
|
type: boolean
|
|
mode:
|
|
type: string
|
|
enum: [blacklist, whitelist]
|
|
blacklist:
|
|
type: array
|
|
items:
|
|
type: string
|
|
whitelist:
|
|
type: array
|
|
items:
|
|
type: string
|
|
addBlacklist:
|
|
type: string
|
|
removeBlacklist:
|
|
type: string
|
|
addWhitelist:
|
|
type: string
|
|
removeWhitelist:
|
|
type: string
|
|
tempBan:
|
|
type: object
|
|
properties:
|
|
ip:
|
|
type: string
|
|
durationMs:
|
|
type: integer
|
|
reason:
|
|
type: string
|
|
removeBan:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Updated IP filter configuration
|
|
|
|
/api/settings/system-prompt:
|
|
get:
|
|
tags: [Settings]
|
|
summary: Get system prompt configuration
|
|
description: Returns the current system prompt injection settings.
|
|
responses:
|
|
"200":
|
|
description: System prompt configuration
|
|
put:
|
|
tags: [Settings]
|
|
summary: Update system prompt configuration
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
prompt:
|
|
type: string
|
|
enabled:
|
|
type: boolean
|
|
responses:
|
|
"200":
|
|
description: Updated system prompt configuration
|
|
|
|
/api/settings/thinking-budget:
|
|
get:
|
|
tags: [Settings]
|
|
summary: Get thinking budget configuration
|
|
description: Returns the current thinking/reasoning budget settings for AI models.
|
|
responses:
|
|
"200":
|
|
description: Thinking budget configuration
|
|
put:
|
|
tags: [Settings]
|
|
summary: Update thinking budget configuration
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
mode:
|
|
type: string
|
|
description: Thinking mode (e.g., auto, manual, disabled)
|
|
customBudget:
|
|
type: integer
|
|
minimum: 0
|
|
maximum: 131072
|
|
effortLevel:
|
|
type: string
|
|
enum: [none, low, medium, high]
|
|
responses:
|
|
"200":
|
|
description: Updated thinking budget configuration
|
|
|
|
/api/rate-limit:
|
|
get:
|
|
tags: [Settings]
|
|
summary: Get rate limit configuration
|
|
responses:
|
|
"200":
|
|
description: Rate limit settings
|
|
post:
|
|
tags: [Settings]
|
|
summary: Update rate limit configuration
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Updated rate limit settings
|
|
|
|
/api/tags:
|
|
get:
|
|
tags: [System]
|
|
summary: List Ollama-compatible model tags
|
|
description: Returns models in Ollama /api/tags format for Ollama client compatibility
|
|
responses:
|
|
"200":
|
|
description: Ollama model tags
|
|
|
|
# ─── Usage & Analytics ─────────────────────────────────────────
|
|
|
|
/api/usage/analytics:
|
|
get:
|
|
tags: [Usage]
|
|
summary: Get usage analytics
|
|
parameters:
|
|
- name: period
|
|
in: query
|
|
schema:
|
|
type: string
|
|
enum: [day, week, month]
|
|
default: day
|
|
responses:
|
|
"200":
|
|
description: Usage analytics data
|
|
|
|
/api/usage/call-logs:
|
|
get:
|
|
tags: [Usage]
|
|
summary: Get call logs
|
|
parameters:
|
|
- name: limit
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
default: 50
|
|
- name: offset
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
default: 0
|
|
responses:
|
|
"200":
|
|
description: Paginated call logs
|
|
|
|
/api/usage/call-logs/{id}:
|
|
get:
|
|
tags: [Usage]
|
|
summary: Get a specific call log
|
|
parameters:
|
|
- $ref: "#/components/parameters/ResourceId"
|
|
responses:
|
|
"200":
|
|
description: Call log detail
|
|
|
|
/api/usage/{connectionId}:
|
|
get:
|
|
tags: [Usage]
|
|
summary: Get usage for a specific connection
|
|
parameters:
|
|
- name: connectionId
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Connection usage data
|
|
|
|
/api/usage/history:
|
|
get:
|
|
tags: [Usage]
|
|
summary: Get usage history
|
|
responses:
|
|
"200":
|
|
description: Historical usage data
|
|
|
|
/api/usage/logs:
|
|
get:
|
|
tags: [Usage]
|
|
summary: Get usage logs
|
|
responses:
|
|
"200":
|
|
description: Usage log entries
|
|
|
|
/api/usage/proxy-logs:
|
|
get:
|
|
tags: [Usage]
|
|
summary: Get proxy logs
|
|
responses:
|
|
"200":
|
|
description: Proxy log entries
|
|
|
|
/api/usage/request-logs:
|
|
get:
|
|
tags: [Usage]
|
|
summary: Get request logs
|
|
responses:
|
|
"200":
|
|
description: Request log entries
|
|
|
|
/api/usage/budget:
|
|
get:
|
|
tags: [Usage]
|
|
summary: Get usage budget status
|
|
description: Returns current budget limits and consumption.
|
|
responses:
|
|
"200":
|
|
description: Budget status
|
|
post:
|
|
tags: [Usage]
|
|
summary: Configure usage budget
|
|
description: Set or update budget limits for usage tracking.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Updated budget configuration
|
|
|
|
# ─── Pricing ───────────────────────────────────────────────────
|
|
|
|
/api/pricing:
|
|
get:
|
|
tags: [Pricing]
|
|
summary: Get model pricing
|
|
responses:
|
|
"200":
|
|
description: Current pricing configuration
|
|
post:
|
|
tags: [Pricing]
|
|
summary: Set model pricing
|
|
responses:
|
|
"200":
|
|
description: Updated pricing
|
|
|
|
/api/pricing/defaults:
|
|
get:
|
|
tags: [Pricing]
|
|
summary: Get default pricing
|
|
responses:
|
|
"200":
|
|
description: Default pricing data
|
|
|
|
/api/pricing/models:
|
|
get:
|
|
tags: [Pricing]
|
|
summary: Get pricing per model
|
|
description: Returns pricing information organized by model.
|
|
responses:
|
|
"200":
|
|
description: Per-model pricing data
|
|
|
|
# ─── Translator ────────────────────────────────────────────────
|
|
|
|
/api/translator/detect:
|
|
post:
|
|
tags: [Translator]
|
|
summary: Detect request format
|
|
description: Detects the API format of a request body (OpenAI, Claude, Gemini, etc.)
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [body]
|
|
properties:
|
|
body:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Detected format
|
|
|
|
/api/translator/translate:
|
|
post:
|
|
tags: [Translator]
|
|
summary: Translate between formats
|
|
description: Converts a request between API formats (e.g. Claude → OpenAI)
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [sourceFormat, targetFormat, body]
|
|
properties:
|
|
step:
|
|
type: string
|
|
sourceFormat:
|
|
type: string
|
|
targetFormat:
|
|
type: string
|
|
provider:
|
|
type: string
|
|
body:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Translated request
|
|
|
|
/api/translator/send:
|
|
post:
|
|
tags: [Translator]
|
|
summary: Send translated request to provider
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [provider, body]
|
|
properties:
|
|
provider:
|
|
type: string
|
|
body:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Provider response (may be SSE stream)
|
|
|
|
/api/translator/history:
|
|
get:
|
|
tags: [Translator]
|
|
summary: Get translation history
|
|
description: Returns recent translation events for the Live Monitor
|
|
responses:
|
|
"200":
|
|
description: Translation history entries
|
|
|
|
# ─── CLI Tools ─────────────────────────────────────────────────
|
|
|
|
/api/cli-tools/backups:
|
|
get:
|
|
tags: [CLI Tools]
|
|
summary: List CLI tool backups
|
|
responses:
|
|
"200":
|
|
description: Backup list
|
|
post:
|
|
tags: [CLI Tools]
|
|
summary: Create CLI tool backup
|
|
responses:
|
|
"200":
|
|
description: Backup created
|
|
|
|
/api/cli-tools/runtime/{toolId}:
|
|
get:
|
|
tags: [CLI Tools]
|
|
summary: Get runtime status for a CLI tool
|
|
parameters:
|
|
- name: toolId
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Runtime status
|
|
|
|
/api/cli-tools/guide-settings/{toolId}:
|
|
get:
|
|
tags: [CLI Tools]
|
|
summary: Get guide settings for a tool
|
|
parameters:
|
|
- name: toolId
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Guide settings
|
|
|
|
/api/cli-tools/antigravity-mitm:
|
|
get:
|
|
tags: [CLI Tools]
|
|
summary: Get Antigravity MITM proxy settings
|
|
responses:
|
|
"200":
|
|
description: MITM proxy configuration
|
|
post:
|
|
tags: [CLI Tools]
|
|
summary: Update Antigravity MITM proxy settings
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Updated MITM proxy configuration
|
|
delete:
|
|
tags: [CLI Tools]
|
|
summary: Reset Antigravity MITM proxy settings
|
|
responses:
|
|
"200":
|
|
description: MITM proxy settings reset
|
|
|
|
/api/cli-tools/antigravity-mitm/alias:
|
|
get:
|
|
tags: [CLI Tools]
|
|
summary: Get Antigravity MITM alias configuration
|
|
responses:
|
|
"200":
|
|
description: Alias configuration
|
|
put:
|
|
tags: [CLI Tools]
|
|
summary: Update Antigravity MITM alias configuration
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Updated alias configuration
|
|
|
|
/api/cli-tools/claude-settings:
|
|
get:
|
|
tags: [CLI Tools]
|
|
summary: Get Claude CLI settings
|
|
responses:
|
|
"200":
|
|
description: Claude CLI configuration
|
|
post:
|
|
tags: [CLI Tools]
|
|
summary: Apply Claude CLI settings
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Claude CLI settings applied
|
|
delete:
|
|
tags: [CLI Tools]
|
|
summary: Reset Claude CLI settings
|
|
responses:
|
|
"200":
|
|
description: Claude CLI settings reset
|
|
|
|
/api/cli-tools/cline-settings:
|
|
get:
|
|
tags: [CLI Tools]
|
|
summary: Get Cline CLI settings
|
|
responses:
|
|
"200":
|
|
description: Cline CLI configuration
|
|
post:
|
|
tags: [CLI Tools]
|
|
summary: Apply Cline CLI settings
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Cline CLI settings applied
|
|
delete:
|
|
tags: [CLI Tools]
|
|
summary: Reset Cline CLI settings
|
|
responses:
|
|
"200":
|
|
description: Cline CLI settings reset
|
|
|
|
/api/cli-tools/codex-profiles:
|
|
get:
|
|
tags: [CLI Tools]
|
|
summary: Get Codex profiles
|
|
responses:
|
|
"200":
|
|
description: Codex profile list
|
|
post:
|
|
tags: [CLI Tools]
|
|
summary: Create Codex profile
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Profile created
|
|
put:
|
|
tags: [CLI Tools]
|
|
summary: Update Codex profile
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Profile updated
|
|
delete:
|
|
tags: [CLI Tools]
|
|
summary: Delete Codex profile
|
|
responses:
|
|
"200":
|
|
description: Profile deleted
|
|
|
|
/api/cli-tools/codex-settings:
|
|
get:
|
|
tags: [CLI Tools]
|
|
summary: Get Codex CLI settings
|
|
responses:
|
|
"200":
|
|
description: Codex CLI configuration
|
|
post:
|
|
tags: [CLI Tools]
|
|
summary: Apply Codex CLI settings
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Codex CLI settings applied
|
|
delete:
|
|
tags: [CLI Tools]
|
|
summary: Reset Codex CLI settings
|
|
responses:
|
|
"200":
|
|
description: Codex CLI settings reset
|
|
|
|
/api/cli-tools/droid-settings:
|
|
get:
|
|
tags: [CLI Tools]
|
|
summary: Get Droid CLI settings
|
|
responses:
|
|
"200":
|
|
description: Droid CLI configuration
|
|
post:
|
|
tags: [CLI Tools]
|
|
summary: Apply Droid CLI settings
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Droid CLI settings applied
|
|
delete:
|
|
tags: [CLI Tools]
|
|
summary: Reset Droid CLI settings
|
|
responses:
|
|
"200":
|
|
description: Droid CLI settings reset
|
|
|
|
/api/cli-tools/kilo-settings:
|
|
get:
|
|
tags: [CLI Tools]
|
|
summary: Get Kilo CLI settings
|
|
responses:
|
|
"200":
|
|
description: Kilo CLI configuration
|
|
post:
|
|
tags: [CLI Tools]
|
|
summary: Apply Kilo CLI settings
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Kilo CLI settings applied
|
|
delete:
|
|
tags: [CLI Tools]
|
|
summary: Reset Kilo CLI settings
|
|
responses:
|
|
"200":
|
|
description: Kilo CLI settings reset
|
|
|
|
/api/cli-tools/openclaw-settings:
|
|
get:
|
|
tags: [CLI Tools]
|
|
summary: Get OpenClaw CLI settings
|
|
responses:
|
|
"200":
|
|
description: OpenClaw CLI configuration
|
|
post:
|
|
tags: [CLI Tools]
|
|
summary: Apply OpenClaw CLI settings
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: OpenClaw CLI settings applied
|
|
delete:
|
|
tags: [CLI Tools]
|
|
summary: Reset OpenClaw CLI settings
|
|
responses:
|
|
"200":
|
|
description: OpenClaw CLI settings reset
|
|
|
|
# ─── Embedded Services ─────────────────────────────────────────
|
|
# All routes LOCAL_ONLY (loopback only) — hard rule #17.
|
|
# See docs/frameworks/EMBEDDED-SERVICES.md for full reference.
|
|
|
|
/api/services/9router/install:
|
|
post:
|
|
tags: [Embedded Services]
|
|
summary: Install 9Router from npm
|
|
description: >-
|
|
Installs the `9router` npm package under DATA_DIR/services/9router/.
|
|
Uses execFile (no shell interpolation — hard rule #13).
|
|
**LOCAL_ONLY** — loopback only.
|
|
requestBody:
|
|
required: false
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
version:
|
|
type: string
|
|
default: latest
|
|
description: npm version tag or semver to install
|
|
responses:
|
|
"200":
|
|
description: Install succeeded
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
ok:
|
|
type: boolean
|
|
installedVersion:
|
|
type: string
|
|
path:
|
|
type: string
|
|
"400":
|
|
description: Invalid request body
|
|
"500":
|
|
description: npm install failed
|
|
|
|
/api/services/9router/start:
|
|
post:
|
|
tags: [Embedded Services]
|
|
summary: Start 9Router
|
|
description: >-
|
|
Spawns the 9Router process. Idempotent if already running.
|
|
**LOCAL_ONLY** — loopback only.
|
|
responses:
|
|
"200":
|
|
description: Service started (or already running)
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ServiceStatus"
|
|
"409":
|
|
description: 9Router is not installed
|
|
"503":
|
|
description: Start failed
|
|
|
|
/api/services/9router/stop:
|
|
post:
|
|
tags: [Embedded Services]
|
|
summary: Stop 9Router
|
|
description: >-
|
|
Gracefully stops 9Router (SIGTERM → 15 s → SIGKILL). Idempotent.
|
|
**LOCAL_ONLY** — loopback only.
|
|
responses:
|
|
"200":
|
|
description: Service stopped
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ServiceStatus"
|
|
"503":
|
|
description: Stop failed
|
|
|
|
/api/services/9router/restart:
|
|
post:
|
|
tags: [Embedded Services]
|
|
summary: Restart 9Router
|
|
description: >-
|
|
Equivalent to stop() then start() under the operation lock.
|
|
**LOCAL_ONLY** — loopback only.
|
|
responses:
|
|
"200":
|
|
description: Service restarted
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ServiceStatus"
|
|
|
|
/api/services/9router/update:
|
|
post:
|
|
tags: [Embedded Services]
|
|
summary: Update 9Router to a newer npm version
|
|
description: >-
|
|
Stops the service (if running), installs the newer npm version, then restarts.
|
|
**LOCAL_ONLY** — loopback only.
|
|
requestBody:
|
|
required: false
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
version:
|
|
type: string
|
|
default: latest
|
|
responses:
|
|
"200":
|
|
description: Update succeeded
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
ok:
|
|
type: boolean
|
|
previousVersion:
|
|
type: string
|
|
installedVersion:
|
|
type: string
|
|
"400":
|
|
description: Invalid request body
|
|
"500":
|
|
description: Update failed
|
|
|
|
/api/services/9router/rotate-key:
|
|
post:
|
|
tags: [Embedded Services]
|
|
summary: Rotate the 9Router API key
|
|
description: >-
|
|
Generates a new API key, encrypts it at-rest, and restarts the service to
|
|
apply it. The plaintext key is never returned.
|
|
**LOCAL_ONLY** — loopback only.
|
|
responses:
|
|
"200":
|
|
description: Key rotated
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
keyRotated:
|
|
type: boolean
|
|
restarted:
|
|
type: boolean
|
|
"500":
|
|
description: Rotation failed
|
|
|
|
/api/services/9router/status:
|
|
get:
|
|
tags: [Embedded Services]
|
|
summary: Get 9Router status
|
|
description: >-
|
|
Returns combined live supervisor state and DB metadata.
|
|
**LOCAL_ONLY** — loopback only.
|
|
responses:
|
|
"200":
|
|
description: Status response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ServiceStatusExtended"
|
|
"500":
|
|
description: Status read failed
|
|
|
|
/api/services/9router/auto-start:
|
|
post:
|
|
tags: [Embedded Services]
|
|
summary: Toggle 9Router auto-start
|
|
description: >-
|
|
When enabled, 9Router starts automatically on the next OmniRoute boot.
|
|
**LOCAL_ONLY** — loopback only.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [enabled]
|
|
properties:
|
|
enabled:
|
|
type: boolean
|
|
responses:
|
|
"200":
|
|
description: Auto-start flag updated
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
autoStart:
|
|
type: boolean
|
|
"400":
|
|
description: Invalid request body
|
|
|
|
/api/services/cliproxy/install:
|
|
post:
|
|
tags: [Embedded Services]
|
|
summary: Install CLIProxyAPI from npm
|
|
description: >-
|
|
Installs the CLIProxyAPI package under DATA_DIR/services/cliproxy/.
|
|
**LOCAL_ONLY** — loopback only.
|
|
requestBody:
|
|
required: false
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
version:
|
|
type: string
|
|
default: latest
|
|
responses:
|
|
"200":
|
|
description: Install succeeded
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
ok:
|
|
type: boolean
|
|
installedVersion:
|
|
type: string
|
|
"400":
|
|
description: Invalid request body
|
|
"500":
|
|
description: npm install failed
|
|
|
|
/api/services/cliproxy/start:
|
|
post:
|
|
tags: [Embedded Services]
|
|
summary: Start CLIProxyAPI
|
|
description: >-
|
|
Spawns the CLIProxyAPI process. Idempotent if already running.
|
|
**LOCAL_ONLY** — loopback only.
|
|
responses:
|
|
"200":
|
|
description: Service started
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ServiceStatus"
|
|
"409":
|
|
description: CLIProxyAPI is not installed
|
|
"503":
|
|
description: Start failed
|
|
|
|
/api/services/cliproxy/stop:
|
|
post:
|
|
tags: [Embedded Services]
|
|
summary: Stop CLIProxyAPI
|
|
description: >-
|
|
Gracefully stops CLIProxyAPI. Idempotent.
|
|
**LOCAL_ONLY** — loopback only.
|
|
responses:
|
|
"200":
|
|
description: Service stopped
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ServiceStatus"
|
|
|
|
/api/services/cliproxy/restart:
|
|
post:
|
|
tags: [Embedded Services]
|
|
summary: Restart CLIProxyAPI
|
|
description: >-
|
|
stop() then start() under the operation lock.
|
|
**LOCAL_ONLY** — loopback only.
|
|
responses:
|
|
"200":
|
|
description: Service restarted
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ServiceStatus"
|
|
|
|
/api/services/cliproxy/update:
|
|
post:
|
|
tags: [Embedded Services]
|
|
summary: Update CLIProxyAPI to a newer npm version
|
|
description: >-
|
|
Stops, installs newer version, restarts.
|
|
**LOCAL_ONLY** — loopback only.
|
|
requestBody:
|
|
required: false
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
version:
|
|
type: string
|
|
default: latest
|
|
responses:
|
|
"200":
|
|
description: Update succeeded
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
ok:
|
|
type: boolean
|
|
installedVersion:
|
|
type: string
|
|
"500":
|
|
description: Update failed
|
|
|
|
/api/services/cliproxy/status:
|
|
get:
|
|
tags: [Embedded Services]
|
|
summary: Get CLIProxyAPI status
|
|
description: >-
|
|
Returns live supervisor state and DB metadata (no apiKeyMasked — CLIProxyAPI
|
|
does not use an injected API key).
|
|
**LOCAL_ONLY** — loopback only.
|
|
responses:
|
|
"200":
|
|
description: Status response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ServiceStatus"
|
|
|
|
/api/services/cliproxy/auto-start:
|
|
post:
|
|
tags: [Embedded Services]
|
|
summary: Toggle CLIProxyAPI auto-start
|
|
description: >-
|
|
When enabled, CLIProxyAPI starts automatically on the next OmniRoute boot.
|
|
**LOCAL_ONLY** — loopback only.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [enabled]
|
|
properties:
|
|
enabled:
|
|
type: boolean
|
|
responses:
|
|
"200":
|
|
description: Auto-start flag updated
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
autoStart:
|
|
type: boolean
|
|
"400":
|
|
description: Invalid request body
|
|
|
|
/api/services/{name}/logs:
|
|
get:
|
|
tags: [Embedded Services]
|
|
summary: Stream service logs via SSE
|
|
description: >-
|
|
Returns a Server-Sent Events stream from the service's in-memory ring buffer
|
|
(5 MB, circular). Sends a `snapshot` event with historical lines first, then
|
|
live `log` events, plus a `heartbeat` every 15 s.
|
|
**LOCAL_ONLY** — loopback only.
|
|
parameters:
|
|
- name: name
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
enum: [9router, cliproxy]
|
|
- name: tail
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
default: 200
|
|
maximum: 1000
|
|
description: Number of historical lines to include in the initial snapshot
|
|
- name: filter
|
|
in: query
|
|
schema:
|
|
type: string
|
|
maxLength: 200
|
|
description: >-
|
|
Case-insensitive substring filter applied to log lines.
|
|
No regex — ReDoS-safe by design.
|
|
responses:
|
|
"200":
|
|
description: SSE log stream
|
|
content:
|
|
text/event-stream:
|
|
schema:
|
|
type: string
|
|
description: >-
|
|
Events: `snapshot` (LogLine[]), `log` (LogLine), `heartbeat` ({})
|
|
"400":
|
|
description: filter parameter exceeds maximum length
|
|
"404":
|
|
description: Service not found
|
|
|
|
# ─── OAuth ─────────────────────────────────────────────────────
|
|
|
|
/api/oauth/{provider}/{action}:
|
|
get:
|
|
tags: [OAuth]
|
|
summary: OAuth flow handler
|
|
description: Handles OAuth authorization and callback for providers
|
|
parameters:
|
|
- name: provider
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: action
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
enum: [authorize, callback, refresh, status]
|
|
responses:
|
|
"200":
|
|
description: OAuth flow response
|
|
"302":
|
|
description: Redirect to provider auth page
|
|
|
|
/api/oauth/cursor/auto-import:
|
|
get:
|
|
tags: [OAuth]
|
|
summary: Auto-import Cursor OAuth credentials
|
|
description: Automatically detects and imports Cursor credentials from local config.
|
|
responses:
|
|
"200":
|
|
description: Import result
|
|
|
|
/api/oauth/cursor/import:
|
|
get:
|
|
tags: [OAuth]
|
|
summary: Get Cursor import status
|
|
responses:
|
|
"200":
|
|
description: Current import status
|
|
post:
|
|
tags: [OAuth]
|
|
summary: Import Cursor OAuth credentials
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Credentials imported
|
|
|
|
/api/oauth/kiro/auto-import:
|
|
get:
|
|
tags: [OAuth]
|
|
summary: Auto-import Kiro OAuth credentials
|
|
description: Automatically detects and imports Kiro credentials from local config.
|
|
responses:
|
|
"200":
|
|
description: Import result
|
|
|
|
/api/oauth/kiro/import:
|
|
get:
|
|
tags: [OAuth]
|
|
summary: Get Kiro import status
|
|
responses:
|
|
"200":
|
|
description: Current import status
|
|
post:
|
|
tags: [OAuth]
|
|
summary: Import Kiro OAuth credentials
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Credentials imported
|
|
|
|
/api/oauth/kiro/social-authorize:
|
|
get:
|
|
tags: [OAuth]
|
|
summary: Initiate Kiro social OAuth authorization
|
|
description: Starts the social OAuth flow for Kiro.
|
|
responses:
|
|
"302":
|
|
description: Redirect to OAuth provider
|
|
|
|
/api/oauth/kiro/social-exchange:
|
|
post:
|
|
tags: [OAuth]
|
|
summary: Exchange Kiro social OAuth token
|
|
description: Exchanges the authorization code for access tokens.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Token exchange result
|
|
|
|
# ─── Cloud ─────────────────────────────────────────────────────
|
|
|
|
/api/cloud/auth:
|
|
post:
|
|
tags: [Cloud]
|
|
summary: Authenticate with cloud worker
|
|
description: Authenticates with the OmniRoute cloud worker for remote access.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Authentication result
|
|
|
|
/api/cloud/credentials/update:
|
|
put:
|
|
tags: [Cloud]
|
|
summary: Update cloud worker credentials
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Credentials updated
|
|
|
|
/api/cloud/model/resolve:
|
|
post:
|
|
tags: [Cloud]
|
|
summary: Resolve model via cloud
|
|
description: Resolves a model request through the cloud worker.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Resolved model info
|
|
|
|
/api/cloud/models/alias:
|
|
get:
|
|
tags: [Cloud]
|
|
summary: Get cloud model aliases
|
|
responses:
|
|
"200":
|
|
description: Cloud model alias list
|
|
put:
|
|
tags: [Cloud]
|
|
summary: Update cloud model alias
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Alias updated
|
|
|
|
# ─── Fallback ──────────────────────────────────────────────────
|
|
|
|
/api/fallback/chains:
|
|
get:
|
|
tags: [Fallback]
|
|
summary: List fallback chains
|
|
description: Returns all registered fallback chains for model routing.
|
|
responses:
|
|
"200":
|
|
description: Fallback chain list
|
|
post:
|
|
tags: [Fallback]
|
|
summary: Create fallback chain
|
|
description: Registers a fallback routing chain for a model.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [model, chain]
|
|
properties:
|
|
model:
|
|
type: string
|
|
chain:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
provider:
|
|
type: string
|
|
priority:
|
|
type: integer
|
|
enabled:
|
|
type: boolean
|
|
responses:
|
|
"200":
|
|
description: Fallback chain created
|
|
delete:
|
|
tags: [Fallback]
|
|
summary: Delete fallback chain
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [model]
|
|
properties:
|
|
model:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Fallback chain deleted
|
|
|
|
# ─── System ────────────────────────────────────────────────────
|
|
|
|
/api/auth/login:
|
|
post:
|
|
tags: [System]
|
|
summary: Authenticate user
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [password]
|
|
properties:
|
|
password:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: JWT token returned
|
|
"401":
|
|
description: Invalid password
|
|
|
|
/api/auth/logout:
|
|
post:
|
|
tags: [System]
|
|
summary: Log out
|
|
responses:
|
|
"200":
|
|
description: Session cleared
|
|
|
|
/api/init:
|
|
get:
|
|
tags: [System]
|
|
summary: Initialize application
|
|
responses:
|
|
"200":
|
|
description: Init status
|
|
|
|
/api/restart:
|
|
post:
|
|
tags: [System]
|
|
summary: Restart the application
|
|
responses:
|
|
"200":
|
|
description: Restart initiated
|
|
|
|
/api/shutdown:
|
|
post:
|
|
tags: [System]
|
|
summary: Shutdown the application
|
|
x-always-protected: true
|
|
responses:
|
|
"200":
|
|
description: Shutdown initiated
|
|
|
|
/api/db-backups:
|
|
get:
|
|
tags: [System]
|
|
summary: List database backups
|
|
responses:
|
|
"200":
|
|
description: Backup list
|
|
post:
|
|
tags: [System]
|
|
summary: Create database backup
|
|
responses:
|
|
"200":
|
|
description: Backup created
|
|
|
|
/api/storage/health:
|
|
get:
|
|
tags: [System]
|
|
summary: Check storage health
|
|
responses:
|
|
"200":
|
|
description: Storage health status
|
|
|
|
/api/sync/cloud:
|
|
post:
|
|
tags: [System]
|
|
summary: Sync with cloud
|
|
responses:
|
|
"200":
|
|
description: Sync result
|
|
|
|
/api/sync/initialize:
|
|
post:
|
|
tags: [System]
|
|
summary: Initialize cloud sync
|
|
responses:
|
|
"200":
|
|
description: Sync initialized
|
|
|
|
# ─── Resilience & Monitoring ────────────────────────────────────
|
|
|
|
/api/resilience:
|
|
get:
|
|
tags: [System]
|
|
summary: Get resilience configuration
|
|
responses:
|
|
"200":
|
|
description: Request queue, connection cooldown, provider breaker, and wait settings
|
|
patch:
|
|
tags: [System]
|
|
summary: Update resilience configuration
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Updated resilience configuration
|
|
|
|
/api/resilience/reset:
|
|
post:
|
|
tags: [System]
|
|
summary: Reset circuit breakers
|
|
responses:
|
|
"200":
|
|
description: Circuit breakers reset
|
|
|
|
/api/monitoring/health:
|
|
get:
|
|
tags: [System]
|
|
summary: System health check
|
|
description: Returns system health including uptime, memory, circuit breakers, rate limits
|
|
responses:
|
|
"200":
|
|
description: Health status
|
|
|
|
/api/rate-limits:
|
|
get:
|
|
tags: [System]
|
|
summary: Get per-account rate limit status
|
|
responses:
|
|
"200":
|
|
description: Rate limit status by account
|
|
|
|
/api/sessions:
|
|
get:
|
|
tags: [System]
|
|
summary: Get active sessions
|
|
responses:
|
|
"200":
|
|
description: Active session list
|
|
|
|
/api/cache:
|
|
get:
|
|
tags: [System]
|
|
summary: Get cache statistics
|
|
responses:
|
|
"200":
|
|
description: Semantic cache and idempotency stats
|
|
delete:
|
|
tags: [System]
|
|
summary: Clear all caches
|
|
responses:
|
|
"200":
|
|
description: Caches cleared
|
|
|
|
/api/cache/stats:
|
|
get:
|
|
tags: [System]
|
|
summary: Get detailed cache statistics
|
|
description: Returns detailed statistics for all cache layers.
|
|
responses:
|
|
"200":
|
|
description: Detailed cache stats
|
|
delete:
|
|
tags: [System]
|
|
summary: Clear cache statistics
|
|
responses:
|
|
"200":
|
|
description: Cache stats cleared
|
|
|
|
# ─── Telemetry & Token Health ───────────────────────────────────
|
|
|
|
/api/telemetry/summary:
|
|
get:
|
|
tags: [Telemetry]
|
|
summary: Get telemetry summary
|
|
description: Returns aggregated telemetry data including request metrics and performance stats.
|
|
responses:
|
|
"200":
|
|
description: Telemetry summary data
|
|
|
|
/api/token-health:
|
|
get:
|
|
tags: [Telemetry]
|
|
summary: Get token health status
|
|
description: Returns health status of OAuth tokens across all providers.
|
|
responses:
|
|
"200":
|
|
description: Token health status
|
|
|
|
# ─── Evals & Policies ──────────────────────────────────────────
|
|
|
|
/api/evals:
|
|
get:
|
|
tags: [System]
|
|
summary: List eval suites
|
|
responses:
|
|
"200":
|
|
description: Eval suite list
|
|
post:
|
|
tags: [System]
|
|
summary: Run evaluation
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Eval results
|
|
|
|
/api/evals/{suiteId}:
|
|
get:
|
|
tags: [System]
|
|
summary: Get eval suite details
|
|
parameters:
|
|
- name: suiteId
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: Eval suite details
|
|
|
|
/api/policies:
|
|
get:
|
|
tags: [System]
|
|
summary: List routing policies
|
|
responses:
|
|
"200":
|
|
description: Policy list
|
|
post:
|
|
tags: [System]
|
|
summary: Create routing policy
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"201":
|
|
description: Created policy
|
|
delete:
|
|
tags: [System]
|
|
summary: Delete routing policy
|
|
responses:
|
|
"200":
|
|
description: Policy deleted
|
|
|
|
/api/compliance/audit-log:
|
|
get:
|
|
tags: [System]
|
|
summary: Get compliance audit log
|
|
parameters:
|
|
- name: limit
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
default: 100
|
|
responses:
|
|
"200":
|
|
description: Audit log entries
|
|
|
|
# ─── v1beta (Gemini-Compatible) ─────────────────────────────────
|
|
|
|
/api/v1beta/models:
|
|
get:
|
|
tags: [Models]
|
|
summary: List models (Gemini format)
|
|
description: Returns models in Gemini v1beta format for native SDK compatibility
|
|
security:
|
|
- BearerAuth: []
|
|
responses:
|
|
"200":
|
|
description: Model list in Gemini format
|
|
|
|
/api/v1beta/models/{path}:
|
|
post:
|
|
tags: [Models]
|
|
summary: Gemini generateContent
|
|
description: Gemini-compatible generateContent endpoint
|
|
security:
|
|
- BearerAuth: []
|
|
parameters:
|
|
- name: path
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
responses:
|
|
"200":
|
|
description: Generated content
|
|
|
|
# ─── OpenAPI Spec ──────────────────────────────────────────────
|
|
|
|
/api/openapi/spec:
|
|
get:
|
|
tags: [System]
|
|
summary: Get OpenAPI specification catalog
|
|
description: >-
|
|
Returns a structured JSON catalog parsed from this `openapi.yaml`,
|
|
including info, servers, tags, schemas, and a flat list of endpoints
|
|
(method, path, tags, summary, security, parameters, responses).
|
|
Used by the in-app API explorer.
|
|
responses:
|
|
"200":
|
|
description: Parsed OpenAPI catalog
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
info:
|
|
type: object
|
|
servers:
|
|
type: array
|
|
items:
|
|
type: object
|
|
tags:
|
|
type: array
|
|
items:
|
|
type: object
|
|
endpoints:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
method:
|
|
type: string
|
|
path:
|
|
type: string
|
|
tags:
|
|
type: array
|
|
items:
|
|
type: string
|
|
summary:
|
|
type: string
|
|
description:
|
|
type: string
|
|
security:
|
|
type: boolean
|
|
parameters:
|
|
type: array
|
|
items:
|
|
type: object
|
|
requestBody:
|
|
type: boolean
|
|
responses:
|
|
type: array
|
|
items:
|
|
type: string
|
|
schemas:
|
|
type: array
|
|
items:
|
|
type: string
|
|
"404":
|
|
description: openapi.yaml file not found on disk
|
|
"500":
|
|
description: Failed to parse OpenAPI spec
|
|
|
|
components:
|
|
securitySchemes:
|
|
BearerAuth:
|
|
type: http
|
|
scheme: bearer
|
|
description: API key obtained from the OmniRoute dashboard
|
|
ManagementSessionAuth:
|
|
type: apiKey
|
|
in: cookie
|
|
name: auth_token
|
|
description: Dashboard management session cookie for protected management routes
|
|
|
|
parameters:
|
|
ResourceId:
|
|
name: id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
|
|
responses:
|
|
Unauthorized:
|
|
description: Missing or invalid API key
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|
|
example: Unauthorized
|
|
ManagementAuthenticationRequired:
|
|
description: Authentication required for management routes
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ApiErrorResponse"
|
|
example:
|
|
error:
|
|
message: Authentication required
|
|
type: invalid_request
|
|
requestId: 3f9f6f5a-509a-4b35-b0a7-2d2d99d73a01
|
|
ManagementInvalidToken:
|
|
description: Bearer tokens are not accepted for management routes
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ApiErrorResponse"
|
|
example:
|
|
error:
|
|
message: Invalid management token
|
|
type: invalid_request
|
|
requestId: 1b6a6ff8-d60c-4900-8d0a-25f81749f0a3
|
|
ValidationError:
|
|
description: Request body failed validation
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ValidationErrorResponse"
|
|
|
|
schemas:
|
|
ServiceStatus:
|
|
type: object
|
|
description: Live supervisor state for an embedded service
|
|
properties:
|
|
tool:
|
|
type: string
|
|
example: 9router
|
|
state:
|
|
type: string
|
|
enum: [not_installed, stopped, starting, running, stopping, error]
|
|
pid:
|
|
type: integer
|
|
nullable: true
|
|
port:
|
|
type: integer
|
|
example: 20130
|
|
health:
|
|
type: string
|
|
enum: [unknown, healthy, degraded]
|
|
startedAt:
|
|
type: string
|
|
format: date-time
|
|
nullable: true
|
|
lastError:
|
|
type: string
|
|
nullable: true
|
|
|
|
ServiceStatusExtended:
|
|
allOf:
|
|
- $ref: "#/components/schemas/ServiceStatus"
|
|
- type: object
|
|
description: >-
|
|
Extended status including version metadata and (for 9Router) API key preview.
|
|
properties:
|
|
installedVersion:
|
|
type: string
|
|
nullable: true
|
|
latestVersion:
|
|
type: string
|
|
nullable: true
|
|
updateAvailable:
|
|
type: boolean
|
|
apiKeyMasked:
|
|
type: string
|
|
nullable: true
|
|
description: >-
|
|
Masked API key preview (e.g. "nr_****abcd").
|
|
Present only for services that use an injected API key (9Router).
|
|
autoStart:
|
|
type: boolean
|
|
providerExpose:
|
|
type: boolean
|
|
description: >-
|
|
Whether models from this service are exposed as a routing provider.
|
|
9Router only.
|
|
|
|
ApiErrorResponse:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: object
|
|
properties:
|
|
message:
|
|
type: string
|
|
type:
|
|
type: string
|
|
details:
|
|
description: Optional additional error details
|
|
requestId:
|
|
type: string
|
|
format: uuid
|
|
|
|
ValidationErrorResponse:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: object
|
|
required: [message, details]
|
|
properties:
|
|
message:
|
|
type: string
|
|
example: Invalid request
|
|
details:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required: [field, message]
|
|
properties:
|
|
field:
|
|
type: string
|
|
message:
|
|
type: string
|
|
|
|
PayloadRuleModelSpec:
|
|
type: object
|
|
additionalProperties: false
|
|
required: [name]
|
|
properties:
|
|
name:
|
|
type: string
|
|
minLength: 1
|
|
protocol:
|
|
type: string
|
|
minLength: 1
|
|
|
|
PayloadMutationRule:
|
|
type: object
|
|
additionalProperties: false
|
|
required: [models, params]
|
|
properties:
|
|
models:
|
|
type: array
|
|
minItems: 1
|
|
items:
|
|
$ref: "#/components/schemas/PayloadRuleModelSpec"
|
|
params:
|
|
type: object
|
|
minProperties: 1
|
|
additionalProperties: true
|
|
|
|
PayloadFilterRule:
|
|
type: object
|
|
additionalProperties: false
|
|
required: [models, params]
|
|
properties:
|
|
models:
|
|
type: array
|
|
minItems: 1
|
|
items:
|
|
$ref: "#/components/schemas/PayloadRuleModelSpec"
|
|
params:
|
|
type: array
|
|
minItems: 1
|
|
items:
|
|
type: string
|
|
minLength: 1
|
|
|
|
PayloadRulesConfig:
|
|
type: object
|
|
additionalProperties: false
|
|
required: [default, override, filter, defaultRaw]
|
|
properties:
|
|
default:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/PayloadMutationRule"
|
|
override:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/PayloadMutationRule"
|
|
filter:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/PayloadFilterRule"
|
|
defaultRaw:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/PayloadMutationRule"
|
|
|
|
UpdatePayloadRulesRequest:
|
|
type: object
|
|
additionalProperties: false
|
|
description: At least one payload-rules section must be present in the request body.
|
|
properties:
|
|
default:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/PayloadMutationRule"
|
|
override:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/PayloadMutationRule"
|
|
filter:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/PayloadFilterRule"
|
|
defaultRaw:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/PayloadMutationRule"
|
|
default-raw:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/PayloadMutationRule"
|
|
anyOf:
|
|
- required: [default]
|
|
- required: [override]
|
|
- required: [filter]
|
|
- required: [defaultRaw]
|
|
- required: [default-raw]
|
|
|
|
ChatCompletionRequest:
|
|
type: object
|
|
required: [model, messages]
|
|
properties:
|
|
model:
|
|
type: string
|
|
example: gpt-4o
|
|
messages:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required: [role]
|
|
properties:
|
|
role:
|
|
type: string
|
|
description: >-
|
|
Message role. The proxy accepts any non-empty string; common values
|
|
include system, user, assistant, tool, function, and developer.
|
|
example: user
|
|
content:
|
|
description: >-
|
|
Message content. May be a plain string, an array of content parts
|
|
for multimodal inputs (text, image, audio, etc.), or null when the
|
|
message only carries tool/function calls.
|
|
oneOf:
|
|
- type: string
|
|
- type: array
|
|
items:
|
|
type: object
|
|
- type: "null"
|
|
name:
|
|
type: string
|
|
tool_call_id:
|
|
type: string
|
|
tool_calls:
|
|
type: array
|
|
items:
|
|
type: object
|
|
function_call:
|
|
type: object
|
|
stream:
|
|
type: boolean
|
|
default: false
|
|
temperature:
|
|
type: number
|
|
minimum: 0
|
|
maximum: 2
|
|
max_tokens:
|
|
type: integer
|
|
top_p:
|
|
type: number
|
|
minimum: 0
|
|
maximum: 1
|
|
n:
|
|
type: integer
|
|
minimum: 1
|
|
default: 1
|
|
stop:
|
|
description: Up to 4 stop sequences (string or array of strings).
|
|
oneOf:
|
|
- type: string
|
|
- type: array
|
|
items:
|
|
type: string
|
|
maxItems: 4
|
|
frequency_penalty:
|
|
type: number
|
|
minimum: -2
|
|
maximum: 2
|
|
presence_penalty:
|
|
type: number
|
|
minimum: -2
|
|
maximum: 2
|
|
seed:
|
|
type: integer
|
|
logprobs:
|
|
type: boolean
|
|
top_logprobs:
|
|
type: integer
|
|
minimum: 0
|
|
maximum: 20
|
|
response_format:
|
|
type: object
|
|
description: Output format constraint (e.g. JSON mode or JSON Schema).
|
|
properties:
|
|
type:
|
|
type: string
|
|
example: json_object
|
|
tools:
|
|
type: array
|
|
description: Tool definitions available to the model.
|
|
items:
|
|
type: object
|
|
tool_choice:
|
|
description: Controls which tool (if any) is invoked by the model.
|
|
oneOf:
|
|
- type: string
|
|
example: auto
|
|
- type: object
|
|
parallel_tool_calls:
|
|
type: boolean
|
|
default: true
|
|
service_tier:
|
|
type: string
|
|
example: auto
|
|
user:
|
|
type: string
|
|
description: Stable end-user identifier for abuse monitoring.
|
|
|
|
ChatCompletionResponse:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
object:
|
|
type: string
|
|
example: chat.completion
|
|
choices:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
index:
|
|
type: integer
|
|
message:
|
|
type: object
|
|
properties:
|
|
role:
|
|
type: string
|
|
content:
|
|
type: string
|
|
finish_reason:
|
|
type: string
|
|
usage:
|
|
type: object
|
|
properties:
|
|
prompt_tokens:
|
|
type: integer
|
|
completion_tokens:
|
|
type: integer
|
|
total_tokens:
|
|
type: integer
|
|
|
|
MessagesRequest:
|
|
type: object
|
|
required: [model, messages, max_tokens]
|
|
properties:
|
|
model:
|
|
type: string
|
|
example: claude-sonnet-4-5-20250514
|
|
messages:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required: [role, content]
|
|
properties:
|
|
role:
|
|
type: string
|
|
enum: [user, assistant]
|
|
content:
|
|
type: string
|
|
max_tokens:
|
|
type: integer
|
|
stream:
|
|
type: boolean
|
|
default: false
|
|
system:
|
|
type: string
|
|
|
|
Model:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
object:
|
|
type: string
|
|
example: model
|
|
owned_by:
|
|
type: string
|
|
|
|
ProviderConnection:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
provider:
|
|
type: string
|
|
name:
|
|
type: string
|
|
url:
|
|
type: string
|
|
isActive:
|
|
type: boolean
|
|
maxConcurrent:
|
|
type: integer
|
|
nullable: true
|
|
minimum: 0
|
|
priority:
|
|
type: integer
|
|
testStatus:
|
|
type: string
|
|
enum: [active, error, untested]
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
|
|
ProviderConnectionCreate:
|
|
type: object
|
|
required: [provider, url]
|
|
properties:
|
|
provider:
|
|
type: string
|
|
example: openai
|
|
name:
|
|
type: string
|
|
url:
|
|
type: string
|
|
apiKey:
|
|
type: string
|
|
isActive:
|
|
type: boolean
|
|
default: true
|
|
maxConcurrent:
|
|
type: integer
|
|
nullable: true
|
|
minimum: 0
|
|
|
|
ApiKey:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
label:
|
|
type: string
|
|
keyPreview:
|
|
type: string
|
|
description: Last 4 characters of the key
|
|
isActive:
|
|
type: boolean
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
|
|
ComboCreate:
|
|
type: object
|
|
required: [name, model]
|
|
properties:
|
|
name:
|
|
type: string
|
|
model:
|
|
type: string
|
|
strategy:
|
|
type: string
|
|
enum:
|
|
- priority
|
|
- weighted
|
|
- round-robin
|
|
- context-relay
|
|
- fill-first
|
|
- p2c
|
|
- random
|
|
- least-used
|
|
- cost-optimized
|
|
- reset-aware
|
|
- strict-random
|
|
- auto
|
|
- lkgp
|
|
- context-optimized
|
|
default: priority
|
|
nodes:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
connectionId:
|
|
type: string
|
|
weight:
|
|
type: integer
|
|
priority:
|
|
type: integer
|