From 406a150f15fea3cde3ae1a4d46876e647b977dcd Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Thu, 4 Jun 2026 06:36:10 -0300 Subject: [PATCH 01/28] chore(release): open v3.8.10 development cycle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump 3.8.9 → 3.8.10 across package.json, lockfile, electron, open-sse, and docs/reference/openapi.yaml; add the [3.8.10] CHANGELOG section (root + 41 i18n mirrors) as the integration target for the cycle. Entries land here as work merges into release/v3.8.10; finalized by the release flow. --- CHANGELOG.md | 6 ++++++ docs/i18n/ar/CHANGELOG.md | 4 ++++ docs/i18n/az/CHANGELOG.md | 4 ++++ docs/i18n/bg/CHANGELOG.md | 4 ++++ docs/i18n/bn/CHANGELOG.md | 4 ++++ docs/i18n/cs/CHANGELOG.md | 4 ++++ docs/i18n/da/CHANGELOG.md | 4 ++++ docs/i18n/de/CHANGELOG.md | 4 ++++ docs/i18n/es/CHANGELOG.md | 4 ++++ docs/i18n/fa/CHANGELOG.md | 4 ++++ docs/i18n/fi/CHANGELOG.md | 4 ++++ docs/i18n/fr/CHANGELOG.md | 4 ++++ docs/i18n/gu/CHANGELOG.md | 4 ++++ docs/i18n/he/CHANGELOG.md | 4 ++++ docs/i18n/hi/CHANGELOG.md | 4 ++++ docs/i18n/hu/CHANGELOG.md | 4 ++++ docs/i18n/id/CHANGELOG.md | 4 ++++ docs/i18n/in/CHANGELOG.md | 4 ++++ docs/i18n/it/CHANGELOG.md | 4 ++++ docs/i18n/ja/CHANGELOG.md | 4 ++++ docs/i18n/ko/CHANGELOG.md | 4 ++++ docs/i18n/mr/CHANGELOG.md | 4 ++++ docs/i18n/ms/CHANGELOG.md | 4 ++++ docs/i18n/nl/CHANGELOG.md | 4 ++++ docs/i18n/no/CHANGELOG.md | 4 ++++ docs/i18n/phi/CHANGELOG.md | 4 ++++ docs/i18n/pl/CHANGELOG.md | 4 ++++ docs/i18n/pt-BR/CHANGELOG.md | 4 ++++ docs/i18n/pt/CHANGELOG.md | 4 ++++ docs/i18n/ro/CHANGELOG.md | 4 ++++ docs/i18n/ru/CHANGELOG.md | 4 ++++ docs/i18n/sk/CHANGELOG.md | 4 ++++ docs/i18n/sv/CHANGELOG.md | 4 ++++ docs/i18n/sw/CHANGELOG.md | 4 ++++ docs/i18n/ta/CHANGELOG.md | 4 ++++ docs/i18n/te/CHANGELOG.md | 4 ++++ docs/i18n/th/CHANGELOG.md | 4 ++++ docs/i18n/tr/CHANGELOG.md | 4 ++++ docs/i18n/uk-UA/CHANGELOG.md | 4 ++++ docs/i18n/ur/CHANGELOG.md | 4 ++++ docs/i18n/vi/CHANGELOG.md | 4 ++++ docs/i18n/zh-CN/CHANGELOG.md | 4 ++++ docs/reference/openapi.yaml | 2 +- electron/package.json | 2 +- open-sse/package.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 47 files changed, 176 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb83657aba6c..32692dc52394 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,12 @@ --- +## [3.8.10] — Unreleased + +_Development cycle in progress — entries are added as work merges into `release/v3.8.10` and finalized by the release flow._ + +--- + ## [3.8.9] — 2026-06-03 ### ✨ New Features diff --git a/docs/i18n/ar/CHANGELOG.md b/docs/i18n/ar/CHANGELOG.md index 8d813ea52624..89f7968ef948 100644 --- a/docs/i18n/ar/CHANGELOG.md +++ b/docs/i18n/ar/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/az/CHANGELOG.md b/docs/i18n/az/CHANGELOG.md index 73d9da67fd9b..3461875e4d41 100644 --- a/docs/i18n/az/CHANGELOG.md +++ b/docs/i18n/az/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/bg/CHANGELOG.md b/docs/i18n/bg/CHANGELOG.md index 73d9da67fd9b..3461875e4d41 100644 --- a/docs/i18n/bg/CHANGELOG.md +++ b/docs/i18n/bg/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/bn/CHANGELOG.md b/docs/i18n/bn/CHANGELOG.md index 5ddd912d40be..9242a74359c8 100644 --- a/docs/i18n/bn/CHANGELOG.md +++ b/docs/i18n/bn/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/cs/CHANGELOG.md b/docs/i18n/cs/CHANGELOG.md index 483d32503dc9..325e28e7a61e 100644 --- a/docs/i18n/cs/CHANGELOG.md +++ b/docs/i18n/cs/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/da/CHANGELOG.md b/docs/i18n/da/CHANGELOG.md index dc8e62974c34..1a8e491c176d 100644 --- a/docs/i18n/da/CHANGELOG.md +++ b/docs/i18n/da/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/de/CHANGELOG.md b/docs/i18n/de/CHANGELOG.md index 2fa62b0e48db..90445e09a7bc 100644 --- a/docs/i18n/de/CHANGELOG.md +++ b/docs/i18n/de/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/es/CHANGELOG.md b/docs/i18n/es/CHANGELOG.md index 9290d2fc5d09..f4f5d278070b 100644 --- a/docs/i18n/es/CHANGELOG.md +++ b/docs/i18n/es/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/fa/CHANGELOG.md b/docs/i18n/fa/CHANGELOG.md index b3c02ef5ec4f..0f93651755f1 100644 --- a/docs/i18n/fa/CHANGELOG.md +++ b/docs/i18n/fa/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/fi/CHANGELOG.md b/docs/i18n/fi/CHANGELOG.md index 0316fffb8eee..6f26b40958ba 100644 --- a/docs/i18n/fi/CHANGELOG.md +++ b/docs/i18n/fi/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/fr/CHANGELOG.md b/docs/i18n/fr/CHANGELOG.md index 941023cbd235..8e54d78c42c4 100644 --- a/docs/i18n/fr/CHANGELOG.md +++ b/docs/i18n/fr/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/gu/CHANGELOG.md b/docs/i18n/gu/CHANGELOG.md index 1def3ed54408..a6caf3e7f94c 100644 --- a/docs/i18n/gu/CHANGELOG.md +++ b/docs/i18n/gu/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/he/CHANGELOG.md b/docs/i18n/he/CHANGELOG.md index bd1bf55274c1..4447f1a2743e 100644 --- a/docs/i18n/he/CHANGELOG.md +++ b/docs/i18n/he/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/hi/CHANGELOG.md b/docs/i18n/hi/CHANGELOG.md index 677dcce5985e..1e78f828b3b4 100644 --- a/docs/i18n/hi/CHANGELOG.md +++ b/docs/i18n/hi/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/hu/CHANGELOG.md b/docs/i18n/hu/CHANGELOG.md index 8612e6d80a0c..b005468f6782 100644 --- a/docs/i18n/hu/CHANGELOG.md +++ b/docs/i18n/hu/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/id/CHANGELOG.md b/docs/i18n/id/CHANGELOG.md index e1a9c1ae7721..dca5461e8b4f 100644 --- a/docs/i18n/id/CHANGELOG.md +++ b/docs/i18n/id/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/in/CHANGELOG.md b/docs/i18n/in/CHANGELOG.md index d9f79c90cb83..605a8895b7bd 100644 --- a/docs/i18n/in/CHANGELOG.md +++ b/docs/i18n/in/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/it/CHANGELOG.md b/docs/i18n/it/CHANGELOG.md index c1ef920607d5..17703c984f18 100644 --- a/docs/i18n/it/CHANGELOG.md +++ b/docs/i18n/it/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/ja/CHANGELOG.md b/docs/i18n/ja/CHANGELOG.md index 8e770461ee14..8bf9c38366b8 100644 --- a/docs/i18n/ja/CHANGELOG.md +++ b/docs/i18n/ja/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/ko/CHANGELOG.md b/docs/i18n/ko/CHANGELOG.md index 3c6407f54118..0ba8b00b7c74 100644 --- a/docs/i18n/ko/CHANGELOG.md +++ b/docs/i18n/ko/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/mr/CHANGELOG.md b/docs/i18n/mr/CHANGELOG.md index af8e27de0f75..71e9564821e7 100644 --- a/docs/i18n/mr/CHANGELOG.md +++ b/docs/i18n/mr/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/ms/CHANGELOG.md b/docs/i18n/ms/CHANGELOG.md index e58a6e0cd43d..d8f8cb2ed442 100644 --- a/docs/i18n/ms/CHANGELOG.md +++ b/docs/i18n/ms/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/nl/CHANGELOG.md b/docs/i18n/nl/CHANGELOG.md index f6e37359fb09..04fb8e76928e 100644 --- a/docs/i18n/nl/CHANGELOG.md +++ b/docs/i18n/nl/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/no/CHANGELOG.md b/docs/i18n/no/CHANGELOG.md index 2e2b5b04f1ff..73b7bc4f5f52 100644 --- a/docs/i18n/no/CHANGELOG.md +++ b/docs/i18n/no/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/phi/CHANGELOG.md b/docs/i18n/phi/CHANGELOG.md index 2e286178053b..97a0b4e6ea5e 100644 --- a/docs/i18n/phi/CHANGELOG.md +++ b/docs/i18n/phi/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/pl/CHANGELOG.md b/docs/i18n/pl/CHANGELOG.md index 1f66b35766ad..947a301e0577 100644 --- a/docs/i18n/pl/CHANGELOG.md +++ b/docs/i18n/pl/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/pt-BR/CHANGELOG.md b/docs/i18n/pt-BR/CHANGELOG.md index bebdacc5c2e5..5cb2163a4e31 100644 --- a/docs/i18n/pt-BR/CHANGELOG.md +++ b/docs/i18n/pt-BR/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/pt/CHANGELOG.md b/docs/i18n/pt/CHANGELOG.md index 0592522bfed8..e22a033244c8 100644 --- a/docs/i18n/pt/CHANGELOG.md +++ b/docs/i18n/pt/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/ro/CHANGELOG.md b/docs/i18n/ro/CHANGELOG.md index 6387aa3f5d55..58235158647a 100644 --- a/docs/i18n/ro/CHANGELOG.md +++ b/docs/i18n/ro/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/ru/CHANGELOG.md b/docs/i18n/ru/CHANGELOG.md index 5b6368d1cb3d..9bfb7479a8e5 100644 --- a/docs/i18n/ru/CHANGELOG.md +++ b/docs/i18n/ru/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/sk/CHANGELOG.md b/docs/i18n/sk/CHANGELOG.md index 45e56f92e25d..264c15d459bb 100644 --- a/docs/i18n/sk/CHANGELOG.md +++ b/docs/i18n/sk/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/sv/CHANGELOG.md b/docs/i18n/sv/CHANGELOG.md index 010a5181be9b..ba65e04af075 100644 --- a/docs/i18n/sv/CHANGELOG.md +++ b/docs/i18n/sv/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/sw/CHANGELOG.md b/docs/i18n/sw/CHANGELOG.md index 7fc8f13f9210..8f926685abaf 100644 --- a/docs/i18n/sw/CHANGELOG.md +++ b/docs/i18n/sw/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/ta/CHANGELOG.md b/docs/i18n/ta/CHANGELOG.md index 0654f98f37b7..a3c681eb05e4 100644 --- a/docs/i18n/ta/CHANGELOG.md +++ b/docs/i18n/ta/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/te/CHANGELOG.md b/docs/i18n/te/CHANGELOG.md index 7b769d11a350..fc4413b994da 100644 --- a/docs/i18n/te/CHANGELOG.md +++ b/docs/i18n/te/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/th/CHANGELOG.md b/docs/i18n/th/CHANGELOG.md index 0915802f7e44..9304df41805e 100644 --- a/docs/i18n/th/CHANGELOG.md +++ b/docs/i18n/th/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/tr/CHANGELOG.md b/docs/i18n/tr/CHANGELOG.md index f392b89bdc5d..d6cb2a0ccf34 100644 --- a/docs/i18n/tr/CHANGELOG.md +++ b/docs/i18n/tr/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/uk-UA/CHANGELOG.md b/docs/i18n/uk-UA/CHANGELOG.md index 9c5c8858e963..89e8526c0848 100644 --- a/docs/i18n/uk-UA/CHANGELOG.md +++ b/docs/i18n/uk-UA/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/ur/CHANGELOG.md b/docs/i18n/ur/CHANGELOG.md index 222b46f47b6b..22b814a53d87 100644 --- a/docs/i18n/ur/CHANGELOG.md +++ b/docs/i18n/ur/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/vi/CHANGELOG.md b/docs/i18n/vi/CHANGELOG.md index 2144352d0947..eefcd9ee0975 100644 --- a/docs/i18n/vi/CHANGELOG.md +++ b/docs/i18n/vi/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/i18n/zh-CN/CHANGELOG.md b/docs/i18n/zh-CN/CHANGELOG.md index d79a366b57b0..730f389926cf 100644 --- a/docs/i18n/zh-CN/CHANGELOG.md +++ b/docs/i18n/zh-CN/CHANGELOG.md @@ -4,6 +4,10 @@ --- +## [3.8.10] — Unreleased + +--- + ## [3.8.9] — Unreleased --- diff --git a/docs/reference/openapi.yaml b/docs/reference/openapi.yaml index c67478f66493..38341c8d9090 100644 --- a/docs/reference/openapi.yaml +++ b/docs/reference/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.1.0 info: title: OmniRoute API - version: 3.8.9 + version: 3.8.10 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, diff --git a/electron/package.json b/electron/package.json index 660a4760e806..a8da362d8e6d 100644 --- a/electron/package.json +++ b/electron/package.json @@ -1,6 +1,6 @@ { "name": "omniroute-desktop", - "version": "3.8.9", + "version": "3.8.10", "description": "OmniRoute Desktop Application", "main": "main.js", "author": { diff --git a/open-sse/package.json b/open-sse/package.json index d847eff1f080..d3d67c1c4383 100644 --- a/open-sse/package.json +++ b/open-sse/package.json @@ -1,6 +1,6 @@ { "name": "@omniroute/open-sse", - "version": "3.8.9", + "version": "3.8.10", "description": "Express SSE sidecar for OmniRoute — handles streaming, protocol translation, and provider orchestration", "type": "module", "main": "index.js", diff --git a/package-lock.json b/package-lock.json index a759f45d4559..45dcfa1de1ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "omniroute", - "version": "3.8.9", + "version": "3.8.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "omniroute", - "version": "3.8.9", + "version": "3.8.10", "hasInstallScript": true, "license": "MIT", "workspaces": [ diff --git a/package.json b/package.json index 03c72b21845b..4a69df2325fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "omniroute", - "version": "3.8.9", + "version": "3.8.10", "description": "Unified AI router with 160+ providers, RTK+Caveman compression, auto fallback, MCP/A2A, desktop, PWA, and OpenAI-compatible APIs.", "type": "module", "bin": { From 2eb0f0500cace9163620d99e1a3b3d5b01c039f7 Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Thu, 4 Jun 2026 13:42:25 -0300 Subject: [PATCH 02/28] fix(providers): resolve web provider alias collisions Assign unique aliases to HuggingChat, Kimi Web, and Qwen Web so they no longer shadow primary providers or trigger startup warnings. Add a unit test to enforce provider alias uniqueness and prevent future collisions. Also expand local ignore and VS Code exclude rules for agent, build, and worktree artifacts. --- .../0db0ca8e-3c51-48d9-83e2-da62c6f0a02b.json | 1 - .gitignore | 12 + .i18n-state.json | 219 ------------------ .vscode/launch.json | 31 --- .vscode/settings.json | 23 +- ONBOARDING.md | 72 ------ devbox.json | 17 -- devbox.lock | 26 --- open-sse/config/providerRegistry.ts | 12 +- recent_issues.jsonl | 10 - src/shared/constants/providers.ts | 9 +- tests/unit/provider-alias-uniqueness.test.ts | 64 +++++ 12 files changed, 112 insertions(+), 384 deletions(-) delete mode 120000 .antigravitycli/0db0ca8e-3c51-48d9-83e2-da62c6f0a02b.json delete mode 100644 .i18n-state.json delete mode 100644 .vscode/launch.json delete mode 100644 ONBOARDING.md delete mode 100644 devbox.json delete mode 100644 devbox.lock delete mode 100644 recent_issues.jsonl create mode 100644 tests/unit/provider-alias-uniqueness.test.ts diff --git a/.antigravitycli/0db0ca8e-3c51-48d9-83e2-da62c6f0a02b.json b/.antigravitycli/0db0ca8e-3c51-48d9-83e2-da62c6f0a02b.json deleted file mode 120000 index 263f1a6d6e18..000000000000 --- a/.antigravitycli/0db0ca8e-3c51-48d9-83e2-da62c6f0a02b.json +++ /dev/null @@ -1 +0,0 @@ -/home/diegosouzapw/.gemini/config/projects/0db0ca8e-3c51-48d9-83e2-da62c6f0a02b.json \ No newline at end of file diff --git a/.gitignore b/.gitignore index a0142644e042..6f31e0d47e7f 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,18 @@ _ideia/ _mono_repo/ _references/ _tasks/ +.agents/** +.claude/** +.gemini/** +.config/** +.data/** +.logs/** +.tests/** +.coverage/** +.dist/** +.next/** +.build/** +.out/** # Memory Bank and Cursor rules (local-only AI agent context) diff --git a/.i18n-state.json b/.i18n-state.json deleted file mode 100644 index b544343cf4c7..000000000000 --- a/.i18n-state.json +++ /dev/null @@ -1,219 +0,0 @@ -{ - "sources": { - "CLAUDE.md": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "locales": { - "pt-BR": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "301b997e936b1d476e6094042666b96b33f42a4372fd2d9ccf904aacbfd7f023", - "updated_at": "2026-05-22T20:13:39.165Z" - }, - "az": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "c26844ec50b2abfbb002767fb5c6c9c3982ec65789435bbc134bf1a7b50bf84a", - "updated_at": "2026-05-22T20:13:39.166Z" - }, - "bn": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "0b1416ec3b5af8cc6415d12a9ff12ce078acca4a7bb52a7422ebde3b6ae22832", - "updated_at": "2026-05-22T20:13:39.166Z" - }, - "ar": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "bc747c5ea2a387dd37dea9dc1337d9734f2ec0da38a7134573d9743e3f4d2aef", - "updated_at": "2026-05-22T20:13:39.167Z" - }, - "cs": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "e37dce45820b53be9d3d5ead08cadb8d13e4c77597b3009bb0be4e485917f5c6", - "updated_at": "2026-05-22T20:13:39.167Z" - }, - "da": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "645c382bebe0931eaad6747e33667fd094b92b3f4042549b953db798de6b1f46", - "updated_at": "2026-05-22T20:13:39.168Z" - }, - "de": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "b6558f82eb67676baf4d78946a8d1e1b808f7763e5ebaf9f57948cbd1641dc0f", - "updated_at": "2026-05-22T20:13:39.168Z" - }, - "es": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "afb2a2dfa74a74c3105b0ac70181d33f5eefd201efe7edb6aba0740864639fe5", - "updated_at": "2026-05-22T20:13:39.169Z" - }, - "fa": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "58966769aeb71d23c55cf4aeb452f2bbe32036df8fba1d7596f3e861897d507b", - "updated_at": "2026-05-22T20:13:39.169Z" - }, - "fi": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "04cf72a3b370edcb3d54361c6cc250b3af227ba183376827006c7998839740aa", - "updated_at": "2026-05-22T20:13:39.169Z" - }, - "fr": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "8dca6de87c88e04396f1139ac8b6328d188defaa5abc99eeb4026f53de772ba1", - "updated_at": "2026-05-22T20:13:39.170Z" - }, - "he": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "0308a2c8c5a6b6261474a76c160f3c0658c75f56a633a57bd7300b83ccb32c9d", - "updated_at": "2026-05-22T20:13:39.170Z" - }, - "hi": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "a3e902c3b1812a41ccb14c9f16d2cf2e42b8c005a5d557043e582d48eda024c4", - "updated_at": "2026-05-22T20:13:39.170Z" - }, - "gu": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "1bc2419db39c7c7960b065222a3e3990e9e53c4d3427ec02422e3e506aa53733", - "updated_at": "2026-05-22T20:13:39.171Z" - }, - "hu": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "ec30f54810f8b5b84e3ac8bf7bc8d05acc8616d71801b672ec02f0bc225cf607", - "updated_at": "2026-05-22T20:13:39.171Z" - }, - "id": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "aebd8fdad7ec4857aa1b958cda37f59681846525207d71d98d729775031afb94", - "updated_at": "2026-05-22T20:13:39.172Z" - }, - "in": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "ac70a1282877f8c4f792e9235f7a6fbce3cbec4a424ce4947074bb210fe12d67", - "updated_at": "2026-05-22T20:13:39.172Z" - }, - "it": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "260f10dd121441d08e15a8d511789d8f8f7a788995305ab5e8dc6d0c1a3db06e", - "updated_at": "2026-05-22T20:13:39.173Z" - }, - "ja": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "83871c13e99d13d7928409b2aef182f55fe36fbb2425f8fa4bd0df0466afed28", - "updated_at": "2026-05-22T20:13:39.173Z" - }, - "mr": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "0c35c5261dd3b6c6b729d14653f95cc112f3ed9829d2d41b61e5a960abc68556", - "updated_at": "2026-05-22T20:13:39.173Z" - }, - "ko": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "4ea4079b37d90e90e9a32d0da290e04e38bcd6426512b50ca7be7139354bc329", - "updated_at": "2026-05-22T20:13:39.174Z" - }, - "ms": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "0e8031cd987766a69afc7aaf7c3560a57736d37e7238ddccfb848d6fbeb3f212", - "updated_at": "2026-05-22T20:13:39.174Z" - }, - "nl": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "27e554c3a9b86db1f04539fcac18d3e75e6599d4de9f5ac0cf789a136b5737d4", - "updated_at": "2026-05-22T20:13:39.174Z" - }, - "phi": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "f955af44cc0e8e87a2a7b12313f0dfad9aae1a50d7855e74c8155df3601279ad", - "updated_at": "2026-05-22T20:13:39.175Z" - }, - "no": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "de4e3d940ae485c85da13db4471fcc68926ec53e660d92633f01293c5db0a04d", - "updated_at": "2026-05-22T20:13:39.175Z" - }, - "pl": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "de5be8961e5184431404d0021e31c3ef0857f7439fbd1c71ddc0c6828bed86bb", - "updated_at": "2026-05-22T20:13:39.175Z" - }, - "ro": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "19d98b22bc77c1870b749fad6e62a41c6ef53f3cad303d1c471fba4bf7012797", - "updated_at": "2026-05-22T20:13:39.175Z" - }, - "ru": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "25e0c70ec25bd24b073b9d693299c3c3d32d66a410569362719e9c9ecacd759d", - "updated_at": "2026-05-22T20:13:39.176Z" - }, - "pt": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "0d31647b21af967d8d4e9ecbcfc4901a66db377a6853d7b59296a2d73f0cab12", - "updated_at": "2026-05-22T20:13:39.176Z" - }, - "sk": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "9d5d0ce1c51da4959d1c306969bff0bf36d3a3492ccdbdbd82e4f4d951f32c8b", - "updated_at": "2026-05-22T20:13:39.176Z" - }, - "sw": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "11cd3dc7a605eebddf4a34c13de66c713d67adb32e4242962a65c71e5a034c7e", - "updated_at": "2026-05-22T20:13:39.177Z" - }, - "sv": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "93b679feb6415315ab96e08298217e66be84265a277e267ecefd25b2cef04026", - "updated_at": "2026-05-22T20:13:39.177Z" - }, - "ta": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "55f3df128513a1b4a8cc3f58eb84769814589d80e1c8b8f03ab0635750a76d2d", - "updated_at": "2026-05-22T20:13:39.177Z" - }, - "te": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "81019604dd1fb38dfda55c1b8cf5cf8243347be08221a5e1eb11e8c76e095fab", - "updated_at": "2026-05-22T20:13:39.178Z" - }, - "tr": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "b67efd07b179be016b388dff4b8979597c0a7b2db602629cef539dbec14913ab", - "updated_at": "2026-05-22T20:13:39.178Z" - }, - "th": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "a793a12dc0cba5e3641cd544f63ab23e9cfe1b80568a08770a81ffd890287eda", - "updated_at": "2026-05-22T20:13:39.179Z" - }, - "ur": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "6c03049aee6d85b6fd4a3bf9b89a6204e461d3f05e9cb767e36c80af796452df", - "updated_at": "2026-05-22T20:13:39.179Z" - }, - "vi": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "4d35c6898f98913a02551dcfbf4d3748b2461e2d8206d292f292acacf0fc7133", - "updated_at": "2026-05-22T20:13:39.180Z" - }, - "zh-CN": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "d3f574c244d157c1fe1b9fc86192d1565df2dc6343ac9ef63c0fd3f91d97f492", - "updated_at": "2026-05-22T20:13:39.180Z" - }, - "uk-UA": { - "source_hash": "c808d01e42e9aaaede590048dc327347c9e814b152c6f45f54be6df64f4f19df", - "target_hash": "ffe6357e38d56ba2595e8fb8e21db4ae91bf03d10fca50a2b722e0d0bb6c01d9", - "updated_at": "2026-05-22T20:13:39.181Z" - } - } - }, - "docs/architecture/ARCHITECTURE.md": { - "source_hash": "f9b4f17a1b0331fb5500768943438411ed88a38278381680caacc37c90bfb869", - "locales": { - "pt-BR": { - "source_hash": "f9b4f17a1b0331fb5500768943438411ed88a38278381680caacc37c90bfb869", - "target_hash": "e320c6172a88a0f3b698ba1a2e9e938424ece66625765395837bcf55cc29454e", - "updated_at": "2026-05-22T20:13:39.183Z" - } - } - } - } -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index caa4ab6868e9..000000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Debug Dev Server", - "type": "node", - "request": "launch", - "runtimeExecutable": "${env:HOME}/.nvm/versions/node/v22.22.2/bin/node", - "program": "${workspaceFolder}/scripts/run-next.mjs", - "args": ["dev"], - "console": "integratedTerminal", - "skipFiles": ["/**", "node_modules/**"] - }, - { - "name": "Debug Prod Server", - "type": "node", - "request": "launch", - "program": "${workspaceFolder}/scripts/run-next.mjs", - "args": ["start"], - "console": "integratedTerminal", - "skipFiles": ["/**", "node_modules/**"] - }, - { - "name": "Attach to Running Server", - "type": "node", - "request": "attach", - "port": 9229, - "skipFiles": ["/**", "node_modules/**"] - } - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json index b5113dde4db1..c6b72dd90d84 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -36,7 +36,18 @@ "**/node_modules/**": true, "**/.next/**": true, "**/coverage/**": true, - "**/_tasks/**": true + "**/_tasks/**": true, + "**/.git/objects/**": true, + "**/dist/**": true, + "**/build/**": true, + "**/out/**": true, + "**/.cache/**": true, + "**/.turbo/**": true, + "**/OmniRoute-*/**": true, + "**/*-merge-*/**": true, + "**/*-worktree-*/**": true, + "**/*-issues-*/**": true, + "**/*-reorg*/**": true }, "search.exclude": { "**/_references": true, @@ -45,6 +56,14 @@ "**/node_modules": true, "**/.next": true, "**/coverage": true, - "**/_tasks": true + "**/_tasks": true, + "**/dist": true, + "**/build": true, + "**/out": true, + "**/OmniRoute-*": true, + "**/*-merge-*": true, + "**/*-worktree-*": true, + "**/*-issues-*": true, + "**/*-reorg*": true } } diff --git a/ONBOARDING.md b/ONBOARDING.md deleted file mode 100644 index e0cba2070d83..000000000000 --- a/ONBOARDING.md +++ /dev/null @@ -1,72 +0,0 @@ -# Welcome to OmniRoute - -## How We Use Claude - -Based on diegosouzapw's usage over the last 30 days: - -Work Type Breakdown: -Build Feature ████████████████████ 50% -Plan Design ██████████░░░░░░░░░░ 25% -Improve Quality ██████░░░░░░░░░░░░░░ 15% -Write Docs ████░░░░░░░░░░░░░░░░ 10% - -Top Skills & Commands: -_no slash commands captured in this window_ - -Top MCP Servers: -_no MCP usage captured in this window_ - -## Your Setup Checklist - -### Codebases - -- [ ] omniroute — https://github.com/diegosouzapw/omniroute -- [ ] OpenCode_Ecosystem (fork) — https://github.com/diegosouzapw/OpenCode_Ecosystem -- [ ] OpenCode_Ecosystem (upstream) — https://github.com/MarceloClaro/OpenCode_Ecosystem - -### MCP Servers to Activate - -- [ ] _none required from current usage. If you'll be working on OmniRoute itself, ask the team about the project's own embedded MCP server at `/api/mcp/stream`._ - -### Skills to Know About - -- _no skills surfaced from usage data. The team's workflow leaned heavily on direct file edits, git/gh CLI, and subagent dispatch for parallel work — Claude figures these out from context._ - -## Team Tips - -- **Read `CLAUDE.md` first.** It has hard rules that override defaults — e.g. never write raw SQL in routes (use `src/lib/db/` modules), never add `Co-Authored-By: Claude` to commits, error responses must go through `buildErrorBody()` / `sanitizeErrorMessage()`. -- **Subagents for parallel work.** When tasks are independent, dispatch multiple sonnet subagents in one message instead of doing them yourself. Always audit `git diff` after a subagent finishes — its summary describes intent, not necessarily the result. -- **Conventional Commits** for everything: `feat(scope):`, `fix(scope):`, `chore(scope):`, `docs:`. Scopes used here include `db`, `sse`, `oauth`, `dashboard`, `api`, `agents`, `plugin`, `skills`, `commands`. -- **Run the full validation suite before declaring done** — `npm run check` (lint + tests) at minimum; `npm run test:coverage` if you changed production code. Hard gate: 75/75/75/70 (statements/lines/functions/branches). -- **Husky pre-push runs unit tests.** Don't `--no-verify` past it without explicit approval — the project documents this as a hard rule. - -## Get Started - -- Clone the repo and run `npm install` (auto-generates `.env` from `.env.example`). -- Generate secrets: `openssl rand -base64 48` for `JWT_SECRET`, `openssl rand -hex 32` for `API_KEY_SECRET`. Paste into `.env`. -- `npm run dev` → dashboard at `http://localhost:20128`. -- Read `docs/architecture/REPOSITORY_MAP.md` for the file layout, then `docs/architecture/ARCHITECTURE.md` for how requests flow. -- For a first PR: pick something from `_tasks/` if there's a backlog, or grep for `// TODO` and pick a small one. Run `npm run check` before opening the PR. - - diff --git a/devbox.json b/devbox.json deleted file mode 100644 index 87fd4a235730..000000000000 --- a/devbox.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "name": "omniroute", - "version": "3.8.2", - "description": "Unified AI router with 160+ providers, RTK+Caveman compression, auto fallback, MCP/A2A, desktop, PWA, and OpenAI-compatible APIs.", - "packages": [ - "nodejs_22", - ], - "shell": { - "init_hook": [ - "echo 'Welcome to OmniRoute dev environment'", - ], - "hooks": { - "on_create": "npm install" - } - } -} diff --git a/devbox.lock b/devbox.lock deleted file mode 100644 index ae5d932cd6ac..000000000000 --- a/devbox.lock +++ /dev/null @@ -1,26 +0,0 @@ -{ - "lockfile_version": "1", - "packages": { - "eslint": { - "resolved": "github:NixOS/nixpkgs/6dedf69f94d03cbe7bdde106f2d4c23ae2a853bf#eslint", - "source": "nixpkg" - }, - "github:NixOS/nixpkgs/nixpkgs-unstable": { - "last_modified": "2026-05-22T01:51:30Z", - "resolved": "github:NixOS/nixpkgs/6dedf69f94d03cbe7bdde106f2d4c23ae2a853bf?lastModified=1779414690" - }, - "nodejs_22": { - "plugin_version": "0.0.2", - "resolved": "github:NixOS/nixpkgs/6dedf69f94d03cbe7bdde106f2d4c23ae2a853bf#nodejs_22", - "source": "nixpkg" - }, - "pnpm": { - "resolved": "github:NixOS/nixpkgs/6dedf69f94d03cbe7bdde106f2d4c23ae2a853bf#pnpm", - "source": "nixpkg" - }, - "typescript": { - "resolved": "github:NixOS/nixpkgs/6dedf69f94d03cbe7bdde106f2d4c23ae2a853bf#typescript", - "source": "nixpkg" - } - } -} diff --git a/open-sse/config/providerRegistry.ts b/open-sse/config/providerRegistry.ts index fb304d7964e9..b030d9c498bb 100644 --- a/open-sse/config/providerRegistry.ts +++ b/open-sse/config/providerRegistry.ts @@ -2437,7 +2437,9 @@ const _REGISTRY_EAGER: Record = { huggingchat: { id: "huggingchat", - alias: "hc", + // Distinct alias: "hc" belongs to the hackclub provider; huggingchat is + // addressed by its own id to avoid the alias collision. + alias: "huggingchat", format: "openai", executor: "huggingchat", baseUrl: "https://huggingface.co/chat/conversation", @@ -3863,7 +3865,9 @@ const _REGISTRY_EAGER: Record = { "kimi-web": { id: "kimi-web", - alias: "kimi", + // Distinct alias: the primary "kimi" provider (dedicated KimiExecutor) keeps + // the short "kimi" alias; this web/cookie variant is addressed by its own id. + alias: "kimi-web", format: "openai", executor: "kimi-web", baseUrl: "https://kimi.moonshot.cn/api/chat", @@ -3891,7 +3895,9 @@ const _REGISTRY_EAGER: Record = { "qwen-web": { id: "qwen-web", - alias: "qw", + // Distinct alias: the primary "qwen" provider keeps the short "qw" alias; + // this web/cookie variant is addressed by its own id. + alias: "qwen-web", format: "openai", executor: "qwen-web", baseUrl: "https://chat.qwen.ai/api/chat/completions", diff --git a/recent_issues.jsonl b/recent_issues.jsonl deleted file mode 100644 index 5f339d1f8d15..000000000000 --- a/recent_issues.jsonl +++ /dev/null @@ -1,10 +0,0 @@ -{"author":{"id":"MDQ6VXNlcjE0OTIxOTgz","is_bot":false,"login":"oyi77","name":"Paijo"},"body":"# Comprehensive Documentation Site Overhaul\n\n## 🎯 Objective\nTransform OmniRoute's scattered documentation into a comprehensive, structured documentation site with interactive features, advanced search, and professional organization inspired by industry best practices.\n\n## 📋 Problem Statement\nCurrent documentation system limitations:\n- **Scattered Organization**: Markdown files spread across repository with limited navigation\n- **No Dedicated Site**: Lack of professional documentation portal\n- **Limited Discoverability**: Poor search and feature discovery\n- **Static Content**: No interactive elements or API testing\n- **Inconsistent Quality**: Varied formatting and structure\n\n## ✨ Proposed Solution\n\n### New Documentation Structure\n\n\n### Key Features\n- **Interactive API Documentation**: Swagger/OpenAPI with try-it-now functionality\n- **Advanced Search**: Algolia/DocSearch with autocomplete and filtering\n- **Versioned Content**: Clear version tags and migration guides\n- **Code Examples**: Runnable examples with copy-to-clipboard\n- **Visual Aids**: Interactive Mermaid diagrams and architecture visualizations\n- **Responsive Design**: Mobile-friendly with dark mode support\n- **Analytics**: Usage tracking and feedback system\n\n### Technology Stack\n- **Framework**: Next.js (consistent with OmniRoute dashboard)\n- **Content**: MDX (Markdown + React components)\n- **Styling**: Tailwind CSS (matches OmniRoute UI)\n- **Search**: Algolia DocSearch or Fuse.js\n- **Deployment**: Vercel with preview deployments\n\n## 📈 Expected Benefits\n- **50% increase** in documentation page views\n- **30% reduction** in support requests for basic questions\n- **40% increase** in time spent on documentation pages\n- **90% positive** feedback on documentation quality\n- **25% increase** in community contributions\n\n## 🔧 Implementation Plan\n\n### Phase 1: Foundation (2 weeks)\n- Set up Next.js documentation framework\n- Design component library with OmniRoute theme\n- Implement MDX processing pipeline\n- Set up CI/CD pipeline with preview deployments\n\n### Phase 2: Content Migration (4 weeks)\n- Audit and categorize existing documentation\n- Create automated migration tools\n- Migrate core content with quality validation\n- Implement redirects from old URLs\n\n### Phase 3: Advanced Features (3 weeks)\n- Implement search functionality with Algolia\n- Add interactive API documentation\n- Create versioning system\n- Implement analytics and feedback\n\n### Phase 4: Testing & Launch (2 weeks)\n- Comprehensive testing (unit, integration, E2E)\n- Performance optimization\n- Accessibility validation\n- Final review and official launch\n\n## 📊 Success Metrics\n- All content successfully migrated and validated\n- Search functionality achieves ≥90% relevance in test queries\n- Accessibility compliance (WCAG 2.1 AA) verified\n- Performance metrics meet targets (Lighthouse ≥90)\n- 50% increase in documentation engagement\n\n## 🎯 Definition of Done\n- Complete content migration with validation\n- All interactive features fully functional\n- Search system operational with ≥90% relevance\n- Accessibility compliance verified\n- Performance targets achieved\n- Analytics and feedback system implemented\n- Comprehensive documentation completed\n\n## 📝 Additional Context\nThis overhaul will create a professional documentation portal that improves user onboarding, feature discovery, and overall satisfaction while maintaining consistency with OmniRoute's brand and technical stack. The new site will serve as the primary resource for users, developers, and contributors.","comments":[],"createdAt":"2026-05-04T20:54:55Z","labels":[],"number":1958,"title":"feat: Comprehensive Documentation Site Overhaul"} -{"author":{"id":"MDQ6VXNlcjE0OTIxOTgz","is_bot":false,"login":"oyi77","name":"Paijo"},"body":"# Manifest Routing Integration - Tier Resolution & Specificity Detection\n\n## 🎯 Objective\nEnhance OmniRoute's combo routing system by integrating Manifest's sophisticated tier resolution and specificity detection logic to create a more intelligent, context-aware routing engine that optimizes for both performance and cost.\n\n## 📋 Problem Statement\nThe current combo routing system, while functional with 13 strategies, lacks:\n- **Tier Resolution**: Provider classification based on performance, cost, and capabilities\n- **Specificity Detection**: Content complexity analysis for optimal route selection\n- **Adaptive Strategies**: Dynamic adjustment based on real-time metrics and query requirements\n\n## ✨ Proposed Solution\n\n### Core Components\n1. **Tier Resolution System**\n - 3-level classification: static rules → heuristics → specificity-based\n - Dynamic tier assignment based on real-time provider metrics\n - Integration with existing provider health monitoring\n\n2. **Specificity Detection**\n - Query complexity scoring (0-100 scale)\n - Content-type analysis for optimal provider matching\n - Historical performance data integration\n\n3. **Adaptive Combo Strategies**\n - New auto-optimized strategy with dynamic adjustment\n - Tier-aware fallback logic\n - Cost-performance balancing algorithms\n\n### Integration Points\n- **PR #1918 Auto-Assessment**: Leverage existing health monitoring and performance data\n- **Existing Combo System**: Maintain backward compatibility with current strategies\n- **Metrics Pipeline**: Feed routing decisions into analytics for continuous improvement\n\n## 📈 Expected Benefits\n- **15-25%** improvement in routing success rates for complex queries\n- **10-20%** reduction in API costs through optimal provider utilization\n- **30% faster** routing decisions via optimized tier selection\n- **Enhanced reliability** with smarter, context-aware fallback logic\n\n## 🔧 Implementation Plan\n\n### Phase 1: Foundation (2-3 weeks)\n- Research Manifest's tier resolution algorithms\n- Design system architecture with integration points\n- Implement basic tier classification framework\n- Set up test infrastructure and benchmarks\n\n### Phase 2: Core Implementation (4-5 weeks)\n- Implement 3-tier resolution system (static/heuristic/specificity)\n- Develop specificity scoring algorithm\n- Create adaptive combo strategies\n- Integrate with PR #1918 auto-assessment system\n\n### Phase 3: Optimization & Testing (3 weeks)\n- Performance tuning and benchmarking\n- Comprehensive test suite (unit, integration, e2e)\n- Documentation and examples\n- Gradual rollout and monitoring\n\n## 📊 Success Metrics\n- Routing success rate improvement (A/B testing)\n- Cost reduction verified through usage analytics\n- Performance benchmarks showing latency improvements\n- User satisfaction surveys on routing reliability\n\n## 🔍 Related Work\n- PR #1918: Auto-Assessment and Self-Healing Combo Engine\n- Manifest routing engine analysis\n- Current combo strategies documentation\n\n## 🎯 Definition of Done\n- Tier resolution achieves ≥95% accuracy in classification\n- Specificity detection shows ≥90% correlation with manual scoring\n- Adaptive strategies demonstrate ≥15% improvement in benchmarks\n- Integration with auto-assessment system verified\n- All performance benchmarks meet targets\n- Comprehensive documentation completed\n\n## 📝 Additional Context\nThis enhancement builds upon PR #1918's auto-assessment capabilities, adding intelligent tier-based routing and query-specific optimization to create a sophisticated, cost-effective routing system that maintains OmniRoute's commitment to performance and reliability.","comments":[],"createdAt":"2026-05-04T20:54:10Z","labels":[],"number":1957,"title":"feat: Manifest Routing Integration - Tier Resolution & Specificity Detection"} -{"author":{"id":"U_kgDODmAPNQ","is_bot":false,"login":"akatylutir","name":""},"body":"### OmniRoute Version\n\n3.7.8\n\n### Installation Method\n\nnpm (global)\n\n### Operating System\n\nWindows\n\n### OS Version\n\nwindows 11 pro, 24H2\n\n### Node.js Version\n\nv22.22.2\n\n### Provider(s) Involved\n\n_No response_\n\n### Model(s) Involved\n\n_No response_\n\n### Client Tool\n\n_No response_\n\n### Description\n\nHi! I want to use OmniRoute, but red button not working. What can I do? Thi is log: https://pastebin.com/jKcS8CSy , and this is video: https://youtu.be/DB40dkfnGf4\n\n### Steps to Reproduce\n\nHi! I want to use OmniRoute, but red button not working. What can I do? Thi is log: https://pastebin.com/jKcS8CSy , and this is video: https://youtu.be/DB40dkfnGf4\n\n### Expected Behavior\n\nHi! I want to use OmniRoute, but red button not working. What can I do? Thi is log: https://pastebin.com/jKcS8CSy , and this is video: https://youtu.be/DB40dkfnGf4\n\n### Actual Behavior\n\nHi! I want to use OmniRoute, but red button not working. What can I do? Thi is log: https://pastebin.com/jKcS8CSy , and this is video: https://youtu.be/DB40dkfnGf4\n\n### Test Impact\n\nNeeds a new unit test\n\n### Error Logs / Output\n\n```shell\nHi! I want to use OmniRoute, but red button not working. What can I do? Thi is log: https://pastebin.com/jKcS8CSy , and this is video: https://youtu.be/DB40dkfnGf4\n```\n\n### Screenshots\n\nHi! I want to use OmniRoute, but red button not working. What can I do? Thi is log: https://pastebin.com/jKcS8CSy , and this is video: https://youtu.be/DB40dkfnGf4\n\n### Additional Context\n\nHi! I want to use OmniRoute, but red button not working. What can I do? Thi is log: https://pastebin.com/jKcS8CSy , and this is video: https://youtu.be/DB40dkfnGf4\n\n### Validation Plan\n\nHi! I want to use OmniRoute, but red button not working. What can I do? Thi is log: https://pastebin.com/jKcS8CSy , and this is video: https://youtu.be/DB40dkfnGf4","comments":[{"id":"IC_kwDORPf6ys8AAAABBKraWA","author":{"login":"kilo-code-bot"},"authorAssociation":"NONE","body":"This issue appears to be a duplicate of https://github.com/diegosouzapw/OmniRoute/issues/1883.\n\n> **\\[BUG\\] Onboarding button unresponsive after upgrade from 2.x to 3.x — CSP blocks eval** (#1883)\n\nSimilarity score: 90%\n\n*This comment was generated by Kilo Auto-Triage.*","createdAt":"2026-05-04T18:00:58Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/diegosouzapw/OmniRoute/issues/1955#issuecomment-4373273176","viewerDidAuthor":false},{"id":"IC_kwDORPf6ys8AAAABBK1BzA","author":{"login":"vladislavsartakov90-svg"},"authorAssociation":"NONE","body":"I solved the problem, install version 3.7.5","createdAt":"2026-05-04T18:24:23Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/diegosouzapw/OmniRoute/issues/1955#issuecomment-4373430732","viewerDidAuthor":false}],"createdAt":"2026-05-04T18:00:51Z","labels":[{"id":"LA_kwDORPf6ys8AAAACYAlrFQ","name":"bug","description":"Something isn't working","color":"d73a4a"},{"id":"LA_kwDORPf6ys8AAAACZXajUw","name":"kilo-triaged","description":"Auto-generated label by Kilo","color":"faf74f"},{"id":"LA_kwDORPf6ys8AAAACZ7FLsw","name":"kilo-duplicate","description":"Auto-generated label by Kilo","color":"faf74f"}],"number":1955,"title":"[BUG] Button Start Onboarding not working"} -{"author":{"id":"U_kgDOEMaoiA","is_bot":false,"login":"vladislavsartakov90-svg","name":""},"body":"### OmniRoute Version\n\n3.7.8\n\n### Installation Method\n\nnpm (global)\n\n### Operating System\n\nWindows\n\n### OS Version\n\nwindows 10 \n\n### Node.js Version\n\nv24.15.0\n\n### Provider(s) Involved\n\nall\n\n### Model(s) Involved\n\nall\n\n### Client Tool\n\nall\n\n### Description\n\nI launched omniroute in cmd, the website opens, but the button doesn't work. I tried changing ports, but that didn't help. I also tried using AI, but that didn't help either.\n\n### Steps to Reproduce\n\na\n\n### Expected Behavior\n\na\n\n### Actual Behavior\n\na\n\n### Test Impact\n\nNeeds a new unit test\n\n### Error Logs / Output\n\n```shell\na\n```\n\n### Screenshots\n\n\"Image\"\n\n\"Image\"\n\n\"Image\"\n\n### Additional Context\n\na\n\n### Validation Plan\n\na","comments":[{"id":"IC_kwDORPf6ys8AAAABBKpIzA","author":{"login":"kilo-code-bot"},"authorAssociation":"NONE","body":"This issue appears to be a duplicate of https://github.com/diegosouzapw/OmniRoute/issues/1703.\n\n> **\\[BUG\\]** (#1703)\n\nSimilarity score: 93%\n\n*This comment was generated by Kilo Auto-Triage.*","createdAt":"2026-05-04T17:54:38Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/diegosouzapw/OmniRoute/issues/1954#issuecomment-4373235916","viewerDidAuthor":false},{"id":"IC_kwDORPf6ys8AAAABBKtw3g","author":{"login":"vladislavsartakov90-svg"},"authorAssociation":"NONE","body":"node 22.22.2 not work\n","createdAt":"2026-05-04T18:06:24Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/diegosouzapw/OmniRoute/issues/1954#issuecomment-4373311710","viewerDidAuthor":false}],"createdAt":"2026-05-04T17:54:31Z","labels":[{"id":"LA_kwDORPf6ys8AAAACYAlrFQ","name":"bug","description":"Something isn't working","color":"d73a4a"},{"id":"LA_kwDORPf6ys8AAAACZXajUw","name":"kilo-triaged","description":"Auto-generated label by Kilo","color":"faf74f"},{"id":"LA_kwDORPf6ys8AAAACZ7FLsw","name":"kilo-duplicate","description":"Auto-generated label by Kilo","color":"faf74f"}],"number":1954,"title":"[BUG]"} -{"author":{"id":"MDQ6VXNlcjM3Nzc3MjYx","is_bot":false,"login":"uwuclxdy","name":"cloudy"},"body":"### Problem / Use Case\n\nOmniRoute currently tries all accounts from lets say Codex provider, even though some of them have no more usage available.\n\n### Proposed Solution\n\nMake the already existing buttons \"track 5-hour quota\" and \"track weekly quota\" on `/dashboard/providers/codex` page would make OmniRoute check the quota of the account before attempting to send a query and skip it if on 0%. This could work for other providers like Claude Code in the same way.\n\n### Alternatives Considered\n\n_No response_\n\n### Acceptance Criteria\n\nHave accounts without any usage left skipped automatically when quota tracking is turned on.\n\n### Area\n\nProxy / Routing\n\n### Related Provider(s)\n\nCodex, Claude Code...\n\n### Additional Context\n\n_No response_\n\n### Expected Test Plan\n\n_No response_","comments":[],"createdAt":"2026-05-04T17:21:30Z","labels":[{"id":"LA_kwDORPf6ys8AAAACYAlrLw","name":"enhancement","description":"New feature or request","color":"a2eeef"}],"number":1952,"title":"[Feature] Skip (Codex) accounts that have the weekly or 5h quota exhausted"} -{"author":{"id":"MDQ6VXNlcjU5MzM0MTUz","is_bot":false,"login":"hoangchung0701","name":""},"body":"### Problem / Use Case\n\nCould please show how much quota on model like:\n- Sesssion: x/y request remain\n- Weekly: x/y request remain\n\n### Proposed Solution\n\nNo\n\n### Alternatives Considered\n\n_No response_\n\n### Acceptance Criteria\n\nno\n\n### Area\n\nAnalytics / Usage Tracking\n\n### Related Provider(s)\n\n_No response_\n\n### Additional Context\n\n_No response_\n\n### Expected Test Plan\n\n_No response_","comments":[],"createdAt":"2026-05-04T17:12:44Z","labels":[{"id":"LA_kwDORPf6ys8AAAACYAlrLw","name":"enhancement","description":"New feature or request","color":"a2eeef"}],"number":1951,"title":"[Feature] Show more detail about quota"} -{"author":{"id":"U_kgDODGQfGw","is_bot":false,"login":"Destruction13","name":""},"body":"### Problem / Use Case\n\nOmniRoute supports a very large provider ecosystem, but Devin AI is not currently available as a built-in provider.\n\nThis matters because Devin is a strong coding-focused agent for longer-running engineering tasks, and OmniRoute already positions itself as a universal gateway for coding agents and model providers. Right now, users who want to evaluate or route work to Devin cannot do that from the same OmniRoute endpoint or include Devin in combos/fallback chains.\n\n## Why the current custom-provider path is not enough\n\nAs far as I understand, OmniRoute's generic custom provider support is for OpenAI-compatible and Anthropic-compatible endpoints.\n\nDevin does expose an official API, but it is session-based and organization-scoped rather than a drop-in `/chat/completions`-compatible endpoint. Because of that, Devin likely needs a first-class provider adapter instead of a generic custom endpoint configuration.\n\n## Use cases\n\n- Route repo-level coding, debugging, and refactor tasks to Devin from the same OmniRoute setup used for Codex, Claude Code, Gemini CLI, etc.\n- Use Devin as a higher-latency but higher-capability fallback for complex implementation tasks.\n- Compare Devin against other coding-oriented providers inside the same OmniRoute combo/routing policy.\n- Evaluate Devin inside OmniRoute without reconfiguring clients every time.\n\n### Proposed Solution\n\n## Proposed solution\n\nAdd Devin as a built-in provider with a custom executor.\n\nHigh-level implementation sketch:\n\n1. Register a new `devin` provider in `src/shared/constants/providers.ts`.\n2. Add Devin provider/model metadata in `open-sse/config/providerRegistry.ts`.\n3. Implement a custom executor in `open-sse/executors/` that:\n - authenticates with Devin service-user credentials\n - targets the organization API under `https://api.devin.ai/v3/organizations/{org_id}`\n - creates a new Devin session for a fresh OmniRoute request\n - sends follow-up messages to an existing Devin session when conversation continuity is available\n - polls session state and/or session messages until a stable assistant result is available\n - maps the final Devin output back into OmniRoute's OpenAI-compatible response shape\n4. Add dashboard/provider settings for:\n - `DEVIN_API_KEY` (service-user credential)\n - `DEVIN_ORG_ID`\n - optional defaults such as session tags, repo selection, or ACU limits\n5. Make the provider eligible for direct selection and combo routing.\n\n### Alternatives Considered\n\n_No response_\n\n### Acceptance Criteria\n\n## Acceptance criteria\n\n- Devin appears in the Providers UI as a connectable provider.\n- A user can store Devin credentials and validate the connection.\n- OmniRoute can send a basic text request to Devin and return a usable assistant response through `/v1/chat/completions` and/or `/v1/responses`.\n- Follow-up prompts can either reuse a Devin session or the limitation is explicitly documented for MVP behavior.\n- Devin can be targeted directly in combos.\n- Common Devin session states/errors (for example approval-needed, quota/usage exhaustion, or suspended sessions) are surfaced as clear OmniRoute errors.\n- Documentation explains setup, limitations, and expected latency/behavior differences versus normal token-streaming LLM providers.\n\n## Suggested MVP scope\n\nMVP can be text-only and non-streaming/polling-based if needed.\n\nNot required for the first version:\n- embeddings\n- image/audio endpoints\n- tool-calling parity\n- full real-time streaming parity with standard LLM providers\n\n### Area\n\nProvider Support\n\n### Related Provider(s)\n\n_No response_\n\n### Additional Context\n\n## Additional context\n\nThis would also be useful for users who want to evaluate Devin during onboarding or trial access without changing their entire client setup.\n\n### Expected Test Plan\n\n_No response_","comments":[],"createdAt":"2026-05-04T17:00:59Z","labels":[{"id":"LA_kwDORPf6ys8AAAACYAlrLw","name":"enhancement","description":"New feature or request","color":"a2eeef"}],"number":1950,"title":"[Feature] devin.ai"} -{"author":{"id":"MDQ6VXNlcjc1MzQ1NDc=","is_bot":false,"login":"chbndrhnns","name":"Johannes Rueschel"},"body":"### OmniRoute Version\n\n3.7.8\n\n### Installation Method\n\nnpm (global)\n\n### Operating System\n\nmacOS\n\n### OS Version\n\n26.4.1\n\n### Node.js Version\n\n24.15.0\n\n### Provider(s) Involved\n\n-\n\n### Model(s) Involved\n\n-\n\n### Client Tool\n\n-\n\n### Description\n\n\n```\n❯ pnpm upgrade -g omniroute\nDownloading @ngrok/ngrok-darwin-universal@1.7.0: 7.97 MB/7.97 MB, done\nDownloading @swc/core-darwin-arm64@1.15.33: 9.16 MB/9.16 MB, done\n WARN  2 deprecated subdependencies found: intersection-observer@0.12.2, prebuild-install@7.1.3\nDownloading omniroute@3.7.8: 50.87 MB/50.87 MB, done\nPackages: +29 -25\n+++++++++++++++++++++++++++++-------------------------\nProgress: resolved 988, reused 873, downloaded 27, added 29, done\n WARN  Issues with peer dependencies found\n.\n└─┬ @lobehub/ui 5.10.0\n └─┬ @emoji-mart/react 1.1.1\n └── ✕ unmet peer react@\"^16.8 || ^17 || ^18\": found 19.2.5\n\n/Users/jo/Library/pnpm/global/5:\n- omniroute 3.7.4\n+ omniroute 3.7.8\n\n╭ Warning ──────────────────────────────────────────────────────────────────────────────────────╮\n│ │\n│ Ignored build scripts: @swc/core@1.15.33, omniroute@3.7.8. │\n│ Run \"pnpm approve-builds -g\" to pick which dependencies should be allowed to run scripts. │\n│ │\n╰───────────────────────────────────────────────────────────────────────────────────────────────╯\nDone in 58.1s using pnpm v10.33.0\n❯ pnpm approve-builds -g\n✔ Choose which packages to build (Press to select, to toggle all, to invert selection) · @swc/core, omniroute\n✔ The next packages will now be built: @swc/core, omniroute.\nDo you approve? (y/N) · true\n.pnpm/@swc+core@1.15.33_@swc+helpers@0.5.21/node_modules/@swc/core: Running postinstall script, done in 45ms\n.pnpm/omniroute@3.7.8_@lobehub+ui@5.10.0_@types+react@19.2.14_antd@6.3.7_react-dom@19.2.5_rea_81be994467029f641d72db51e6e26349/node_modules/omniroute: Running postinstall script...\n.pnpm/omniroute@3.7.8_@lobehub+ui@5.10.0_@types+react@19.2.14_antd@6.3.7_react-dom@19.2.5_rea_81be994467029f641d72db51e6e26349/node_modules/omniroute: Running postinstall script, done in 772ms\n❯\n❯ omniroute\n\n ____ _ ____ _\n / __ \\\\ (_) __ \\\\ | |\n | | | |_ __ ___ _ __ _| |__) |___ _ _| |_ ___\n | | | | '_ ` _ \\\\| '_ \\\\ | _ // _ \\\\| | | | __/ _ \\\\\n | |__| | | | | | | | | | | | \\\\ \\\\ (_) | |_| | || __/\n \\\\____/|_| |_| |_|_| |_|_|_| \\\\_\\\\___/ \\\\__,_|\\\\__\\\\___|\n\n ⏳ Starting server...\n\n▲ Next.js 16.2.4\n- Local: http://localhost:20128\n- Network: http://0.0.0.0:20128\n✓ Ready in 0ms\n\n ✔ OmniRoute is running!\n\n Dashboard: http://localhost:20128\n API Base: http://localhost:20128/v1\n\n Point your CLI tool (Cursor, Cline, Codex) to:\n http://localhost:20128/v1\n\n Press Ctrl+C to stop\n\n[CREDENTIALS] No external credentials file found, using defaults.\n[DB] Could not preserve critical DB state before recreation: Could not locate the bindings file. Tried:\n → /Users/jo/Library/pnpm/global/5/.pnpm/omniroute@3.7.8_@lobehub+ui@5.10.0_@types+react@19.2.14_antd@6.3.7_react-dom@19.2.5_rea_81be994467029f641d72db51e6e26349/node_modules/omniroute/app/node_modules/better-sqlite3/build/better_sqlite3.node\n```\n\n### Steps to Reproduce\n\n1. `pnpm upgrade -g omniroute`\n2. `pnpm approve-builds -g`\n3. `omniroute`\n\n### Expected Behavior\n\nCan upgrade without manual installation procedure\n\n### Actual Behavior\n\nNeed to go to /Users/jo/Library/pnpm/global/5/.pnpm/omniroute@3.7.8_@lobehub+ui@5.10.0_@types+react@19.2.14_antd@6.3.7_react-dom@19.2.5_rea_81be994467029f641d72db51e6e26349/node_modules/omniroute/app\n\nNeed to run `npm install wreq-js@2.3.0 better-sqlite3@12.6.2 --no-save`\n\n### Test Impact\n\nNeeds a new e2e test\n\n### Error Logs / Output\n\n```shell\n\n```\n\n### Screenshots\n\n_No response_\n\n### Additional Context\n\n_No response_\n\n### Validation Plan\n\n_No response_","comments":[],"createdAt":"2026-05-04T11:52:34Z","labels":[{"id":"LA_kwDORPf6ys8AAAACYAlrFQ","name":"bug","description":"Something isn't working","color":"d73a4a"}],"number":1943,"title":"[BUG] pnpm install still requires manual better-sqlite3 installation"} -{"author":{"id":"MDQ6VXNlcjE0OTIxOTgz","is_bot":false,"login":"oyi77","name":"Paijo"},"body":"## Summary\n\nOmniRoute v3.7.8 contains **two different encryption key derivation implementations** in the same package that produce incompatible ciphertexts. The health-check/token-refresh thread uses the old dynamic-salt derivation while the main API uses the new static-salt derivation, causing:\n\n1. **Persistent decrypt failures** — tokens encrypted by the health-check thread cannot be decrypted by the main API\n2. **Re-encryption loop** — the health-check thread continuously re-encrypts tokens with a dynamic salt, undoing any fix applied with the static salt\n3. **CPU spike during crash-loop** — when tokens are encrypted with dynamic salt, the main API fails to decrypt them, causing a cascade of errors and 50% CPU usage\n\n## Root Cause\n\nTwo different key derivation functions exist in the built package:\n\n### Old code (chunk 42476) — Dynamic Salt\n```javascript\nfunction k() {\n if (null !== i) return i;\n let a = process.env.STORAGE_ENCRYPTION_KEY;\n let b = (0, f.createHash)(\"sha256\").update(a).digest().slice(0, 16);\n // ^^^^^^^^^^^^^ DYNAMIC — derived from the key itself\n try { i = (0, f.scryptSync)(a, b, 32); }\n // ...\n}\n```\n\n### New code (chunk 56197) — Static Salt\n```javascript\nfunction l() {\n if (null !== j) return j;\n let a = process.env.STORAGE_ENCRYPTION_KEY;\n let b = \"omniroute-field-encryption-v1\";\n // ^^^^^^^^^^^^^^^^^^^^^^^^^^^ STATIC — hardcoded string\n try { j = (0, g.scryptSync)(a, b, 32); }\n // ...\n}\n```\n\nThese produce **different derived keys** from the same `STORAGE_ENCRYPTION_KEY`, making ciphertexts from one undecryptable by the other.\n\nThe decrypt function in `42476.js` has a fallback that tries the static-salt key when the dynamic-salt key fails, but the **encrypt function** only uses the dynamic-salt key. So the health-check thread encrypts with dynamic salt, the main API tries to decrypt with the dynamic-salt key (different derivation → fails), then falls back to static salt (also fails for newly-encrypted tokens).\n\n## Impact\n\n- **Severity: HIGH** — Causes production outages when tokens become undecryptable\n- **CPU**: 50% CPU usage during crash-loop (from repeated decrypt failures triggering health-check)\n- **Data**: All encrypted tokens become unreadable until manually fixed\n- **Recovery**: Requires manual database fix script to re-encrypt all tokens with static salt\n\n## Reproduction\n\n1. Set `STORAGE_ENCRYPTION_KEY` in server.env\n2. Add OAuth providers — tokens get encrypted with static salt\n3. Health-check thread runs — re-encrypts tokens with dynamic salt\n4. Main API attempts to decrypt — fails (dynamic-salt ciphertext produces different derived key)\n5. Error cascade: decrypt failures → health-check triggers → re-encrypts with dynamic salt → more failures\n6. CPU spikes to 50%, API responses fail for encrypted fields\n\n## Evidence\n\n```bash\n# Check encryption status of active tokens\nnode -e \"\nconst db = require('better-sqlite3')('/home/openclaw/.omniroute/storage.sqlite');\nconst rows = db.prepare('SELECT id, access_token, refresh_token FROM provider_connections WHERE is_active = 1').all();\nlet static = 0, dynamic = 0;\nfor (const row of rows) {\n for (const col of ['access_token', 'refresh_token']) {\n const val = row[col];\n if (!val || val === 'revoked') continue;\n try {\n const buf = Buffer.from(val, 'base64');\n const saltLen = buf.readUInt8(0);\n const salt = buf.slice(1, 1 + saltLen).toString('utf8');\n if (salt === 'omniroute-field-encryption-v1') static++;\n else dynamic++;\n } catch(e) {}\n }\n}\nconsole.log('Static salt:', static, '| Dynamic salt:', dynamic);\ndb.close();\n\"\n\n# Output after health-check thread runs:\n# Static: 0 | Dynamic: 205 (= ALL tokens re-encrypted with dynamic salt)\n\n# Output after running fix-encryption-static.cjs:\n# Static: 539 | Dynamic: 0 (= ALL tokens fixed back to static salt)\n```\n\n## Workaround\n\nWe created a script (`fix-encryption-static.cjs`) that:\n1. Reads all encrypted tokens from the database\n2. Decrypts them using the static-salt key (falling back to dynamic-salt key if static fails)\n3. Re-encrypts them with the static-salt key\n4. Writes the updated tokens back to the database\n\nThis script runs via cron every 5 minutes to counteract the health-check thread re-encryption.\n\n## Suggested Fix\n\n1. **Unify key derivation**: Remove the old dynamic-salt code path and use only the static-salt derivation (`\"omniroute-field-encryption-v1\"`) everywhere\n2. **Add migration**: On startup, scan for tokens encrypted with the dynamic salt and re-encrypt them with the static salt\n3. **Remove the fallback**: The current fallback in the decrypt function (try dynamic, then try static) masks the issue. After migration, only the static salt key should exist.\n\n## Environment\n\n- OmniRoute v3.7.8\n- Node v22.22.1\n- Ubuntu 22.04\n- 1,239 models configured\n- 306 active provider connections\n- STORAGE_ENCRYPTION_KEY set via server.env","comments":[{"id":"IC_kwDORPf6ys8AAAABBLxsAA","author":{"login":"soyelmismo"},"authorAssociation":"NONE","body":"how can i disable the encryption its so annoying.\n","createdAt":"2026-05-04T20:56:21Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/diegosouzapw/OmniRoute/issues/1941#issuecomment-4374424576","viewerDidAuthor":false}],"createdAt":"2026-05-04T11:47:27Z","labels":[],"number":1941,"title":"[BUG] Dual encryption key derivation (dynamic vs static salt) causes persistent decrypt failures and 50% CPU"} -{"author":{"id":"MDQ6VXNlcjEwODk3NDc4","is_bot":false,"login":"JxnLexn","name":"Jan Leon"},"body":"### OmniRoute Version\n\n3.7.8\n\n### Installation Method\n\nDocker / Docker Compose\n\n### Operating System\n\nLinux\n\n### OS Version\n\n_No response_\n\n### Node.js Version\n\n_No response_\n\n### Provider(s) Involved\n\nCodex\n\n### Model(s) Involved\n\nGPT-5.5\n\n### Client Tool\n\nVisual Studio Code (Github Copilot Chat)\n\n### Description\n\nThe costs and the analytics page show costs of $0.00 even though many tokens are being used and the prices per token are set. It was working before, but for the past few days it has stopped working. I am using a combo, but it has worked before using a combo. \nOn the costs page it also shows a fallback rate of 100%, even tough there was never a fallback to another model.\n\n### Steps to Reproduce\n\n1. Use a model/tokens\n2. Go to cost or analytics\n3. See $0.00 altough prices are set\n\n### Expected Behavior\n\nShow estimated costs\n\n### Actual Behavior\n\nDid not show estimated costs, instead $0.00\n\n### Test Impact\n\nUnsure\n\n### Error Logs / Output\n\n```shell\n\n```\n\n### Screenshots\n\n**Costs:**\n\"Image\"\n\n**Analytics:**\n\"Image\"\n\n**Fallback Rate:**\n\"Image\"\n\n**Provider Breakdown:**\n\"Image\"\n\n**Model Breakdown:**\n\"Image\"\n\n**Costs Pricing:**\n\"Image\"\n\n\n### Additional Context\n\n_No response_\n\n### Validation Plan\n\n_No response_","comments":[],"createdAt":"2026-05-04T09:57:53Z","labels":[{"id":"LA_kwDORPf6ys8AAAACYAlrFQ","name":"bug","description":"Something isn't working","color":"d73a4a"}],"number":1934,"title":"[BUG] Est. Cost $0.00"} diff --git a/src/shared/constants/providers.ts b/src/shared/constants/providers.ts index ec515b585713..80827dd199f8 100644 --- a/src/shared/constants/providers.ts +++ b/src/shared/constants/providers.ts @@ -435,7 +435,8 @@ export const WEB_COOKIE_PROVIDERS = { }, huggingchat: { id: "huggingchat", - alias: "hc", + // "hc" belongs to the hackclub provider; huggingchat uses its own id as alias. + alias: "huggingchat", name: "HuggingChat (Free)", icon: "auto_awesome", color: "#FFD21E", @@ -497,7 +498,8 @@ export const WEB_COOKIE_PROVIDERS = { }, "kimi-web": { id: "kimi-web", - alias: "kimi", + // Primary "kimi" provider keeps the short alias; web variant uses its own id. + alias: "kimi-web", name: "Kimi Web (Moonshot AI)", icon: "auto_awesome", color: "#2563EB", @@ -521,7 +523,8 @@ export const WEB_COOKIE_PROVIDERS = { }, "qwen-web": { id: "qwen-web", - alias: "qw", + // Primary "qwen" provider keeps the short alias; web variant uses its own id. + alias: "qwen-web", name: "Qwen Web (Free)", icon: "auto_awesome", color: "#10B981", diff --git a/tests/unit/provider-alias-uniqueness.test.ts b/tests/unit/provider-alias-uniqueness.test.ts new file mode 100644 index 000000000000..7aeb68bdaee6 --- /dev/null +++ b/tests/unit/provider-alias-uniqueness.test.ts @@ -0,0 +1,64 @@ +/** + * Provider alias uniqueness — no two provider IDs may share the same short alias. + * + * Before this guard, three aliases collided in the registry and the LAST entry in + * iteration order silently won, emitting a startup warning and shadowing a real + * provider: + * - "qw" → qwen-web (shadowed qwen) + * - "kimi" → kimi-web (shadowed the kimi provider that gained a dedicated executor) + * - "hc" → hackclub (shadowed huggingchat) + * + * The decision: the primary provider keeps the short alias; the web/secondary + * variant takes its own id as alias. This test pins both the global uniqueness + * invariant (so future additions can't silently re-collide) and the specific + * resolutions for the six affected providers, across BOTH alias sources + * (open-sse registry + src/shared providers map). + */ +import test from "node:test"; +import assert from "node:assert/strict"; + +import { PROVIDER_ID_TO_ALIAS } from "../../open-sse/config/providerModels.ts"; +import { resolveProviderId, getProviderAlias } from "../../src/shared/constants/providers.ts"; + +test("no two provider IDs share the same alias in the open-sse registry", () => { + const aliasToIds = new Map(); + for (const [id, alias] of Object.entries(PROVIDER_ID_TO_ALIAS)) { + const ids = aliasToIds.get(alias) ?? []; + ids.push(id); + aliasToIds.set(alias, ids); + } + + const collisions = [...aliasToIds.entries()].filter(([, ids]) => ids.length > 1); + assert.deepEqual( + collisions, + [], + `Alias collisions detected (each alias must map to exactly one provider id): ${collisions + .map(([alias, ids]) => `"${alias}" → ${ids.join(", ")}`) + .join("; ")}` + ); +}); + +test("primary providers keep the short alias; web/secondary variants use their own id", () => { + // open-sse registry (source of the startup warning + chat routing) + assert.equal(PROVIDER_ID_TO_ALIAS.qwen, "qw"); + assert.equal(PROVIDER_ID_TO_ALIAS["qwen-web"], "qwen-web"); + assert.equal(PROVIDER_ID_TO_ALIAS.kimi, "kimi"); + assert.equal(PROVIDER_ID_TO_ALIAS["kimi-web"], "kimi-web"); + assert.equal(PROVIDER_ID_TO_ALIAS.hackclub, "hc"); + assert.equal(PROVIDER_ID_TO_ALIAS.huggingchat, "huggingchat"); +}); + +test("src/shared providers map resolves the same aliases unambiguously", () => { + // alias → id + assert.equal(resolveProviderId("qw"), "qwen"); + assert.equal(resolveProviderId("kimi"), "kimi"); + assert.equal(resolveProviderId("hc"), "hackclub"); + // id used as alias for the secondary variants + assert.equal(resolveProviderId("qwen-web"), "qwen-web"); + assert.equal(resolveProviderId("kimi-web"), "kimi-web"); + assert.equal(resolveProviderId("huggingchat"), "huggingchat"); + // id → alias + assert.equal(getProviderAlias("qwen"), "qw"); + assert.equal(getProviderAlias("kimi"), "kimi"); + assert.equal(getProviderAlias("hackclub"), "hc"); +}); From 32bb4b96523d7f880ecd0e547aa3485d654c624b Mon Sep 17 00:00:00 2001 From: Wilson Date: Thu, 4 Jun 2026 14:10:36 -0300 Subject: [PATCH 03/28] fix(responses): normalize image_url parts across input paths (#3150) Normalize image_url parts across all Responses input paths. Integrated into release/v3.8.10. --- open-sse/services/responsesInputSanitizer.ts | 53 ++++++++++++++ .../translator/request/openai-responses.ts | 11 ++- .../responses-input-sanitizer-name.test.ts | 72 +++++++++++++++++++ .../translator-openai-responses-req.test.ts | 31 ++++++++ 4 files changed, 166 insertions(+), 1 deletion(-) diff --git a/open-sse/services/responsesInputSanitizer.ts b/open-sse/services/responsesInputSanitizer.ts index 679345c65678..c1f938a38b3f 100644 --- a/open-sse/services/responsesInputSanitizer.ts +++ b/open-sse/services/responsesInputSanitizer.ts @@ -55,11 +55,64 @@ function sanitizeInputItemId(record: JsonRecord): JsonRecord { return next; } +function imageUrlToText(value: unknown): string { + if (typeof value === "string") return value; + const record = toRecord(value); + return typeof record?.url === "string" ? record.url : ""; +} + +function sanitizeContentPart(part: unknown, role: string): unknown { + const record = toRecord(part); + if (!record) return part; + + if (record.type === "image_url") { + const url = imageUrlToText(record.image_url); + if (role === "user") { + const next: JsonRecord = { type: "input_image", image_url: url }; + const image = toRecord(record.image_url); + if (image?.detail !== undefined) next.detail = image.detail; + return next; + } + return { type: "output_text", text: url ? `[Image: ${url}]` : "[Image]" }; + } + + if (role === "assistant" && record.type === "input_image") { + const url = imageUrlToText(record.image_url); + return { type: "output_text", text: url ? `[Image: ${url}]` : "[Image]" }; + } + + return part; +} + +function sanitizeMessageContent(record: JsonRecord): JsonRecord { + if (!Array.isArray(record.content)) return record; + + const role = typeof record.role === "string" ? record.role.toLowerCase() : ""; + const content = record.content.map((part) => sanitizeContentPart(part, role)); + return { ...record, content }; +} + +function sanitizeOutputContent(record: JsonRecord): JsonRecord { + if (!Array.isArray(record.output)) return record; + + // Some clients replay previous Responses output items inside the next + // Responses input. In that shape OpenAI validates `input[n].output[m].type` + // against output content part types, so legacy Chat-style `image_url` parts + // must be normalized here too, not only in message.content. + const role = record.type === "function_call_output" ? "user" : "assistant"; + const output = record.output.map((part) => sanitizeContentPart(part, role)); + return { ...record, output }; +} + function sanitizeInputItem(item: unknown): unknown { const record = toRecord(item); if (!record) return item; let next = sanitizeInputItemId(record); + if (isResponsesMessageItem(next)) { + next = sanitizeMessageContent(next); + } + next = sanitizeOutputContent(next); if ( (next.type === "function_call" || next.type === "function_call_output") && typeof next.name === "string" && diff --git a/open-sse/translator/request/openai-responses.ts b/open-sse/translator/request/openai-responses.ts index 4129d3a80898..a4b099492b13 100644 --- a/open-sse/translator/request/openai-responses.ts +++ b/open-sse/translator/request/openai-responses.ts @@ -13,7 +13,7 @@ type JsonRecord = Record; const RESPONSES_STORE_MARKER = "_omnirouteResponsesStore"; const COPILOT_REASONING_SUMMARY_MARKER = "_omnirouteCopilotReasoningSummary"; -// Forward-compatible regex: matches web_search, web_search_20250305, and any future versioned names. +// Forward-compatible regex: matches web_search, web_search_20250305, and future versioned names. const WEB_SEARCH_TOOL_TYPES = /^web_search/; // tool_search is a Responses API built-in sent by newer Codex clients; it has no Chat Completions // equivalent and must be silently dropped (not rejected with 400). @@ -34,6 +34,12 @@ function toString(value: unknown, fallback = ""): string { return typeof value === "string" ? value : fallback; } +function imageUrlToText(value: unknown): string { + if (typeof value === "string") return value; + const record = toRecord(value); + return toString(record.url); +} + function normalizeResponsesReasoningEffort(value: unknown): string { const effort = toString(value).toLowerCase(); return effort === "max" ? "xhigh" : effort; @@ -492,6 +498,9 @@ export function openaiToOpenAIResponsesRequest( const contentItem = toRecord(contentValue); if (contentItem.type === "text") { outputContent.push({ type: "output_text", text: toString(contentItem.text) }); + } else if (contentItem.type === "image_url") { + const url = imageUrlToText(contentItem.image_url); + outputContent.push({ type: "output_text", text: url ? `[Image: ${url}]` : "[Image]" }); } else if (contentItem.type === "thinking" || contentItem.type === "redacted_thinking") { // Reasoning already moved above continue; diff --git a/tests/unit/responses-input-sanitizer-name.test.ts b/tests/unit/responses-input-sanitizer-name.test.ts index 84f6972d15aa..6ab5cb200697 100644 --- a/tests/unit/responses-input-sanitizer-name.test.ts +++ b/tests/unit/responses-input-sanitizer-name.test.ts @@ -72,3 +72,75 @@ test("keeps valid server reasoning item ids", () => { const result = sanitizeResponsesInputItems(items) as Array>; assert.equal(result[0].id, "rs_123"); }); + +test("normalizes user image_url content parts to input_image", () => { + const items = [ + { + type: "message", + role: "user", + content: [{ type: "image_url", image_url: { url: "https://example.com/u.png", detail: "high" } }], + }, + ]; + const result = sanitizeResponsesInputItems(items) as Array>; + assert.deepEqual((result[0].content as unknown[])[0], { + type: "input_image", + image_url: "https://example.com/u.png", + detail: "high", + }); +}); + +test("normalizes assistant image content parts to output_text", () => { + const items = [ + { + type: "message", + role: "assistant", + content: [ + { type: "image_url", image_url: { url: "https://example.com/a.png" } }, + { type: "input_image", image_url: "https://example.com/b.png" }, + ], + }, + ]; + const result = sanitizeResponsesInputItems(items) as Array>; + assert.deepEqual(result[0], { + type: "message", + role: "assistant", + content: [ + { type: "output_text", text: "[Image: https://example.com/a.png]" }, + { type: "output_text", text: "[Image: https://example.com/b.png]" }, + ], + }); +}); + +test("normalizes replayed Responses output image parts to output_text", () => { + const items = [ + { + type: "message", + role: "assistant", + output: [{ type: "image_url", image_url: { url: "https://example.com/output.png" } }], + }, + ]; + const result = sanitizeResponsesInputItems(items) as Array>; + assert.deepEqual(result[0], { + type: "message", + role: "assistant", + output: [{ type: "output_text", text: "[Image: https://example.com/output.png]" }], + }); + assert.equal(JSON.stringify(result).includes('"image_url"'), false); +}); + +test("normalizes function_call_output image output parts to input_image", () => { + const items = [ + { + type: "function_call_output", + call_id: "call_1", + output: [{ type: "image_url", image_url: { url: "https://example.com/tool.png" } }], + }, + ]; + const result = sanitizeResponsesInputItems(items) as Array>; + assert.deepEqual(result[0], { + type: "function_call_output", + call_id: "call_1", + output: [{ type: "input_image", image_url: "https://example.com/tool.png" }], + }); + assert.equal(JSON.stringify(result).includes('"type":"image_url"'), false); +}); diff --git a/tests/unit/translator-openai-responses-req.test.ts b/tests/unit/translator-openai-responses-req.test.ts index 6ac89dbeb385..642acf522ae7 100644 --- a/tests/unit/translator-openai-responses-req.test.ts +++ b/tests/unit/translator-openai-responses-req.test.ts @@ -356,6 +356,37 @@ test("Responses round-trip preserves store and previous_response_id when opt-in assert.equal((result as any).instructions, "Rules"); }); +test("Chat -> Responses converts assistant image_url history parts to output_text", () => { + const result = openaiToOpenAIResponsesRequest( + "gpt-4o", + { + messages: [ + { + role: "assistant", + content: [ + { type: "text", text: "I inspected the screenshot." }, + { type: "image_url", image_url: { url: "https://example.com/scope.png" } }, + ], + }, + ], + }, + true, + null + ); + + assert.deepEqual((result as any).input, [ + { + type: "message", + role: "assistant", + content: [ + { type: "output_text", text: "I inspected the screenshot." }, + { type: "output_text", text: "[Image: https://example.com/scope.png]" }, + ], + }, + ]); + assert.equal(JSON.stringify(result).includes('"image_url"'), false); +}); + test("Chat -> Responses preserves prompt_cache_key and session affinity fields", () => { const result = openaiToOpenAIResponsesRequest( "gpt-5.3-codex", From 3fd8f2ce11f7287eef2e01f4941a07b17ca965da Mon Sep 17 00:00:00 2001 From: Xiangzhe <32761048+xz-dev@users.noreply.github.com> Date: Fri, 5 Jun 2026 01:10:41 +0800 Subject: [PATCH 04/28] fix(api-manager): preserve API key expiration local time (#3146) Preserve API key expiration local time + clear button. Integrated into release/v3.8.10. --- .../api-manager/ApiManagerPageClient.tsx | 45 +++++++++++++++---- tests/unit/api-manager-page-static.test.ts | 15 +++++++ tests/unit/batch-processor-expiration.test.ts | 12 +---- tests/unit/console-log-levels.test.ts | 8 +++- 4 files changed, 59 insertions(+), 21 deletions(-) diff --git a/src/app/(dashboard)/dashboard/api-manager/ApiManagerPageClient.tsx b/src/app/(dashboard)/dashboard/api-manager/ApiManagerPageClient.tsx index 8b155975cf0d..43da508ffb9b 100644 --- a/src/app/(dashboard)/dashboard/api-manager/ApiManagerPageClient.tsx +++ b/src/app/(dashboard)/dashboard/api-manager/ApiManagerPageClient.tsx @@ -30,6 +30,16 @@ import { const MAX_KEY_NAME_LENGTH = 200; const MAX_SELECTED_MODELS = 500; +function toLocalDateTimeInputValue(value: string | null | undefined): string { + if (!value) return ""; + const date = new Date(value); + if (Number.isNaN(date.getTime())) return ""; + const pad = (n: number) => String(n).padStart(2, "0"); + return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}T${pad( + date.getHours() + )}:${pad(date.getMinutes())}`; +} + // Debounce hook for search optimization function useDebouncedValue(value: T, delay: number): T { const [debouncedValue, setDebouncedValue] = useState(value); @@ -2128,15 +2138,32 @@ const PermissionsModal = memo(function PermissionsModal({ Key will automatically stop working after this date.

- { - const val = e.target.value; - setExpiresAt(val ? new Date(val).toISOString() : ""); - }} - className="w-full px-2 py-1.5 text-sm border border-border rounded-md bg-background text-text-main" - /> +
+ { + const val = e.target.value; + if (!val) { + setExpiresAt(""); + return; + } + const date = new Date(val); + if (!Number.isNaN(date.getTime())) { + setExpiresAt(date.toISOString()); + } + }} + className="min-w-0 flex-1 px-2 py-1.5 text-sm border border-border rounded-md bg-background text-text-main" + /> + +
{/* Management Access */}
diff --git a/tests/unit/api-manager-page-static.test.ts b/tests/unit/api-manager-page-static.test.ts index 43a2cc2f33ad..29d920e82f35 100644 --- a/tests/unit/api-manager-page-static.test.ts +++ b/tests/unit/api-manager-page-static.test.ts @@ -35,6 +35,21 @@ test("permissions modal uses i18n for management access description", () => { assert.doesNotMatch(managementBlock, /Allow this API key to manage OmniRoute configuration\./); }); +test("permissions modal converts API key expiration ISO timestamps to local datetime input values", () => { + const source = readApiManagerPage(); + const expirationBlock = source.slice( + source.indexOf("{/* Expiration Date */}", source.indexOf("const PermissionsModal")), + source.indexOf("{/* Management Access */}", source.indexOf("const PermissionsModal")) + ); + + assert.match(expirationBlock, /value=\{toLocalDateTimeInputValue\(expiresAt\)\}/); + assert.match(expirationBlock, /const date = new Date\(val\)/); + assert.match(expirationBlock, /setExpiresAt\(date\.toISOString\(\)\)/); + assert.match(expirationBlock, /onClick=\{\(\) => setExpiresAt\(""\)\}/); + assert.match(expirationBlock, /\{tc\("clear"\)\}/); + assert.doesNotMatch(expirationBlock, /expiresAt\.slice\(0, 16\)/); +}); + test("permissions modal switch buttons declare button type", () => { const source = readApiManagerPage(); const modalStart = source.indexOf("const PermissionsModal"); diff --git a/tests/unit/batch-processor-expiration.test.ts b/tests/unit/batch-processor-expiration.test.ts index ec884b5f1fc2..4c8281ce9898 100644 --- a/tests/unit/batch-processor-expiration.test.ts +++ b/tests/unit/batch-processor-expiration.test.ts @@ -1,6 +1,5 @@ -import { afterEach, describe, it } from "node:test"; +import { describe, it } from "node:test"; import assert from "node:assert"; -import { deleteFile, listFiles } from "@/lib/localDb"; // Helper functions from batchProcessor.ts function parseBatchWindowSeconds(window: string | null | undefined): number { @@ -18,15 +17,6 @@ function parseBatchWindowSeconds(window: string | null | undefined): number { } describe("Batch Processor - File Expiration", () => { - afterEach(() => { - const allFiles = listFiles({ limit: 1000 }); - for (const f of allFiles) { - if (f.filename?.includes("test-batch-")) { - deleteFile(f.id); - } - } - }); - describe("getBatchOutputExpiresAt logic", () => { it("should calculate output expiration as 30 days from batch completion", () => { const completedAt = Math.floor(Date.now() / 1000) - 5 * 24 * 60 * 60; // 5 days ago diff --git a/tests/unit/console-log-levels.test.ts b/tests/unit/console-log-levels.test.ts index 119da1f1ffbb..a691d7e3bd27 100644 --- a/tests/unit/console-log-levels.test.ts +++ b/tests/unit/console-log-levels.test.ts @@ -8,7 +8,13 @@ import { updateSettings } from "../../src/lib/db/settings"; const TEST_LOG_DIR = fs.mkdtempSync(path.join(os.tmpdir(), "omniroute-console-log-levels-")); const TEST_LOG_PATH = path.join(TEST_LOG_DIR, "app.log"); -process.once("exit", () => fs.rmSync(TEST_LOG_DIR, { recursive: true, force: true })); +process.once("exit", () => { + try { + fs.rmSync(TEST_LOG_DIR, { recursive: true, force: true, maxRetries: 3, retryDelay: 50 }); + } catch { + // Best-effort cleanup only; tmpdir residue must not fail otherwise-passing tests. + } +}); const originalLogFilePath = process.env.APP_LOG_FILE_PATH; process.env.APP_LOG_FILE_PATH = TEST_LOG_PATH; From 273268c18df9a2a794689f790631e7c3297d77ba Mon Sep 17 00:00:00 2001 From: Jan Leon Date: Thu, 4 Jun 2026 19:10:45 +0200 Subject: [PATCH 05/28] Strip previous_response_id for stateless Responses upstreams (#3143) Strip previous_response_id for stateless Responses upstreams (auto/strip/preserve). Integrated into release/v3.8.10. --- open-sse/handlers/chatCore.ts | 9 ++ open-sse/utils/responsesStatePolicy.ts | 75 +++++++++++ .../dashboard/settings/ai/page.tsx | 2 + .../components/ResponsesStatePolicyTab.tsx | 120 ++++++++++++++++++ src/i18n/messages/de.json | 8 ++ src/i18n/messages/en.json | 8 ++ src/lib/db/settings.ts | 2 + .../constants/responsesPreviousResponseId.ts | 5 + src/shared/validation/settingsSchemas.ts | 2 + tests/integration/chat-pipeline.test.ts | 79 ++++++++++++ tests/unit/chatcore-translation-paths.test.ts | 2 +- tests/unit/responses-handler.test.ts | 4 +- tests/unit/responses-state-policy.test.ts | 71 +++++++++++ tests/unit/settings-api.test.ts | 21 +++ 14 files changed, 405 insertions(+), 3 deletions(-) create mode 100644 open-sse/utils/responsesStatePolicy.ts create mode 100644 src/app/(dashboard)/dashboard/settings/components/ResponsesStatePolicyTab.tsx create mode 100644 src/shared/constants/responsesPreviousResponseId.ts create mode 100644 tests/unit/responses-state-policy.test.ts diff --git a/open-sse/handlers/chatCore.ts b/open-sse/handlers/chatCore.ts index 1d8e44943498..27121efc7418 100644 --- a/open-sse/handlers/chatCore.ts +++ b/open-sse/handlers/chatCore.ts @@ -24,6 +24,7 @@ import { runWithOnPersist, } from "../services/tokenRefresh.ts"; import { createRequestLogger } from "../utils/requestLogger.ts"; +import { applyResponsesPreviousResponseIdPolicy } from "../utils/responsesStatePolicy.ts"; import { getModelTargetFormat, PROVIDER_ID_TO_ALIAS } from "../config/providerModels.ts"; import { DEFAULT_THINKING_CLAUDE_SIGNATURE } from "../config/defaultThinkingSignature.ts"; import { @@ -3512,6 +3513,14 @@ export async function handleChatCore({ } translatedBody.model = finalModelToUpstream; + const previousResponseIdPolicy = applyResponsesPreviousResponseIdPolicy(translatedBody, { + mode: settings.responsesPreviousResponseIdMode, + sourceFormat, + targetFormat, + credentials, + }); + translatedBody = previousResponseIdPolicy.body as typeof translatedBody; + // #1789: Prevent output_config.effort from overriding effort encoded in model name (Codex) if (provider === "codex" || provider?.startsWith("codex")) { const hasEffortSuffix = finalModelToUpstream.match(/-(low|medium|high|xhigh)$/i); diff --git a/open-sse/utils/responsesStatePolicy.ts b/open-sse/utils/responsesStatePolicy.ts new file mode 100644 index 000000000000..2e073c387fce --- /dev/null +++ b/open-sse/utils/responsesStatePolicy.ts @@ -0,0 +1,75 @@ +import { isOpenAIResponsesStoreEnabled } from "@/lib/providers/requestDefaults"; +import { + DEFAULT_RESPONSES_PREVIOUS_RESPONSE_ID_MODE, + RESPONSES_PREVIOUS_RESPONSE_ID_MODES, + type ResponsesPreviousResponseIdMode, +} from "@/shared/constants/responsesPreviousResponseId"; +import { FORMATS } from "../translator/formats.ts"; + +type JsonRecord = Record; + +type ApplyResponsesPreviousResponseIdPolicyOptions = { + mode: unknown; + sourceFormat?: unknown; + targetFormat?: unknown; + credentials?: unknown; +}; + +const MODE_SET = new Set(RESPONSES_PREVIOUS_RESPONSE_ID_MODES); + +function toRecord(value: unknown): JsonRecord { + return value && typeof value === "object" && !Array.isArray(value) ? (value as JsonRecord) : {}; +} + +export function normalizeResponsesPreviousResponseIdMode( + value: unknown +): ResponsesPreviousResponseIdMode { + if (typeof value === "string" && MODE_SET.has(value)) { + return value as ResponsesPreviousResponseIdMode; + } + return DEFAULT_RESPONSES_PREVIOUS_RESPONSE_ID_MODE; +} + +export function shouldStripPreviousResponseId({ + mode, + sourceFormat, + targetFormat, + credentials, +}: ApplyResponsesPreviousResponseIdPolicyOptions): boolean { + const normalizedMode = normalizeResponsesPreviousResponseIdMode(mode); + if (normalizedMode === "preserve") return false; + if (normalizedMode === "strip") return true; + + const isResponsesSource = sourceFormat === FORMATS.OPENAI_RESPONSES; + const isResponsesTarget = targetFormat === FORMATS.OPENAI_RESPONSES; + if (!isResponsesSource && !isResponsesTarget) return false; + + // `previous_response_id` is only safe when the upstream actually keeps + // Responses state. OmniRoute defaults to stateless upstream calls, so auto + // strips unless the connection explicitly opts into OpenAI Responses storage. + const providerSpecificData = toRecord(toRecord(credentials).providerSpecificData); + return !isOpenAIResponsesStoreEnabled(providerSpecificData); +} + +export function applyResponsesPreviousResponseIdPolicy( + body: unknown, + options: ApplyResponsesPreviousResponseIdPolicyOptions +): { body: unknown; stripped: boolean; mode: ResponsesPreviousResponseIdMode } { + const mode = normalizeResponsesPreviousResponseIdMode(options.mode); + if (!body || typeof body !== "object" || Array.isArray(body)) { + return { body, stripped: false, mode }; + } + + const record = body as JsonRecord; + if (!Object.hasOwn(record, "previous_response_id")) { + return { body, stripped: false, mode }; + } + + if (!shouldStripPreviousResponseId({ ...options, mode })) { + return { body, stripped: false, mode }; + } + + const next = { ...record }; + delete next.previous_response_id; + return { body: next, stripped: true, mode }; +} diff --git a/src/app/(dashboard)/dashboard/settings/ai/page.tsx b/src/app/(dashboard)/dashboard/settings/ai/page.tsx index 0770715dda2e..21b16f5de3d8 100644 --- a/src/app/(dashboard)/dashboard/settings/ai/page.tsx +++ b/src/app/(dashboard)/dashboard/settings/ai/page.tsx @@ -4,6 +4,7 @@ import { useTranslations } from "next-intl"; import ThinkingBudgetTab from "../components/ThinkingBudgetTab"; import VisionBridgeSettingsTab from "../components/VisionBridgeSettingsTab"; import SystemPromptTab from "../components/SystemPromptTab"; +import ResponsesStatePolicyTab from "../components/ResponsesStatePolicyTab"; import CodexFastTierTab from "../components/CodexFastTierTab"; import ClaudeFastModeTab from "../components/ClaudeFastModeTab"; import MemorySkillsTab from "../components/MemorySkillsTab"; @@ -17,6 +18,7 @@ export default function SettingsAiPage() { + diff --git a/src/app/(dashboard)/dashboard/settings/components/ResponsesStatePolicyTab.tsx b/src/app/(dashboard)/dashboard/settings/components/ResponsesStatePolicyTab.tsx new file mode 100644 index 000000000000..349463192084 --- /dev/null +++ b/src/app/(dashboard)/dashboard/settings/components/ResponsesStatePolicyTab.tsx @@ -0,0 +1,120 @@ +"use client"; + +import { useEffect, useState, useRef } from "react"; +import { useTranslations } from "next-intl"; +import { Card, Select } from "@/shared/components"; +import { + DEFAULT_RESPONSES_PREVIOUS_RESPONSE_ID_MODE, + RESPONSES_PREVIOUS_RESPONSE_ID_MODES, + type ResponsesPreviousResponseIdMode, +} from "@/shared/constants/responsesPreviousResponseId"; + +const MODE_SET = new Set(RESPONSES_PREVIOUS_RESPONSE_ID_MODES); + +function normalizeMode(value: unknown): ResponsesPreviousResponseIdMode { + return typeof value === "string" && MODE_SET.has(value) + ? (value as ResponsesPreviousResponseIdMode) + : DEFAULT_RESPONSES_PREVIOUS_RESPONSE_ID_MODE; +} + +export default function ResponsesStatePolicyTab() { + const [mode, setMode] = useState( + DEFAULT_RESPONSES_PREVIOUS_RESPONSE_ID_MODE + ); + const [loading, setLoading] = useState(true); + const [saving, setSaving] = useState(false); + const [status, setStatus] = useState<"" | "saved" | "error">(""); + const t = useTranslations("settings"); + + useEffect(() => { + let cancelled = false; + fetch("/api/settings") + .then((res) => res.json()) + .then((data) => { + if (cancelled) return; + setMode(normalizeMode(data?.responsesPreviousResponseIdMode)); + setLoading(false); + }) + .catch(() => { + if (!cancelled) setLoading(false); + }); + return () => { + cancelled = true; + }; + }, []); + + const save = async (nextMode: ResponsesPreviousResponseIdMode) => { + if (saving || loading || nextMode === mode) return; + const previousMode = mode; + setMode(nextMode); + setSaving(true); + setStatus(""); + + try { + const res = await fetch("/api/settings", { + method: "PATCH", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ responsesPreviousResponseIdMode: nextMode }), + }); + if (!res.ok) { + setMode(previousMode); + setStatus("error"); + return; + } + setStatus("saved"); + setTimeout(() => setStatus(""), 2000); + } catch { + setMode(previousMode); + setStatus("error"); + } finally { + setSaving(false); + } + }; + + return ( + +
+
+ +
+
+

{t("responsesStateTitle")}

+

{t("responsesStateDesc")}

+
+
+ {status === "saved" && ( + + check_circle{" "} + {t("saved")} + + )} + {status === "error" && ( + + error{" "} + {t("responsesStateSaveError")} + + )} +
+
+ +