mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
39f7be320d1554507e1d5ba607fbce1ff64e7662
16 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3c98e9f1ef |
fix: probe container bridge network IP in healthcheck (#3151) (#3434)
Integrated into release/v3.8.17 |
||
|
|
a25d5f1ef6 |
Release v3.8.13 (#3327)
* chore(release): open v3.8.13 development cycle Bump 3.8.12 → 3.8.13 across package.json, lockfile, electron/, open-sse/, and docs/reference/openapi.yaml; add the [3.8.13] cycle placeholder to the root CHANGELOG and the 41 i18n mirrors. Integration branch for the v3.8.13 cycle — fixes/features land here via per-issue PRs and it merges to main at release time. * fix(ci): skip auto-deploy when VPS host is unreachable from the runner (#3299) Integrated into release/v3.8.13 * fix(dev): auto-rebuild better-sqlite3 on Node ABI mismatch at dev startup (#3301) Integrated into release/v3.8.13 * feat(api): accept path-scoped API keys on client API routes (#3300) Integrated into release/v3.8.13 * fix(sse): harden against empty responses causing Copilot Chat failures (#3297) Integrated into release/v3.8.13 * fix(api): remove Completions.me rickroll provider (discussion #3293) (#3302) Integrated into release/v3.8.13 * fix(opencode-provider): extract contextLength from live model catalog (#3298) Integrated into release/v3.8.13 * feat(web-cookie): self-service login infrastructure + auto-refresh daemon (#3292) Integrated into release/v3.8.13 * docs(changelog): record the v3.8.13 PRs merged this round (#3292/#3300/#3297/#3298/#3301/#3302/#3299) * fix(auth): harden URL token extraction — drop query-string fallback, gate to client routes (security follow-up to #3300) (#3309) Security follow-up to #3300 — integrated into release/v3.8.13 * docs: rename resolve-issues → review-issues skill references * fix(dashboard): keep no-auth providers visible under 'Show configured only' (#3290) (#3312) no-auth providers (opencode, duckduckgo-web, theoldllm, veoaifree-web) never create a DB connection row so stats.total stays 0, which the configured-only filter treated as 'unconfigured' and hid them — even though they are always usable and appear unconditionally in /v1/models. filterConfiguredProviderEntries now treats displayAuthType === 'no-auth' as configured. Co-authored-by: uniQta <uniQta@users.noreply.github.com> * fix(cli): resolve update paths relative to script + recursive backup (#3295) (#3313) omniroute update always failed on a global install: - getCurrentVersion() read package.json from process.cwd(), which on a global npm/brew install is the user's working dir, not the package root → null → 'Could not determine current version'. - createBackup() resolved bin/ from cwd too, and passed the 'cli' directory to copyFileSync → EISDIR, swallowed by the catch → 'Failed to create backup'. Both now resolve package.json/bin relative to the script via import.meta.url, and the backup uses cpSync({recursive:true}) so the cli/ directory is copied. Co-authored-by: uniQta <uniQta@users.noreply.github.com> * fix(theoldllm): read upstream body once to avoid [502] body-already-read (#3296) (#3314) On the cached-token path the executor never enters the refresh branch, so the same upstream Response was read with .text() twice (token-rejection check + final body). A Response body is single-use, so the second read threw 'Body is unusable: Body has already been read', caught and surfaced as [502]. Read the body once into finalBody and only re-read after a token-rejection refetch. Co-authored-by: onizukashonan14-png <onizukashonan14-png@users.noreply.github.com> * fix(sse): strip leaked internal tool envelopes from streaming output (#3311) Integrated into release/v3.8.13 * fix(sse): expose Claude + Gemini budget tiers in the antigravity catalog (#3184) (#3303) Integrated into release/v3.8.13 (#3184) * fix(catalog): compute combo context_length from known targets only (#3304) Integrated into release/v3.8.13 — live contextLength + known-targets combo context (#3298 follow-up) * chore(i18n): add message keys for proxy UI + vscode/ollama endpoint (#3307) Integrated into release/v3.8.13 — i18n message keys for proxy UI + vscode/ollama * feat(dashboard): i18n the proxy settings UI (#3310) Integrated into release/v3.8.13 — i18n the proxy settings UI * feat(api): model catalog enrichment + MCP model-catalog tools (#3306) Integrated into release/v3.8.13 — model catalog enrichment + MCP model-catalog tools, reconciled with #3309 URL-token hardening * test(catalog): align Antigravity preview-alias test with #3303 budget tiers #3303 added the Gemini `-high`/`-low` budget tiers to ANTIGRAVITY_PUBLIC_MODELS (user-callable on the Antigravity OAuth backend, verified via #3184), but did not update the catalog-route test that asserted `antigravity/gemini-3.1-pro-high` must NOT be exposed. The assertion now reflects the intended behavior — the client-visible budget alias IS surfaced — while keeping the legacy `gemini-claude-*` alias keys unexposed. Caught running the full catalog suite on the merged release HEAD (the #3303 round only ran the antigravity-aliases and usage-hardening files). * docs(changelog): record the 6 PRs merged this review round into v3.8.13 #3306/#3307/#3310 (New Features — VS Code split: catalog+MCP, i18n keys, proxy UI i18n), #3311/#3303/#3304 (Bug Fixes — SSE envelope sanitizer, antigravity budget tiers, combo known-targets context_length). * chore(release): finalize v3.8.13 changelog and cleanup Finalize the v3.8.13 changelog with release date, maintenance notes, and contributor credits. Update MCP docs to reference the correct tool inventory diagram, exclude nested .claude worktrees from ESLint scans, and tighten a response sanitizer type guard. * fix(dashboard): refresh connections after provider auth import (#3320) Integrated into release/v3.8.13 — refresh connections after provider auth import * fix(codex): strip client-only params on native /responses passthrough (#3317) (#3325) A /v1/responses request against the built-in codex/ provider does an openai-responses -> openai-responses passthrough (CodexExecutor.transformRequest returns the body early for _nativeCodexPassthrough). It forwarded client-only fields verbatim and the Codex upstream rejected them with 400 Unsupported parameter: prompt_cache_retention / safety_identifier / user — breaking Factory Droid (which injects all three). The chat-completions path already strips these (base.ts #1884, openai-responses translator #2770) but the passthrough skips translation. Strip the three fields in the shared block before the passthrough return; user is removed unconditionally since Codex /responses always rejects it. Co-authored-by: tycronk20 <tycronk20@users.noreply.github.com> * fix(dashboard): normalize agent-bridge /state response to stop page crash (#3318) (#3326) The Agent Bridge page seeded a well-shaped initialData default then replaced it wholesale with the raw /api/tools/agent-bridge/state response. The route returns { server, agents } but the UI reads { serverState, agentStates, bypassPatterns, mappings }, so serverState became undefined and AgentBridgeServerCard crashed on serverState.running — surfaced as the full-page 'Internal Server Error' boundary (client render error, not a real 5xx). Add a shared normalizeAgentBridgeState() that maps the route shape into the page contract (server.running/certExists -> serverState) and always returns safe defaults (never undefined serverState). Wired into both the SSR loader (page.tsx) and the polling hook. The legacy 'agents' entry shape differs from AgentStateEntry so it is not coerced; full route<->page contract reconciliation (port, upstreamCa, bypassPatterns, mappings, agentStates) is a follow-up. Co-authored-by: tycronk20 <tycronk20@users.noreply.github.com> * docs: VS Code/Ollama endpoints + env & i18n tooling (#3319) Integrated into release/v3.8.13 — VS Code/Ollama docs + env & i18n tooling * feat(provider): test-all endpoint, rate-limit overrides, visibility f… (#3267) Integrated into release/v3.8.13 — provider test-all endpoint, rate-limit overrides, model visibility * feat: auto-combo optimization, playground model dropdown, only-configured toggle (#3322) Integrated into release/v3.8.13 — auto-combo candidate expansion + playground dropdown + only-configured toggle * feat(api): VS Code Copilot Ollama-compatible BYOK endpoint (#3316) Integrated into release/v3.8.13 — VS Code Copilot Ollama-compatible BYOK endpoint (reconciled with #3306/#3309 auth hardening) * chore(release): document #3320 in the v3.8.13 changelog + contributor credits --------- Co-authored-by: Felipe Almeman <4226997+zhiru@users.noreply.github.com> Co-authored-by: Wilson <pedbookmed@gmail.com> Co-authored-by: Hernan Javier Ardila Sanchez <hjasgr@gmail.com> Co-authored-by: Paijo <14921983+oyi77@users.noreply.github.com> Co-authored-by: uniQta <uniQta@users.noreply.github.com> Co-authored-by: onizukashonan14-png <onizukashonan14-png@users.noreply.github.com> Co-authored-by: tycronk20 <tycronk20@users.noreply.github.com> Co-authored-by: Vinayrnani <vinayrnani@gmail.com> |
||
|
|
9032a5a4ab |
fix(docker): healthcheck tries 127.0.0.1/localhost/::1 and surfaces errors (#3151) (#3209)
The healthcheck probed only 127.0.0.1 and swallowed every error (empty Output), so containers binding to a non-loopback address always reported unhealthy with no diagnostic. Add a multi-host probe helper that succeeds on the first 2xx and prints the last error to stderr on total failure. Co-authored-by: naimo84 <naimo84@users.noreply.github.com> |
||
|
|
0231fbb335 |
build(verify): close ralph-loop-1 gaps — align tests + fix stale .next/app refs
- tests/unit/build-next-isolated.test.ts: align to .build/next distDir + removed app-snapshot transient entry (was RED 4/7 -> 7/7); legitimate alignment to the intentional Layer-1 behavior change, not masking. - scripts/dev/run-next-playwright.mjs: testDistDir() default .next -> .build/next (E2E start runner found the standalone at the wrong path). - prepublish.ts: stale log 'app/docs/' -> 'dist/docs/'. - electron/README.md: '.next/standalone' -> '.build/next/standalone'. - remove dead scripts/build/paths.mjs (created in L1, imported by nothing). Verified: build-next-isolated 7/7, run-next-playwright 3/3, assemble 1/1, lint clean. |
||
|
|
8086d2878b |
fix(ws): codex Responses-over-WebSocket upgrade — clean handshake + bridge-secret auth
Two bugs made `wscat ws://host/v1/responses` fail with "Transfer-Encoding can't be present with Content-Length": 1. authz/management policy 401'd the proxy's own internal authenticate/prepare loopback call to /api/internal/codex-responses-ws (MANAGEMENT-classified, the per-process bridge secret wasn't recognized one layer up). Added a tightly-scoped carve-out: isValidWsBridgeRequest() honors a timing-safe sha256 match of OMNIROUTE_WS_BRIDGE_SECRET (x-omniroute-ws-bridge-secret header) for that exact internal path; the route still re-validates the secret. → auth now succeeds → 101. 2. On auth failure the proxy spread the internal fetch's response headers onto the raw upgrade socket — a chunked Transfer-Encoding + Next CSP/route-class headers collided with writeHttpError's Content-Length framing (and duplicated Content-Type via a case-mismatched spread). writeHttpError now strips framing + pipeline/security headers (case-insensitive), and the auth-fail callsite no longer forwards them. Regression test: tests/unit/responses-ws-proxy-headers.test.mjs (exports writeHttpError; asserts no TE+CL, single Content-Type, no CSP/route-class leak, safe headers forwarded). |
||
|
|
58a7d97b3f |
Merge branch 'release/v3.8.8' into feat/quota-share-redesign
# Conflicts: # src/lib/db/apiKeys.ts # src/lib/db/migrationRunner.ts # src/server/authz/policies/management.ts # src/server/authz/routeGuard.ts # tests/unit/route-guard-private-lan.test.ts |
||
|
|
029e4f6943 | docs(docker): align memory default docs | ||
|
|
4b6d6c7670 |
fix(docker): honor OMNIROUTE_MEMORY_MB heap limit in standalone launcher (#2939)
The Docker image bakes NODE_OPTIONS=--max-old-space-size=256, and the standalone launcher (scripts/dev/run-standalone.mjs, the Docker CMD) spawned 'node server.js' without overriding it — so the server inherited the 256 MB cap and OOMed randomly under load or with a large SQLite DB. `omniroute serve` already honored OMNIROUTE_MEMORY_MB but the Docker path did not. Add a shared resolveMaxOldSpaceMb() helper (OMNIROUTE_MEMORY_MB, default 512, clamped [64,16384]) and have the launcher append --max-old-space-size to the child NODE_OPTIONS (a trailing flag wins, overriding the baked 256 without clobbering other flags). Update the .env.example doc to reflect the 512 default. |
||
|
|
729252008b |
fix(authz): close 2nd Host-spoof path (cliTokenAuth) + IPv6 loopback + Docker stamp
Adversarial review of the peer-IP fix surfaced: (1) CRITICAL — cliTokenAuth.ts
still derived loopback from new URL(request.url).hostname (the same spoofable
Host class), letting a remote caller with a stolen CLI token reach management
APIs via Host: 127.0.0.1; now it trusts the middleware-stamped locality verdict
(AUTHZ_HEADER_PEER_LOCALITY, a client-stripped trusted header). (2) HIGH —
isLoopbackHost mangled bare IPv6 (::1, ::ffff:127.0.0.1) via split(":")[0],
a fail-closed DoS on IPv6 deploys. (3) HIGH — the Docker entrypoint ran bare
server.js (no peer stamp); run-standalone.mjs now prefers server-ws.mjs.
|
||
|
|
0a09fa5a11 |
fix(authz): trust real TCP peer IP stamp over spoofable Host header for LOCAL_ONLY gate
The middleware runtime exposes no socket, so a prior fix derived LOCAL_ONLY locality from the Host header — letting a remote caller send Host: 127.0.0.1 and reach spawn-capable routes (RCE class). The custom Node servers now stamp the real socket.remoteAddress into a token-signed internal header; the policy trusts only a stamp whose token matches this process's secret, and fails closed otherwise. Preserves the owner-authorized loopback + private-LAN access without trusting any client-controlled header. |
||
|
|
f5073604b3 |
Release/v3.8.0 (#2430)
* fix(cli-tools): guard modelId type before calling indexOf E2E shakedown v3.8.0: cli-tools quebrava com TypeError quando dynamicModels continha entradas sem .id (objeto retornado diretamente em vez de string). * fix(offline): avoid SSR/CSR hydration mismatch on navigator.onLine Replace useState+lazy-initializer with useSyncExternalStore so the server snapshot (() => false) and client snapshot (() => navigator.onLine) are declared separately. React hydrates with the server value and switches to the real online status client-side without a mismatch. * chore(i18n): add missing en.json keys for translator, cli-tools, memory, onboarding Adds 58 missing keys identified by the new dashboard audit script: - cliTools: 18 custom CLI builder keys (CustomCliCard) - translator: 24 keys covering stream transformer, live monitor, test bench - memory: 12 health/pagination/dialog keys - onboarding.tier: 8 keys for the tier tour walkthrough Also adds scripts/i18n/audit-dashboard-pages.mjs which scans all dashboard pages, reports t() calls referencing missing en.json keys, and flags candidate hardcoded JSX/attribute strings. * chore(i18n): replace hardcoded UI text with t() calls across dashboard (round 1) Subagents refactored 8 high-impact dashboard pages, replacing 81 of the 407 hardcoded English/PT strings flagged by the audit with proper useTranslations() lookups. Added 73 corresponding keys to en.json across the home, apiManager, providers, settings, and usage namespaces. Pages affected: - BudgetTab (27 → 0) - HomePageClient (2 → 0) - RoutingTab (25 → 7) - ResilienceTab (38 → 18) - SystemStorageTab (42 → 21) - providers/[id] (17 → 15) - ApiManagerPageClient (14 → 13) - OneproxyTab (13 → 10) Also adds two helper scripts: - scripts/i18n/extract-keys-from-diff.mjs — extracts new keys from git diff - scripts/i18n/merge-keys.mjs — merges a pending-keys JSON into en.json Remaining hardcoded strings will be addressed in follow-up rounds. * chore(i18n): replace hardcoded UI text with t() calls across dashboard (round 2) Continues round 1 (commit |
||
|
|
317d146302 |
Merge release/v3.8.0 into refactor/pages
Resolves conflicts in 9 files to bring 181 commits from release/v3.8.0 into the dashboard refactor branch ahead of merging back to release. Layout strategy: our pages overhaul (tabs→pages, restructured sidebar, removed redundant headers, OpenCode Free no-auth card) is the source of truth. Release's functional additions are adapted into our layout. Conflict resolution: - package.json/package-lock.json: take release's deps (axios bump, CLI v4 deps, tls-client-node/wreq-js move to optionalDependencies); re-add our @xyflow/react addition; regenerate lockfile. - src/shared/constants/sidebarVisibility.ts: keep our 9-section restructure — release's new IDs (limits, media, cli-tools, agents, cloud-agents, memory, skills, agent-skills, context-*) are all already present in our groups. - src/i18n/messages/en.json: auto-merge picked up all release's new keys (autoCatalog*, quotaCutoffs*, systemTransforms*, schema-coercion, vision); only naming conflict was OmniSkills/AgentSkills — kept ours (no space). - src/app/(dashboard)/dashboard/HomePageClient.tsx: kept our Provider Topology card; ported release's TierCoverageWidget (placed before topology). - src/app/(dashboard)/dashboard/settings/page.tsx: kept our redirect to /settings/general (we moved tabs to separate pages); release's sticky tab CSS change is moot in our structure. - src/app/(dashboard)/dashboard/skills/page.tsx: rerere applied — release hardcoded "OmniSkills" h1 was already removed by our header-cleanup refactor. - src/app/(dashboard)/dashboard/agent-skills/page.tsx: both branches created this file independently with identical data source; kept our Tailwind-themed 2-column grid (release's version used inline styles). - src/app/(dashboard)/dashboard/batch/page.tsx: kept our single-tab structure (FilesListTab moved to /batch/files page); ported release's onRefresh prop addition. - src/app/(dashboard)/dashboard/batch/files/page.tsx (not in conflict but updated): added batches fetch + batches prop to preserve release's feature of showing related batches in the file detail modal. Pre-existing typecheck errors in open-sse/services/contextManager.ts (lines 141, 154, 167) come from release/v3.8.0 and are not introduced by this merge. |
||
|
|
68ca8bf1e9 |
refactor(dashboard): remove page-body headers, add topology multi-ring, icon+title header
- ProviderTopology: replace single-ring ellipse with multi-ring concentric layout (6 rings) - Providers sorted active → error → last-used → rest; compact node design (text-xs, 16px icon) - Header: derive icon/title from SIDEBAR_SECTIONS auto-mapping, remove breadcrumbs logic - Add HEADER_DESCRIPTIONS map for all pages with known descriptions - Use sidebar i18n namespace for titles (covers all 42 locales) - DashboardLayout: remove <Breadcrumbs /> component - Add header descriptions for 9 new pages (costs, cache, limits, api-manager, batch, context-caveman/rtk/combos, changelog) across all 41 locale files - Remove duplicate page-body title+description from 16 pages: costs, analytics, cache, cache/media, context/caveman/rtk/combos, changelog, agents, cloud-agents, skills, audit, translator, webhooks, memory, health — preserving action buttons in each - Rename sidebar "Limits & Quotas" → "Quota Limits" (en.json) - run-next.mjs: pre-read DATA_DIR from .env before bootstrap (zero-config dev start) |
||
|
|
4a84ab9c1b |
feat(termux): Android/Termux headless support (#2273)
- Move wreq-js and tls-client-node to optionalDependencies - Lazy-load wreq-js WS proxy with graceful 503 when unavailable - Auto-detect Android platform for headless mode (no browser open) - Set GYP_DEFINES for better-sqlite3 build on Android/ARM - Extended build timeout to 600s for ARM compilation - Skip wreq-js binary fix on Android (unsupported platform) - Platform warnings for unsupported features (WS proxy, TLS, Electron, MITM) Co-authored-by: t-way666 <t-way666@users.noreply.github.com> |
||
|
|
c6b269a4d5 |
node dependency updates (#2259)
chore: node dependency updates (#2259 — thanks @backryun) |
||
|
|
f3b944a55a |
refactor(scripts): organize into build/dev/check/docs/i18n/ad-hoc subfolders
Reorganizes the 29 active scripts under scripts/ into purpose-driven subfolders: - scripts/build/ (11) — Build, install, publish, runtime env - scripts/dev/ (13) — Dev servers, test runners, healthchecks - scripts/check/ (10) — Lint/validation/coverage checks - scripts/docs/ (2) — Docs index and provider reference generation - scripts/i18n/ (+3) — Adds Python translation utilities (check/validate/autotranslate) - scripts/ad-hoc/ (4) — One-shot maintenance utilities Updates all references in package.json, electron/package.json, .husky/pre-commit, .github/workflows/ci.yml, Dockerfile, src/, tests/, scripts/ internal cross-imports, playwright.config.ts, and English docs (CODEBASE_DOCUMENTATION, ENVIRONMENT, FEATURES, RELEASE_CHECKLIST, COVERAGE_PLAN, ELECTRON_GUIDE, I18N, GEMINI). Also patches scripts/build/pack-artifact-policy.ts so the npm pack allowlist mirrors the new layout. Validates with: - npm run lint (exit 0 — pre-existing minified-bundle errors only) - npm run typecheck:core (exit 0) - npm run check:docs-all (exit 0) - unit tests for moved scripts (57 tests pass) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |