omniroute 2.6.9 → 2.6.10

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.
Files changed (88) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/build-manifest.json +2 -2
  3. package/app/.next/prerender-manifest.json +3 -3
  4. package/app/.next/server/app/(dashboard)/dashboard/a2a/page_client-reference-manifest.js +1 -1
  5. package/app/.next/server/app/(dashboard)/dashboard/agents/page_client-reference-manifest.js +1 -1
  6. package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  7. package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/audit-log/page_client-reference-manifest.js +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page_client-reference-manifest.js +1 -1
  10. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  15. package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
  16. package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/mcp/page_client-reference-manifest.js +1 -1
  18. package/app/.next/server/app/(dashboard)/dashboard/media/page_client-reference-manifest.js +1 -1
  19. package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
  20. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  21. package/app/.next/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  22. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  23. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  24. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  25. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  26. package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
  27. package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  28. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  29. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  30. package/app/.next/server/app/400/page_client-reference-manifest.js +1 -1
  31. package/app/.next/server/app/401/page_client-reference-manifest.js +1 -1
  32. package/app/.next/server/app/403/page_client-reference-manifest.js +1 -1
  33. package/app/.next/server/app/408/page_client-reference-manifest.js +1 -1
  34. package/app/.next/server/app/429/page_client-reference-manifest.js +1 -1
  35. package/app/.next/server/app/500/page_client-reference-manifest.js +1 -1
  36. package/app/.next/server/app/502/page_client-reference-manifest.js +1 -1
  37. package/app/.next/server/app/503/page_client-reference-manifest.js +1 -1
  38. package/app/.next/server/app/_global-error.html +2 -2
  39. package/app/.next/server/app/_global-error.rsc +1 -1
  40. package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  41. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  42. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  43. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  44. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  45. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  46. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  47. package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  48. package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
  49. package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
  50. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  51. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  52. package/app/.next/server/app/maintenance/page_client-reference-manifest.js +1 -1
  53. package/app/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  54. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  55. package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
  56. package/app/.next/server/app/status/page_client-reference-manifest.js +1 -1
  57. package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
  58. package/app/.next/server/chunks/[root-of-the-server]__167585da._.js +1 -1
  59. package/app/.next/server/chunks/[root-of-the-server]__7d9b23e7._.js +1 -1
  60. package/app/.next/server/chunks/[root-of-the-server]__80e3bfc3._.js +2 -2
  61. package/app/.next/server/chunks/[root-of-the-server]__84e445b2._.js +1 -1
  62. package/app/.next/server/chunks/[root-of-the-server]__92cb0def._.js +2 -2
  63. package/app/.next/server/chunks/[root-of-the-server]__b954a2e7._.js +1 -1
  64. package/app/.next/server/chunks/[root-of-the-server]__db2f9fe0._.js +1 -1
  65. package/app/.next/server/chunks/[root-of-the-server]__dc47ee64._.js +1 -1
  66. package/app/.next/server/chunks/_05c48915._.js +1 -1
  67. package/app/.next/server/chunks/_2115d8de._.js +1 -1
  68. package/app/.next/server/chunks/_3ac953eb._.js +1 -1
  69. package/app/.next/server/chunks/_4b8fd853._.js +1 -1
  70. package/app/.next/server/chunks/_68683848._.js +1 -1
  71. package/app/.next/server/chunks/_ee9b677b._.js +1 -1
  72. package/app/.next/server/chunks/ssr/[root-of-the-server]__9affb65e._.js +1 -1
  73. package/app/.next/server/chunks/ssr/[root-of-the-server]__a6942102._.js +1 -1
  74. package/app/.next/server/pages/500.html +2 -2
  75. package/app/.next/server/server-reference-manifest.js +1 -1
  76. package/app/.next/server/server-reference-manifest.json +1 -1
  77. package/app/.next/static/chunks/6fa3d0f359226ceb.js +1 -0
  78. package/app/CHANGELOG.md +10 -0
  79. package/app/docs/openapi.yaml +1 -1
  80. package/app/package-lock.json +2 -2
  81. package/app/package.json +1 -1
  82. package/app/scripts/postinstall.mjs +63 -7
  83. package/package.json +1 -1
  84. package/scripts/postinstall.mjs +63 -7
  85. package/app/.next/static/chunks/260e578a06161ae2.js +0 -1
  86. /package/app/.next/static/{n3QGAIFzkOZ9zwaWQu8MD → hRjiI5CTxyRAo8yk01PI4}/_buildManifest.js +0 -0
  87. /package/app/.next/static/{n3QGAIFzkOZ9zwaWQu8MD → hRjiI5CTxyRAo8yk01PI4}/_clientMiddlewareManifest.json +0 -0
  88. /package/app/.next/static/{n3QGAIFzkOZ9zwaWQu8MD → hRjiI5CTxyRAo8yk01PI4}/_ssgManifest.js +0 -0
@@ -14,6 +14,7 @@
14
14
  *
15
15
  * Fixes: https://github.com/diegosouzapw/OmniRoute/issues/129
16
16
  * Fixes: https://github.com/diegosouzapw/OmniRoute/issues/321
17
+ * Fixes: https://github.com/diegosouzapw/OmniRoute/issues/426
17
18
  */
18
19
 
19
20
  import { existsSync, copyFileSync, mkdirSync } from "node:fs";
@@ -80,8 +81,54 @@ if (existsSync(rootBinary)) {
80
81
  }
81
82
  }
82
83
 
84
+ // Strategy 1.5: Use node-pre-gyp to download the correct prebuilt binary
85
+ // This works on Windows without requiring node-gyp, Python, or MSVC.
86
+ // better-sqlite3 ships prebuilts for win32-x64, win32-arm64, darwin-x64/arm64.
87
+ console.log(" 📥 Attempting to download prebuilt binary via node-pre-gyp...");
88
+ try {
89
+ const { execSync } = await import("node:child_process");
90
+ // better-sqlite3 bundles @mapbox/node-pre-gyp — use it directly
91
+ const preGypBin = join(
92
+ ROOT,
93
+ "app",
94
+ "node_modules",
95
+ ".bin",
96
+ process.platform === "win32" ? "node-pre-gyp.cmd" : "node-pre-gyp"
97
+ );
98
+ const preGypFallback = join(
99
+ ROOT,
100
+ "app",
101
+ "node_modules",
102
+ "@mapbox",
103
+ "node-pre-gyp",
104
+ "bin",
105
+ "node-pre-gyp"
106
+ );
107
+ const preGypCmd = existsSync(preGypBin) ? preGypBin : preGypFallback;
108
+
109
+ if (existsSync(preGypCmd)) {
110
+ execSync(`"${process.execPath}" "${preGypCmd}" install --fallback-to-build=false`, {
111
+ cwd: join(ROOT, "app", "node_modules", "better-sqlite3"),
112
+ stdio: "inherit",
113
+ timeout: 60_000,
114
+ });
115
+ mkdirSync(dirname(appBinary), { recursive: true });
116
+ try {
117
+ process.dlopen({ exports: {} }, appBinary);
118
+ console.log(" ✅ Prebuilt binary downloaded and loaded successfully!\n");
119
+ process.exit(0);
120
+ } catch (loadErr) {
121
+ console.warn(` ⚠️ Downloaded binary failed to load: ${loadErr.message}`);
122
+ }
123
+ } else {
124
+ console.warn(" ⚠️ node-pre-gyp not found, skipping prebuilt download.");
125
+ }
126
+ } catch (err) {
127
+ console.warn(` ⚠️ node-pre-gyp download failed: ${err.message.split("\n")[0]}`);
128
+ }
129
+
83
130
  // Strategy 2: Fall back to npm rebuild (may work if build tools are available)
84
- console.log(" ⚠️ Root binary not available or incompatible, attempting npm rebuild...");
131
+ console.log(" ⚠️ Attempting npm rebuild (requires build tools)...");
85
132
 
86
133
  try {
87
134
  const { execSync } = await import("node:child_process");
@@ -103,14 +150,23 @@ try {
103
150
  }
104
151
  }
105
152
 
106
- // If nothing worked, warn but don't fail the install — let the package stay
107
- // installed so users can fix manually or use the pre-flight check in the CLI
108
- console.warn(" ⚠️ Could not fix better-sqlite3 native module automatically.");
153
+ // If nothing worked, warn but don't fail the install
154
+ console.warn("\n ⚠️ Could not fix better-sqlite3 native module automatically.");
109
155
  console.warn(" The server may not start correctly.");
110
- console.warn(" Try manually:");
111
- console.warn(` cd ${join(ROOT, "app")} && npm rebuild better-sqlite3`);
112
- if (process.platform === "darwin") {
156
+ console.warn(" Manual fix options:");
157
+ if (process.platform === "win32") {
158
+ console.warn(" Option A (easiest no build tools needed):");
159
+ console.warn(` cd "${join(ROOT, "app", "node_modules", "better-sqlite3")}"`);
160
+ console.warn(" npx @mapbox/node-pre-gyp install --fallback-to-build=false");
161
+ console.warn(" Option B (requires Build Tools for Visual Studio):");
162
+ console.warn(` cd "${join(ROOT, "app")}" && npm rebuild better-sqlite3`);
163
+ console.warn(" Install from: https://visualstudio.microsoft.com/visual-cpp-build-tools/");
164
+ console.warn(" Also ensure Python is installed: https://python.org");
165
+ } else if (process.platform === "darwin") {
166
+ console.warn(` cd ${join(ROOT, "app")} && npm rebuild better-sqlite3`);
113
167
  console.warn(" If build tools are missing: xcode-select --install");
168
+ } else {
169
+ console.warn(` cd ${join(ROOT, "app")} && npm rebuild better-sqlite3`);
114
170
  }
115
171
  console.warn("");
116
172
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omniroute",
3
- "version": "2.6.9",
3
+ "version": "2.6.10",
4
4
  "description": "Smart AI Router with auto fallback — route to FREE & cheap models, zero downtime. Works with Cursor, Cline, Claude Desktop, Codex, and any OpenAI-compatible tool.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -14,6 +14,7 @@
14
14
  *
15
15
  * Fixes: https://github.com/diegosouzapw/OmniRoute/issues/129
16
16
  * Fixes: https://github.com/diegosouzapw/OmniRoute/issues/321
17
+ * Fixes: https://github.com/diegosouzapw/OmniRoute/issues/426
17
18
  */
18
19
 
19
20
  import { existsSync, copyFileSync, mkdirSync } from "node:fs";
@@ -80,8 +81,54 @@ if (existsSync(rootBinary)) {
80
81
  }
81
82
  }
82
83
 
84
+ // Strategy 1.5: Use node-pre-gyp to download the correct prebuilt binary
85
+ // This works on Windows without requiring node-gyp, Python, or MSVC.
86
+ // better-sqlite3 ships prebuilts for win32-x64, win32-arm64, darwin-x64/arm64.
87
+ console.log(" 📥 Attempting to download prebuilt binary via node-pre-gyp...");
88
+ try {
89
+ const { execSync } = await import("node:child_process");
90
+ // better-sqlite3 bundles @mapbox/node-pre-gyp — use it directly
91
+ const preGypBin = join(
92
+ ROOT,
93
+ "app",
94
+ "node_modules",
95
+ ".bin",
96
+ process.platform === "win32" ? "node-pre-gyp.cmd" : "node-pre-gyp"
97
+ );
98
+ const preGypFallback = join(
99
+ ROOT,
100
+ "app",
101
+ "node_modules",
102
+ "@mapbox",
103
+ "node-pre-gyp",
104
+ "bin",
105
+ "node-pre-gyp"
106
+ );
107
+ const preGypCmd = existsSync(preGypBin) ? preGypBin : preGypFallback;
108
+
109
+ if (existsSync(preGypCmd)) {
110
+ execSync(`"${process.execPath}" "${preGypCmd}" install --fallback-to-build=false`, {
111
+ cwd: join(ROOT, "app", "node_modules", "better-sqlite3"),
112
+ stdio: "inherit",
113
+ timeout: 60_000,
114
+ });
115
+ mkdirSync(dirname(appBinary), { recursive: true });
116
+ try {
117
+ process.dlopen({ exports: {} }, appBinary);
118
+ console.log(" ✅ Prebuilt binary downloaded and loaded successfully!\n");
119
+ process.exit(0);
120
+ } catch (loadErr) {
121
+ console.warn(` ⚠️ Downloaded binary failed to load: ${loadErr.message}`);
122
+ }
123
+ } else {
124
+ console.warn(" ⚠️ node-pre-gyp not found, skipping prebuilt download.");
125
+ }
126
+ } catch (err) {
127
+ console.warn(` ⚠️ node-pre-gyp download failed: ${err.message.split("\n")[0]}`);
128
+ }
129
+
83
130
  // Strategy 2: Fall back to npm rebuild (may work if build tools are available)
84
- console.log(" ⚠️ Root binary not available or incompatible, attempting npm rebuild...");
131
+ console.log(" ⚠️ Attempting npm rebuild (requires build tools)...");
85
132
 
86
133
  try {
87
134
  const { execSync } = await import("node:child_process");
@@ -103,14 +150,23 @@ try {
103
150
  }
104
151
  }
105
152
 
106
- // If nothing worked, warn but don't fail the install — let the package stay
107
- // installed so users can fix manually or use the pre-flight check in the CLI
108
- console.warn(" ⚠️ Could not fix better-sqlite3 native module automatically.");
153
+ // If nothing worked, warn but don't fail the install
154
+ console.warn("\n ⚠️ Could not fix better-sqlite3 native module automatically.");
109
155
  console.warn(" The server may not start correctly.");
110
- console.warn(" Try manually:");
111
- console.warn(` cd ${join(ROOT, "app")} && npm rebuild better-sqlite3`);
112
- if (process.platform === "darwin") {
156
+ console.warn(" Manual fix options:");
157
+ if (process.platform === "win32") {
158
+ console.warn(" Option A (easiest no build tools needed):");
159
+ console.warn(` cd "${join(ROOT, "app", "node_modules", "better-sqlite3")}"`);
160
+ console.warn(" npx @mapbox/node-pre-gyp install --fallback-to-build=false");
161
+ console.warn(" Option B (requires Build Tools for Visual Studio):");
162
+ console.warn(` cd "${join(ROOT, "app")}" && npm rebuild better-sqlite3`);
163
+ console.warn(" Install from: https://visualstudio.microsoft.com/visual-cpp-build-tools/");
164
+ console.warn(" Also ensure Python is installed: https://python.org");
165
+ } else if (process.platform === "darwin") {
166
+ console.warn(` cd ${join(ROOT, "app")} && npm rebuild better-sqlite3`);
113
167
  console.warn(" If build tools are missing: xcode-select --install");
168
+ } else {
169
+ console.warn(` cd ${join(ROOT, "app")} && npm rebuild better-sqlite3`);
114
170
  }
115
171
  console.warn("");
116
172
 
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,804730,t=>{t.v({name:"omniroute",version:"2.6.9",description:"Smart AI Router with auto fallback — route to FREE & cheap models, zero downtime. Works with Cursor, Cline, Claude Desktop, Codex, and any OpenAI-compatible tool.",type:"module",bin:{omniroute:"bin/omniroute.mjs","omniroute-reset-password":"bin/reset-password.mjs"},files:["bin/","app/","open-sse/mcp-server/","src/shared/contracts/","scripts/postinstall.mjs","scripts/native-binary-compat.mjs","README.md","LICENSE"],workspaces:["open-sse"],engines:{node:">=18.0.0 <24.0.0"},keywords:["ai","router","proxy","openai","claude","anthropic","gemini","fallback","cursor","cline","codex","llm","auto-fallback"],license:"MIT",author:"diegosouzapw",repository:{type:"git",url:"https://github.com/diegosouzapw/OmniRoute"},homepage:"https://omniroute.online",scripts:{dev:"node scripts/run-next.mjs dev",build:"next build","build:cli":"node scripts/prepublish.mjs",start:"node scripts/run-next.mjs start",lint:"eslint .","electron:dev":'concurrently "npm run dev" "wait-on http://localhost:20128 && cd electron && npm run dev"',"electron:build":"npm run build && cd electron && npm run build","electron:build:win":"npm run build && cd electron && npm run build:win","electron:build:mac":"npm run build && cd electron && npm run build:mac","electron:build:linux":"npm run build && cd electron && npm run build:linux",test:"node --import tsx/esm --test tests/unit/*.test.mjs","test:unit":"node --import tsx/esm --test tests/unit/*.test.mjs","test:plan3":"node --import tsx/esm --test tests/unit/plan3-p0.test.mjs","test:fixes":"node --import tsx/esm --test tests/unit/fixes-p1.test.mjs","test:security":"node --import tsx/esm --test tests/unit/security-fase01.test.mjs","check:cycles":"node scripts/check-cycles.mjs","check:route-validation:t06":"node scripts/check-route-validation.mjs","check:any-budget:t11":"node scripts/check-t11-any-budget.mjs","check:docs-sync":"node scripts/check-docs-sync.mjs","typecheck:core":"tsc --pretty false -p tsconfig.typecheck-core.json","typecheck:noimplicit:core":"tsc --pretty false -p tsconfig.typecheck-noimplicit-core.json","test:integration":"node --import tsx/esm --test tests/integration/*.test.mjs","test:e2e":"node scripts/run-playwright-tests.mjs test tests/e2e/*.spec.ts","test:protocols:e2e":"node scripts/run-protocol-clients-tests.mjs","test:vitest":"vitest run open-sse/mcp-server/__tests__/*.test.ts open-sse/services/autoCombo/__tests__/*.test.ts","test:ecosystem":"node scripts/run-ecosystem-tests.mjs","test:coverage":"npx c8 --exclude=open-sse --check-coverage --lines 50 --functions 50 --branches 50 node --import tsx/esm --test tests/unit/*.test.mjs","test:all":"npm run test:unit && npm run test:vitest && npm run test:ecosystem && npm run test:e2e",check:"npm run lint && npm run test",prepublishOnly:"npm run build:cli",postinstall:"node scripts/postinstall.mjs",prepare:"husky","system-info":"node scripts/system-info.mjs"},dependencies:{"@modelcontextprotocol/sdk":"^1.27.1","@monaco-editor/react":"^4.7.0",bcryptjs:"^3.0.3","better-sqlite3":"^12.6.2",bottleneck:"^2.19.5",dompurify:"^3.3.2",express:"^5.2.1","fetch-socks":"^1.3.2","http-proxy-middleware":"^3.0.5","https-proxy-agent":"^8.0.0",jose:"^6.1.3",lowdb:"^7.0.1","monaco-editor":"^0.55.1",next:"^16.1.6","next-intl":"^4.8.3","node-machine-id":"^1.1.12",open:"^11.0.0",ora:"^9.1.0",pino:"^10.3.1","pino-pretty":"^13.1.3",react:"19.2.4","react-dom":"19.2.4",recharts:"^3.7.0",selfsigned:"^5.5.0",tsx:"^4.21.0",undici:"^7.19.2",uuid:"^13.0.0","wreq-js":"^2.0.1",zod:"^4.3.6",zustand:"^5.0.10","@swc/helpers":"0.5.19"},devDependencies:{"@playwright/test":"^1.58.2","@tailwindcss/postcss":"^4.1.18","@types/bcryptjs":"^3.0.0","@types/better-sqlite3":"^7.6.13","@types/node":"^25.2.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3",concurrently:"^9.2.1","cross-env":"^10.1.0",eslint:"^9.39.2","eslint-config-next":"16.1.6",husky:"^9.1.7","lint-staged":"^16.2.7",prettier:"^3.8.1",tailwindcss:"^4",typescript:"^5.9.3","typescript-eslint":"^8.56.0",vitest:"^4.0.18","wait-on":"^9.0.4"},"lint-staged":{"*.{js,jsx,ts,tsx,mjs}":["prettier --write","eslint --fix --no-error-on-unmatched-pattern"],"*.{json,md,yml,yaml,css}":["prettier --write"]},pnpm:{onlyBuiltDependencies:["@parcel/watcher","@swc/core","better-sqlite3","esbuild","omniroute","sharp"]}})},175696,t=>{"use strict";var e=t.i(861745),s=t.i(843476);function n({locale:t,...n}){if(!t)throw Error(void 0);return(0,s.jsx)(e.IntlProvider,{locale:t,...n})}t.s(["default",()=>n])}]);