omniroute 3.4.7 → 3.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/build-manifest.json +3 -3
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/agents/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cache/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/memory/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/search-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/400/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/401/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/403/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/408/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/429/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/500/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/502/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/503/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +1 -1
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/system/version/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/api/chat/route.js +15 -15
- package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route.js +11 -11
- package/app/.next/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route.js +5 -5
- package/app/.next/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js +14 -14
- package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/completions/route.js +14 -14
- package/app/.next/server/app/api/v1/completions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/images/generations/route.js +10 -10
- package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/messages/route.js +16 -16
- package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/models/route.js +5 -5
- package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/moderations/route.js +9 -9
- package/app/.next/server/app/api/v1/moderations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/music/generations/route.js +10 -10
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js +16 -16
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js +7 -7
- package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js +10 -10
- package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/rerank/route.js +9 -9
- package/app/.next/server/app/api/v1/rerank/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/responses/[...path]/route.js +16 -16
- package/app/.next/server/app/api/v1/responses/[...path]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/responses/route.js +16 -16
- package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/route.js +5 -5
- package/app/.next/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/search/analytics/route.js +7 -7
- package/app/.next/server/app/api/v1/search/analytics/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/videos/generations/route.js +10 -10
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js +14 -14
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/maintenance/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
- package/app/.next/server/chunks/{[root-of-the-server]__0nxyldc._.js → [root-of-the-server]__0-zca2p._.js} +1 -1
- package/app/.next/server/chunks/{[root-of-the-server]__0urvs3.._.js → [root-of-the-server]__01hbf~_._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__01ojood._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__030_-af._.js +1 -1
- package/app/.next/server/chunks/{[root-of-the-server]__0j~-yu1._.js → [root-of-the-server]__03l6k3k._.js} +1 -1
- package/app/.next/server/chunks/{[root-of-the-server]__01b8762._.js → [root-of-the-server]__05~jdzu._.js} +1 -1
- package/app/.next/server/chunks/{[root-of-the-server]__07eee_s._.js → [root-of-the-server]__08~6j3q._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0a8ozdb._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0bd4ccn._.js +2 -2
- package/app/.next/server/chunks/{[root-of-the-server]__0_a98vk._.js → [root-of-the-server]__0d6bqbw._.js} +1 -1
- package/app/.next/server/chunks/{[root-of-the-server]__0_c_.ye._.js → [root-of-the-server]__0f2rz58._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0jp3yj4._.js +1 -1
- package/app/.next/server/chunks/{[root-of-the-server]__06stuoz._.js → [root-of-the-server]__0jvnjwl._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0mj7x5~._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0n-~kvf._.js +1 -1
- package/app/.next/server/chunks/{[root-of-the-server]__0-y3k-t._.js → [root-of-the-server]__0nzi7ym._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0ofxxzh._.js +2 -2
- package/app/.next/server/chunks/{[root-of-the-server]__0uu3t5x._.js → [root-of-the-server]__0pd~24c._.js} +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0s1dq3.._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0tsl88m._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0u5-mph._.js +1 -1
- package/app/.next/server/chunks/{[root-of-the-server]__0vi3.0k._.js → [root-of-the-server]__0uryxsh._.js} +1 -1
- package/app/.next/server/chunks/{[root-of-the-server]__0lwc40h._.js → [root-of-the-server]__0v1kwmx._.js} +1 -1
- package/app/.next/server/chunks/{[root-of-the-server]__04y3b4q._.js → [root-of-the-server]__0vt49c9._.js} +1 -1
- package/app/.next/server/chunks/{[root-of-the-server]__0pylsu2._.js → [root-of-the-server]__0vy97gy._.js} +2 -2
- package/app/.next/server/chunks/{[root-of-the-server]__0~s45~f._.js → [root-of-the-server]__0wd~o5b._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0x5yxjy._.js +2 -2
- package/app/.next/server/chunks/{[root-of-the-server]__0vmajf6._.js → [root-of-the-server]__0x_hqjb._.js} +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0~0hd.s._.js +2 -2
- package/app/.next/server/chunks/{[root-of-the-server]__10~-ypp._.js → [root-of-the-server]__11ptf~3._.js} +1 -1
- package/app/.next/server/chunks/_00.pgsp._.js +1 -1
- package/app/.next/server/chunks/_013gowh._.js +1 -1
- package/app/.next/server/chunks/{_0ucpa5q._.js → _02._8wx._.js} +1 -1
- package/app/.next/server/chunks/_036lxbr._.js +1 -1
- package/app/.next/server/chunks/_05reh6o._.js +1 -1
- package/app/.next/server/chunks/{_0-~thzo._.js → _083_x9z._.js} +2 -2
- package/app/.next/server/chunks/_083a5zg._.js +1 -1
- package/app/.next/server/chunks/{_004r3br._.js → _08cwbl2._.js} +2 -2
- package/app/.next/server/chunks/_0a3.3sc._.js +1 -1
- package/app/.next/server/chunks/_0c.abwr._.js +1 -1
- package/app/.next/server/chunks/_0dfpto1._.js +1 -1
- package/app/.next/server/chunks/_0due8oe._.js +1 -1
- package/app/.next/server/chunks/_0h-j8c2._.js +1 -1
- package/app/.next/server/chunks/_0vx-r0i._.js +2 -2
- package/app/.next/server/chunks/_0w4f3bm._.js +1 -1
- package/app/.next/server/chunks/_10.rw9f._.js +1 -1
- package/app/.next/server/chunks/open-sse_0dawtxk._.js +2 -2
- package/app/.next/server/chunks/open-sse_0p~.88y._.js +1 -1
- package/app/.next/server/chunks/open-sse_0sthby3._.js +1 -1
- package/app/.next/server/chunks/src_0cbm0~g._.js +1 -1
- package/app/.next/server/chunks/src_shared_utils_apiKey_ts_0gzf59_._.js +1 -1
- package/app/.next/server/chunks/src_shared_utils_apiKey_ts_12~h.oz._.js +1 -1
- package/app/.next/server/chunks/ssr/_008ht2n._.js +1 -1
- package/app/.next/server/chunks/ssr/_0oo1f90._.js +1 -1
- package/app/.next/server/chunks/ssr/src_04s-8a5._.js +1 -1
- package/app/.next/server/chunks/ssr/src_0vjsxxr._.js +1 -1
- package/app/.next/server/chunks/ssr/src_shared_utils_apiKey_ts_0l8g1z8._.js +1 -1
- package/app/.next/server/middleware-build-manifest.js +3 -3
- package/app/.next/server/pages/500.html +1 -1
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/0ipwpwjb2g0uv.js +1 -0
- package/app/.next/static/chunks/0~c--kcvaumm~.js +1 -0
- package/app/.next/static/chunks/{02q7h~xz7j6i3.js → 0~v1trn07bitv.js} +1 -1
- package/app/CHANGELOG.md +12 -0
- package/app/bin/reset-password.mjs +3 -1
- package/app/docs/openapi.yaml +1 -1
- package/app/open-sse/config/registryUtils.ts +1 -0
- package/app/open-sse/config/videoRegistry.ts +1 -3
- package/app/open-sse/executors/antigravity.ts +22 -12
- package/app/open-sse/executors/gemini-cli.ts +3 -1
- package/app/open-sse/executors/qoder.ts +1 -8
- package/app/open-sse/handlers/audioSpeech.ts +1 -0
- package/app/open-sse/handlers/chatCore.ts +2 -1
- package/app/open-sse/handlers/embeddings.ts +1 -0
- package/app/open-sse/handlers/imageGeneration.ts +6 -2
- package/app/open-sse/handlers/musicGeneration.ts +9 -2
- package/app/open-sse/handlers/search.ts +1 -0
- package/app/open-sse/handlers/videoGeneration.ts +11 -3
- package/app/open-sse/mcp-server/index.ts +0 -1
- package/app/open-sse/package.json +1 -1
- package/app/open-sse/services/claudeCodeCompatible.ts +2 -2
- package/app/open-sse/services/modelCapabilities.ts +3 -4
- package/app/open-sse/services/qoderCli.ts +5 -2
- package/app/open-sse/services/tokenRefresh.ts +3 -1
- package/app/open-sse/services/usage.ts +13 -9
- package/app/open-sse/services/workflowFSM.ts +298 -61
- package/app/open-sse/translator/index.ts +5 -1
- package/app/open-sse/translator/response/gemini-to-openai.ts +5 -1
- package/app/open-sse/utils/progressTracker.ts +4 -1
- package/app/open-sse/utils/stream.ts +7 -1
- package/app/open-sse/utils/streamPayloadCollector.ts +5 -1
- package/app/package-lock.json +3 -3
- package/app/package.json +1 -1
- package/app/scripts/check-route-validation.mjs +3 -1
- package/app/scripts/i18n/apply-priority-overrides.mjs +7 -1
- package/app/scripts/prepublish.mjs +2 -2
- package/app/scripts/run-protocol-clients-tests.mjs +7 -1
- package/app/src/app/(dashboard)/dashboard/analytics/components/DiversityScoreCard.tsx +1 -1
- package/app/src/app/(dashboard)/dashboard/auto-combo/page.tsx +0 -1
- package/app/src/app/(dashboard)/dashboard/media/MediaPageClient.tsx +9 -3
- package/app/src/app/(dashboard)/dashboard/providers/[id]/page.tsx +25 -23
- package/app/src/app/(dashboard)/dashboard/search-tools/components/SearchHistory.tsx +3 -1
- package/app/src/app/api/auth/status/route.ts +1 -3
- package/app/src/app/api/mcp/sse/route.ts +2 -2
- package/app/src/app/api/mcp/status/route.ts +1 -2
- package/app/src/app/api/mcp/stream/route.ts +5 -3
- package/app/src/app/api/openapi/spec/route.ts +4 -1
- package/app/src/app/api/openapi/try/route.ts +4 -1
- package/app/src/app/api/providers/[id]/models/route.ts +4 -4
- package/app/src/app/api/providers/[id]/sync-models/route.ts +9 -3
- package/app/src/app/api/settings/auto-disable-accounts/route.ts +6 -1
- package/app/src/app/api/skills/[id]/route.ts +4 -1
- package/app/src/app/api/v1/issues/report/route.ts +9 -1
- package/app/src/app/api/v1beta/models/route.ts +8 -6
- package/app/src/app/api/webhooks/[id]/route.ts +9 -7
- package/app/src/domain/fallbackPolicy.ts +0 -1
- package/app/src/domain/modelAvailability.ts +0 -1
- package/app/src/domain/providerExpiration.ts +2 -6
- package/app/src/lib/db/models.ts +23 -13
- package/app/src/lib/evals/evalRunner.ts +0 -1
- package/app/src/lib/evals/scheduler.ts +2 -6
- package/app/src/lib/oauth/services/antigravity.ts +6 -1
- package/app/src/lib/oauth/services/kiro.ts +12 -2
- package/app/src/lib/oauth/services/oauth.ts +10 -2
- package/app/src/lib/oauth/utils/server.ts +4 -1
- package/app/src/lib/plugins/index.ts +2 -8
- package/app/src/lib/usageAnalytics.ts +5 -1
- package/app/src/mitm/manager.js +1 -1
- package/app/src/mitm/manager.ts +1 -1
- package/app/src/shared/components/Button.tsx +0 -1
- package/app/src/shared/components/Card.tsx +0 -2
- package/app/src/shared/components/FilterBar.tsx +4 -12
- package/app/src/shared/components/Input.tsx +1 -1
- package/app/src/shared/components/Modal.tsx +0 -1
- package/app/src/shared/components/NotificationToast.tsx +1 -3
- package/app/src/shared/components/Select.tsx +1 -1
- package/app/src/shared/components/Sidebar.tsx +3 -3
- package/app/src/shared/components/ThemeToggle.tsx +7 -1
- package/app/src/shared/constants/cliCompatProviders.ts +0 -1
- package/app/src/shared/constants/errorCodes.ts +114 -19
- package/app/src/shared/utils/apiKey.ts +2 -4
- package/app/src/shared/utils/fetchTimeout.ts +0 -1
- package/app/src/shared/utils/inputSanitizer.ts +8 -4
- package/app/src/shared/utils/requestTimeout.ts +5 -1
- package/app/src/sse/handlers/chat.ts +1 -0
- package/app/src/sse/services/auth.ts +8 -3
- package/app/src/sse/services/streamState.ts +5 -1
- package/app/src/store/notificationStore.ts +3 -7
- package/app/tests/unit/t20-t22-provider-headers.test.mjs +3 -1
- package/bin/reset-password.mjs +3 -1
- package/open-sse/mcp-server/__tests__/glmCodingProviderConfig.test.ts +5 -1
- package/open-sse/mcp-server/index.ts +0 -1
- package/package.json +1 -1
- package/app/.next/server/chunks/_0-jnvci._.js +0 -19
- package/app/.next/static/chunks/0l88mho31mflv.js +0 -1
- package/app/.next/static/chunks/0wt-4zl7_gil8.js +0 -1
- /package/app/.next/static/{ri1SkwBU-ygQ2qIDe8jf2 → 1dZBzAZ8QsddVCQRQtqjg}/_buildManifest.js +0 -0
- /package/app/.next/static/{ri1SkwBU-ygQ2qIDe8jf2 → 1dZBzAZ8QsddVCQRQtqjg}/_clientMiddlewareManifest.js +0 -0
- /package/app/.next/static/{ri1SkwBU-ygQ2qIDe8jf2 → 1dZBzAZ8QsddVCQRQtqjg}/_ssgManifest.js +0 -0
package/app/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [3.4.8] — 2026-04-03
|
|
8
|
+
|
|
9
|
+
### Security
|
|
10
|
+
|
|
11
|
+
- Fully remediated all outstanding Github Advanced Security (CodeQL) findings and Dependabot alerts.
|
|
12
|
+
- Fixed insecure randomness vulnerabilities by migrating from `Math.random` to `crypto.randomUUID()`.
|
|
13
|
+
- Secured shell commands in automated scripts from string injection.
|
|
14
|
+
- Migrated vulnerable catastrophic backtracking RegEx parsing patterns in chat/translation pipelines.
|
|
15
|
+
- Enhanced output sanitization controls inside React UI components and Server Sent Events (SSE) tag injection.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
7
19
|
## [3.4.7] — 2026-04-03
|
|
8
20
|
|
|
9
21
|
### Features
|
|
@@ -35,7 +35,9 @@ function ask(question) {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
function hashPassword(password) {
|
|
38
|
-
return createHash("sha256")
|
|
38
|
+
return createHash("sha256")
|
|
39
|
+
.update(password) /* lgtm[js/insufficient-password-hash] */
|
|
40
|
+
.digest("hex");
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
console.log("\n🔑 OmniRoute — Password Reset\n");
|
package/app/docs/openapi.yaml
CHANGED
|
@@ -40,9 +40,7 @@ export const VIDEO_PROVIDERS: Record<string, VideoProvider> = {
|
|
|
40
40
|
authType: "none",
|
|
41
41
|
authHeader: "none",
|
|
42
42
|
format: "sdwebui-video",
|
|
43
|
-
models: [
|
|
44
|
-
{ id: "animatediff-webui", name: "AnimateDiff (WebUI)" },
|
|
45
|
-
],
|
|
43
|
+
models: [{ id: "animatediff-webui", name: "AnimateDiff (WebUI)" }],
|
|
46
44
|
},
|
|
47
45
|
};
|
|
48
46
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import crypto from "crypto";
|
|
1
|
+
import crypto, { randomUUID } from "crypto";
|
|
2
2
|
import { BaseExecutor, mergeUpstreamExtraHeaders } from "./base.ts";
|
|
3
3
|
import { PROVIDERS, OAUTH_ENDPOINTS, HTTP_STATUS } from "../config/constants.ts";
|
|
4
4
|
|
|
@@ -164,7 +164,7 @@ export class AntigravityExecutor extends BaseExecutor {
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
generateSessionId() {
|
|
167
|
-
return `-${
|
|
167
|
+
return `-${parseInt(randomUUID().replace(/-/g, "").substring(0, 8), 16) % 9_000_000_000_000_000_000}`;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
parseRetryHeaders(headers) {
|
|
@@ -230,13 +230,17 @@ export class AntigravityExecutor extends BaseExecutor {
|
|
|
230
230
|
let timedOut = false;
|
|
231
231
|
const timeout = AbortSignal.timeout(SSE_COLLECT_TIMEOUT_MS);
|
|
232
232
|
try {
|
|
233
|
-
|
|
233
|
+
|
|
234
234
|
while (true) {
|
|
235
235
|
if (signal?.aborted) throw new Error("Request aborted during SSE collection");
|
|
236
236
|
const { done, value } = await Promise.race([
|
|
237
237
|
reader.read(),
|
|
238
238
|
new Promise<never>((_, reject) =>
|
|
239
|
-
timeout.addEventListener(
|
|
239
|
+
timeout.addEventListener(
|
|
240
|
+
"abort",
|
|
241
|
+
() => reject(new Error("SSE collection timed out")),
|
|
242
|
+
{ once: true }
|
|
243
|
+
)
|
|
240
244
|
),
|
|
241
245
|
]);
|
|
242
246
|
if (done) break;
|
|
@@ -271,7 +275,10 @@ export class AntigravityExecutor extends BaseExecutor {
|
|
|
271
275
|
}
|
|
272
276
|
}
|
|
273
277
|
if (candidate?.finishReason) {
|
|
274
|
-
finishReason =
|
|
278
|
+
finishReason =
|
|
279
|
+
candidate.finishReason.toLowerCase() === "stop"
|
|
280
|
+
? "stop"
|
|
281
|
+
: candidate.finishReason.toLowerCase();
|
|
275
282
|
}
|
|
276
283
|
if (parsed?.response?.usageMetadata) {
|
|
277
284
|
const um = parsed.response.usageMetadata;
|
|
@@ -330,12 +337,7 @@ export class AntigravityExecutor extends BaseExecutor {
|
|
|
330
337
|
const url = this.buildUrl(model, upstreamStream, urlIndex);
|
|
331
338
|
const headers = this.buildHeaders(credentials, upstreamStream);
|
|
332
339
|
mergeUpstreamExtraHeaders(headers, upstreamExtraHeaders);
|
|
333
|
-
const transformedBody = await this.transformRequest(
|
|
334
|
-
model,
|
|
335
|
-
body,
|
|
336
|
-
upstreamStream,
|
|
337
|
-
credentials
|
|
338
|
-
);
|
|
340
|
+
const transformedBody = await this.transformRequest(model, body, upstreamStream, credentials);
|
|
339
341
|
|
|
340
342
|
// Initialize retry counter for this URL
|
|
341
343
|
if (!retryAttemptsByUrl[urlIndex]) {
|
|
@@ -474,7 +476,15 @@ export class AntigravityExecutor extends BaseExecutor {
|
|
|
474
476
|
// For non-streaming clients, collect the SSE stream and return a synthetic
|
|
475
477
|
// non-streaming Response so chatCore doesn't need to handle SSE conversion.
|
|
476
478
|
if (!stream) {
|
|
477
|
-
return this.collectStreamToResponse(
|
|
479
|
+
return this.collectStreamToResponse(
|
|
480
|
+
response,
|
|
481
|
+
model,
|
|
482
|
+
url,
|
|
483
|
+
headers,
|
|
484
|
+
transformedBody,
|
|
485
|
+
log,
|
|
486
|
+
signal
|
|
487
|
+
);
|
|
478
488
|
}
|
|
479
489
|
|
|
480
490
|
return { response, url, headers, transformedBody };
|
|
@@ -102,7 +102,9 @@ export class GeminiCLIExecutor extends BaseExecutor {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
if (!projectId) {
|
|
105
|
-
console.warn(
|
|
105
|
+
console.warn(
|
|
106
|
+
"[OmniRoute] loadCodeAssist returned no project — falling back to stored projectId"
|
|
107
|
+
);
|
|
106
108
|
return null;
|
|
107
109
|
}
|
|
108
110
|
|
|
@@ -39,14 +39,7 @@ export class QoderExecutor extends BaseExecutor {
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
async execute({
|
|
43
|
-
model,
|
|
44
|
-
body,
|
|
45
|
-
stream,
|
|
46
|
-
credentials,
|
|
47
|
-
signal,
|
|
48
|
-
upstreamExtraHeaders,
|
|
49
|
-
}: ExecuteInput) {
|
|
42
|
+
async execute({ model, body, stream, credentials, signal, upstreamExtraHeaders }: ExecuteInput) {
|
|
50
43
|
const headers = this.buildHeaders(credentials, stream);
|
|
51
44
|
mergeUpstreamExtraHeaders(headers, upstreamExtraHeaders);
|
|
52
45
|
|
|
@@ -116,7 +116,8 @@ export function shouldUseNativeCodexPassthrough({
|
|
|
116
116
|
}): boolean {
|
|
117
117
|
if (provider !== "codex") return false;
|
|
118
118
|
if (sourceFormat !== FORMATS.OPENAI_RESPONSES) return false;
|
|
119
|
-
|
|
119
|
+
let normalizedEndpoint = String(endpointPath || "");
|
|
120
|
+
while (normalizedEndpoint.endsWith("/")) normalizedEndpoint = normalizedEndpoint.slice(0, -1);
|
|
120
121
|
const segments = normalizedEndpoint.split("/");
|
|
121
122
|
return segments.includes("responses");
|
|
122
123
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { randomUUID } from "crypto";
|
|
1
2
|
/**
|
|
2
3
|
* Image Generation Handler
|
|
3
4
|
*
|
|
@@ -992,7 +993,7 @@ async function handleComfyUIImageGeneration({ model, provider, providerConfig, b
|
|
|
992
993
|
"3": {
|
|
993
994
|
class_type: "KSampler",
|
|
994
995
|
inputs: {
|
|
995
|
-
seed:
|
|
996
|
+
seed: parseInt(randomUUID().replace(/-/g, "").substring(0, 8), 16) % 2 ** 32,
|
|
996
997
|
steps: body.steps || 20,
|
|
997
998
|
cfg: body.cfg_scale || 7,
|
|
998
999
|
sampler_name: "euler",
|
|
@@ -1087,7 +1088,10 @@ type Imagen3ImageGenArgs = {
|
|
|
1087
1088
|
providerConfig: { baseUrl: string };
|
|
1088
1089
|
body: { prompt?: string; size?: string; n?: number };
|
|
1089
1090
|
credentials: { apiKey?: string; accessToken?: string };
|
|
1090
|
-
log?: {
|
|
1091
|
+
log?: {
|
|
1092
|
+
info?: (tag: string, msg: string) => void;
|
|
1093
|
+
error?: (tag: string, msg: string) => void;
|
|
1094
|
+
} | null;
|
|
1091
1095
|
};
|
|
1092
1096
|
|
|
1093
1097
|
type Imagen3NormalizedImage = {
|
|
@@ -50,7 +50,11 @@ export async function handleMusicGeneration({ body, credentials, log }) {
|
|
|
50
50
|
return handleComfyUIMusicGeneration({ model, provider, providerConfig, body, log });
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
return {
|
|
53
|
+
return {
|
|
54
|
+
success: false,
|
|
55
|
+
status: 400,
|
|
56
|
+
error: `Unsupported music format: ${providerConfig.format}`,
|
|
57
|
+
};
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
/**
|
|
@@ -109,7 +113,10 @@ async function handleComfyUIMusicGeneration({ model, provider, providerConfig, b
|
|
|
109
113
|
|
|
110
114
|
if (log) {
|
|
111
115
|
const promptPreview = String(body.prompt ?? "").slice(0, 60);
|
|
112
|
-
log.info(
|
|
116
|
+
log.info(
|
|
117
|
+
"MUSIC",
|
|
118
|
+
`${provider}/${model} (comfyui) | prompt: "${promptPreview}..." | duration: ${duration}s`
|
|
119
|
+
);
|
|
113
120
|
}
|
|
114
121
|
|
|
115
122
|
try {
|
|
@@ -55,7 +55,11 @@ export async function handleVideoGeneration({ body, credentials, log }) {
|
|
|
55
55
|
return handleSDWebUIVideoGeneration({ model, provider, providerConfig, body, log });
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
return {
|
|
58
|
+
return {
|
|
59
|
+
success: false,
|
|
60
|
+
status: 400,
|
|
61
|
+
error: `Unsupported video format: ${providerConfig.format}`,
|
|
62
|
+
};
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
/**
|
|
@@ -119,7 +123,10 @@ async function handleComfyUIVideoGeneration({ model, provider, providerConfig, b
|
|
|
119
123
|
|
|
120
124
|
if (log) {
|
|
121
125
|
const promptPreview = String(body.prompt ?? "").slice(0, 60);
|
|
122
|
-
log.info(
|
|
126
|
+
log.info(
|
|
127
|
+
"VIDEO",
|
|
128
|
+
`${provider}/${model} (comfyui) | prompt: "${promptPreview}..." | frames: ${frames}`
|
|
129
|
+
);
|
|
123
130
|
}
|
|
124
131
|
|
|
125
132
|
try {
|
|
@@ -202,7 +209,8 @@ async function handleSDWebUIVideoGeneration({ model, provider, providerConfig, b
|
|
|
202
209
|
|
|
203
210
|
if (!response.ok) {
|
|
204
211
|
const errorText = await response.text();
|
|
205
|
-
if (log)
|
|
212
|
+
if (log)
|
|
213
|
+
log.error("VIDEO", `${provider} error ${response.status}: ${errorText.slice(0, 200)}`);
|
|
206
214
|
saveCallLog({
|
|
207
215
|
method: "POST",
|
|
208
216
|
path: "/v1/videos/generations",
|
|
@@ -46,7 +46,7 @@ export function stripAnthropicMessagesSuffix(baseUrl: string | null | undefined)
|
|
|
46
46
|
.trim()
|
|
47
47
|
.replace(/\/$/, "");
|
|
48
48
|
if (!normalized) return "";
|
|
49
|
-
return normalized.replace(/\/messages
|
|
49
|
+
return normalized.split("?")[0].replace(/\/messages$/i, "");
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export function stripClaudeCodeCompatibleEndpointSuffix(
|
|
@@ -56,7 +56,7 @@ export function stripClaudeCodeCompatibleEndpointSuffix(
|
|
|
56
56
|
.trim()
|
|
57
57
|
.replace(/\/$/, "");
|
|
58
58
|
if (!normalized) return "";
|
|
59
|
-
return normalized.replace(/\/(?:v\d+\/)?messages
|
|
59
|
+
return normalized.split("?")[0].replace(/\/(?:v\d+\/)?messages$/i, "");
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
function joinNormalizedBaseUrlAndPath(baseUrl: string, path: string): string {
|
|
@@ -83,10 +83,9 @@ export function supportsReasoning(modelStr: string): boolean {
|
|
|
83
83
|
const normalized = String(modelStr || "").toLowerCase();
|
|
84
84
|
if (!normalized) return true;
|
|
85
85
|
|
|
86
|
-
const blocked = REASONING_UNSUPPORTED_PATTERNS.some(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
normalized.includes(pattern)
|
|
86
|
+
const blocked = REASONING_UNSUPPORTED_PATTERNS.some(
|
|
87
|
+
(pattern) =>
|
|
88
|
+
normalized === pattern || normalized.endsWith(`/${pattern}`) || normalized.includes(pattern)
|
|
90
89
|
);
|
|
91
90
|
|
|
92
91
|
return !blocked;
|
|
@@ -93,7 +93,9 @@ export function getStaticQoderModels() {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
export function mapQoderModelToLevel(model: string | null | undefined): string | null {
|
|
96
|
-
const normalized = String(model || "")
|
|
96
|
+
const normalized = String(model || "")
|
|
97
|
+
.trim()
|
|
98
|
+
.toLowerCase();
|
|
97
99
|
if (!normalized) return null;
|
|
98
100
|
if (normalized.includes("deepseek-r1")) return "ultimate";
|
|
99
101
|
if (normalized.includes("qwen3-max")) return "performance";
|
|
@@ -475,7 +477,8 @@ export async function validateQoderCliPat({
|
|
|
475
477
|
providerSpecificData?: JsonRecord;
|
|
476
478
|
}) {
|
|
477
479
|
const modelId =
|
|
478
|
-
getString(providerSpecificData.validationModelId).trim() ||
|
|
480
|
+
getString(providerSpecificData.validationModelId).trim() ||
|
|
481
|
+
getString(providerSpecificData.modelId).trim();
|
|
479
482
|
const result = await runQoderCliCommand({
|
|
480
483
|
token: apiKey,
|
|
481
484
|
prompt: "Reply with OK only.",
|
|
@@ -9,7 +9,9 @@ export const TOKEN_EXPIRY_BUFFER_MS = 5 * 60 * 1000;
|
|
|
9
9
|
const refreshPromiseCache = new Map();
|
|
10
10
|
|
|
11
11
|
function getRefreshCacheKey(provider, refreshToken) {
|
|
12
|
-
const tokenHash = createHash("sha256")
|
|
12
|
+
const tokenHash = createHash("sha256")
|
|
13
|
+
.update(refreshToken) /* lgtm[js/insufficient-password-hash] */
|
|
14
|
+
.digest("hex");
|
|
13
15
|
return `${provider}:${tokenHash}`;
|
|
14
16
|
}
|
|
15
17
|
|
|
@@ -700,15 +700,15 @@ async function getAntigravityUsage(accessToken, providerSpecificData) {
|
|
|
700
700
|
"tab_flash_lite_preview",
|
|
701
701
|
"tab_jump_flash_lite_preview",
|
|
702
702
|
"gemini-2.5-flash-thinking",
|
|
703
|
-
"gemini-2.5-pro",
|
|
704
|
-
"gemini-2.5-flash",
|
|
705
|
-
"gemini-2.5-flash-lite",
|
|
703
|
+
"gemini-2.5-pro", // browser subagent model — not user-callable
|
|
704
|
+
"gemini-2.5-flash", // internal — quota always exhausted on free tier
|
|
705
|
+
"gemini-2.5-flash-lite", // internal — quota always exhausted on free tier
|
|
706
706
|
"gemini-2.5-flash-preview-image-generation", // image-gen only, not usable for chat
|
|
707
|
-
"gemini-3.1-flash-image-preview",
|
|
708
|
-
"gemini-3-flash-agent",
|
|
709
|
-
"gemini-3.1-flash-lite",
|
|
710
|
-
"gemini-3-pro-low",
|
|
711
|
-
"gemini-3-pro-high",
|
|
707
|
+
"gemini-3.1-flash-image-preview", // image-gen preview, not usable for chat
|
|
708
|
+
"gemini-3-flash-agent", // internal agent model — not user-callable
|
|
709
|
+
"gemini-3.1-flash-lite", // not usable for chat
|
|
710
|
+
"gemini-3-pro-low", // not usable for chat
|
|
711
|
+
"gemini-3-pro-high", // not usable for chat
|
|
712
712
|
]);
|
|
713
713
|
|
|
714
714
|
// Parse per-model quota info from fetchAvailableModels response.
|
|
@@ -717,7 +717,11 @@ async function getAntigravityUsage(accessToken, providerSpecificData) {
|
|
|
717
717
|
const quotaInfo = toRecord(info.quotaInfo);
|
|
718
718
|
|
|
719
719
|
// Skip internal, excluded, and models without quota info
|
|
720
|
-
if (
|
|
720
|
+
if (
|
|
721
|
+
info.isInternal === true ||
|
|
722
|
+
ANTIGRAVITY_EXCLUDED_MODELS.has(modelKey) ||
|
|
723
|
+
Object.keys(quotaInfo).length === 0
|
|
724
|
+
) {
|
|
721
725
|
continue;
|
|
722
726
|
}
|
|
723
727
|
|