omniroute 3.0.7 → 3.0.9

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 (95) 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/search-tools/page_client-reference-manifest.js +1 -1
  27. package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
  28. package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  29. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  30. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  31. package/app/.next/server/app/400/page_client-reference-manifest.js +1 -1
  32. package/app/.next/server/app/401/page_client-reference-manifest.js +1 -1
  33. package/app/.next/server/app/403/page_client-reference-manifest.js +1 -1
  34. package/app/.next/server/app/408/page_client-reference-manifest.js +1 -1
  35. package/app/.next/server/app/429/page_client-reference-manifest.js +1 -1
  36. package/app/.next/server/app/500/page_client-reference-manifest.js +1 -1
  37. package/app/.next/server/app/502/page_client-reference-manifest.js +1 -1
  38. package/app/.next/server/app/503/page_client-reference-manifest.js +1 -1
  39. package/app/.next/server/app/_global-error.html +2 -2
  40. package/app/.next/server/app/_global-error.rsc +1 -1
  41. package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  42. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  43. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  44. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  45. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  46. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  47. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  48. package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  49. package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
  50. package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
  51. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  52. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  53. package/app/.next/server/app/maintenance/page_client-reference-manifest.js +1 -1
  54. package/app/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  55. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  56. package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
  57. package/app/.next/server/app/status/page_client-reference-manifest.js +1 -1
  58. package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
  59. package/app/.next/server/chunks/[root-of-the-server]__051203a6._.js +2 -2
  60. package/app/.next/server/chunks/[root-of-the-server]__0891af92._.js +1 -1
  61. package/app/.next/server/chunks/[root-of-the-server]__1f2b0d89._.js +1 -1
  62. package/app/.next/server/chunks/[root-of-the-server]__46e00e59._.js +1 -1
  63. package/app/.next/server/chunks/[root-of-the-server]__6e52619e._.js +1 -1
  64. package/app/.next/server/chunks/[root-of-the-server]__70a3877b._.js +5 -5
  65. package/app/.next/server/chunks/[root-of-the-server]__7ace0fcd._.js +1 -1
  66. package/app/.next/server/chunks/[root-of-the-server]__7fa4d14e._.js +1 -1
  67. package/app/.next/server/chunks/[root-of-the-server]__b013abab._.js +6 -6
  68. package/app/.next/server/chunks/_05c48915._.js +1 -1
  69. package/app/.next/server/chunks/_06515a8a._.js +1 -1
  70. package/app/.next/server/chunks/_2115d8de._.js +1 -1
  71. package/app/.next/server/chunks/_3ac953eb._.js +1 -1
  72. package/app/.next/server/chunks/_4b8fd853._.js +1 -1
  73. package/app/.next/server/chunks/_68683848._.js +1 -1
  74. package/app/.next/server/chunks/_ee9b677b._.js +1 -1
  75. package/app/.next/server/chunks/_efd5ede2._.js +5 -5
  76. package/app/.next/server/chunks/open-sse_translator_index_ts_f5fd0821._.js +1 -1
  77. package/app/.next/server/chunks/ssr/[root-of-the-server]__9ef96d20._.js +1 -1
  78. package/app/.next/server/chunks/ssr/[root-of-the-server]__a6942102._.js +1 -1
  79. package/app/.next/server/pages/500.html +2 -2
  80. package/app/.next/server/server-reference-manifest.js +1 -1
  81. package/app/.next/server/server-reference-manifest.json +1 -1
  82. package/app/.next/static/chunks/{84065c05df1a3a1a.js → 99d7f85f909fb5e1.js} +1 -1
  83. package/app/CHANGELOG.md +33 -0
  84. package/app/docs/openapi.yaml +1 -1
  85. package/app/open-sse/handlers/responseSanitizer.ts +69 -0
  86. package/app/open-sse/translator/response/openai-to-claude.ts +12 -1
  87. package/app/open-sse/utils/usageTracking.ts +44 -5
  88. package/app/package-lock.json +23 -23
  89. package/app/package.json +1 -1
  90. package/app/src/lib/db/combos.ts +5 -5
  91. package/app/src/lib/db/models.ts +9 -9
  92. package/package.json +1 -1
  93. /package/app/.next/static/{kmbT_1tKg7aSbEcFkhAUg → nOx2-MqITU8BMdt9WgycY}/_buildManifest.js +0 -0
  94. /package/app/.next/static/{kmbT_1tKg7aSbEcFkhAUg → nOx2-MqITU8BMdt9WgycY}/_clientMiddlewareManifest.json +0 -0
  95. /package/app/.next/static/{kmbT_1tKg7aSbEcFkhAUg → nOx2-MqITU8BMdt9WgycY}/_ssgManifest.js +0 -0
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omniroute",
3
- "version": "3.0.7",
3
+ "version": "3.0.9",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omniroute",
9
- "version": "3.0.7",
9
+ "version": "3.0.9",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "workspaces": [
@@ -3096,9 +3096,9 @@
3096
3096
  }
3097
3097
  },
3098
3098
  "node_modules/@parcel/watcher/node_modules/picomatch": {
3099
- "version": "4.0.3",
3100
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
3101
- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
3099
+ "version": "4.0.4",
3100
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
3101
+ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
3102
3102
  "license": "MIT",
3103
3103
  "engines": {
3104
3104
  "node": ">=12"
@@ -12842,9 +12842,9 @@
12842
12842
  }
12843
12843
  },
12844
12844
  "node_modules/lint-staged/node_modules/picomatch": {
12845
- "version": "4.0.3",
12846
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
12847
- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
12845
+ "version": "4.0.4",
12846
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
12847
+ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
12848
12848
  "dev": true,
12849
12849
  "license": "MIT",
12850
12850
  "engines": {
@@ -15311,9 +15311,9 @@
15311
15311
  "license": "ISC"
15312
15312
  },
15313
15313
  "node_modules/picomatch": {
15314
- "version": "2.3.1",
15315
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
15316
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
15314
+ "version": "2.3.2",
15315
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
15316
+ "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
15317
15317
  "license": "MIT",
15318
15318
  "engines": {
15319
15319
  "node": ">=8.6"
@@ -18225,9 +18225,9 @@
18225
18225
  }
18226
18226
  },
18227
18227
  "node_modules/tinyglobby/node_modules/picomatch": {
18228
- "version": "4.0.3",
18229
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
18230
- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
18228
+ "version": "4.0.4",
18229
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
18230
+ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
18231
18231
  "dev": true,
18232
18232
  "license": "MIT",
18233
18233
  "engines": {
@@ -19373,9 +19373,9 @@
19373
19373
  }
19374
19374
  },
19375
19375
  "node_modules/vite/node_modules/picomatch": {
19376
- "version": "4.0.3",
19377
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
19378
- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
19376
+ "version": "4.0.4",
19377
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
19378
+ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
19379
19379
  "dev": true,
19380
19380
  "license": "MIT",
19381
19381
  "engines": {
@@ -19468,9 +19468,9 @@
19468
19468
  }
19469
19469
  },
19470
19470
  "node_modules/vitest/node_modules/picomatch": {
19471
- "version": "4.0.3",
19472
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
19473
- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
19471
+ "version": "4.0.4",
19472
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
19473
+ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
19474
19474
  "dev": true,
19475
19475
  "license": "MIT",
19476
19476
  "engines": {
@@ -19811,9 +19811,9 @@
19811
19811
  "license": "ISC"
19812
19812
  },
19813
19813
  "node_modules/yaml": {
19814
- "version": "2.8.2",
19815
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz",
19816
- "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==",
19814
+ "version": "2.8.3",
19815
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz",
19816
+ "integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==",
19817
19817
  "dev": true,
19818
19818
  "license": "ISC",
19819
19819
  "bin": {
package/app/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omniroute",
3
- "version": "3.0.7",
3
+ "version": "3.0.9",
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": {
@@ -27,21 +27,21 @@ export async function getCombos() {
27
27
  .map((row) => JSON.parse(row));
28
28
  }
29
29
 
30
- export async function getComboById(id) {
30
+ export async function getComboById(id: string) {
31
31
  const db = getDbInstance();
32
32
  const row = db.prepare("SELECT data FROM combos WHERE id = ?").get(id);
33
33
  const payload = getSerializedData(row);
34
34
  return payload ? JSON.parse(payload) : null;
35
35
  }
36
36
 
37
- export async function getComboByName(name) {
37
+ export async function getComboByName(name: string) {
38
38
  const db = getDbInstance();
39
39
  const row = db.prepare("SELECT data FROM combos WHERE name = ?").get(name);
40
40
  const payload = getSerializedData(row);
41
41
  return payload ? JSON.parse(payload) : null;
42
42
  }
43
43
 
44
- export async function createCombo(data) {
44
+ export async function createCombo(data: JsonRecord) {
45
45
  const db = getDbInstance();
46
46
  const now = new Date().toISOString();
47
47
 
@@ -63,7 +63,7 @@ export async function createCombo(data) {
63
63
  return combo;
64
64
  }
65
65
 
66
- export async function updateCombo(id, data) {
66
+ export async function updateCombo(id: string, data: JsonRecord) {
67
67
  const db = getDbInstance();
68
68
  const existing = db.prepare("SELECT data FROM combos WHERE id = ?").get(id);
69
69
  if (!existing) return null;
@@ -84,7 +84,7 @@ export async function updateCombo(id, data) {
84
84
  return merged;
85
85
  }
86
86
 
87
- export async function deleteCombo(id) {
87
+ export async function deleteCombo(id: string) {
88
88
  const db = getDbInstance();
89
89
  const result = db.prepare("DELETE FROM combos WHERE id = ?").run(id);
90
90
  if (result.changes === 0) return false;
@@ -247,7 +247,7 @@ export async function getModelAliases() {
247
247
  return result;
248
248
  }
249
249
 
250
- export async function setModelAlias(alias, model) {
250
+ export async function setModelAlias(alias: string, model: unknown) {
251
251
  const db = getDbInstance();
252
252
  db.prepare(
253
253
  "INSERT OR REPLACE INTO key_value (namespace, key, value) VALUES ('modelAliases', ?, ?)"
@@ -255,7 +255,7 @@ export async function setModelAlias(alias, model) {
255
255
  backupDbFile("pre-write");
256
256
  }
257
257
 
258
- export async function deleteModelAlias(alias) {
258
+ export async function deleteModelAlias(alias: string) {
259
259
  const db = getDbInstance();
260
260
  db.prepare("DELETE FROM key_value WHERE namespace = 'modelAliases' AND key = ?").run(alias);
261
261
  backupDbFile("pre-write");
@@ -263,7 +263,7 @@ export async function deleteModelAlias(alias) {
263
263
 
264
264
  // ──────────────── MITM Alias ────────────────
265
265
 
266
- export async function getMitmAlias(toolName) {
266
+ export async function getMitmAlias(toolName?: string) {
267
267
  const db = getDbInstance();
268
268
  if (toolName) {
269
269
  const row = db
@@ -282,7 +282,7 @@ export async function getMitmAlias(toolName) {
282
282
  return result;
283
283
  }
284
284
 
285
- export async function setMitmAliasAll(toolName, mappings) {
285
+ export async function setMitmAliasAll(toolName: string, mappings: unknown) {
286
286
  const db = getDbInstance();
287
287
  db.prepare(
288
288
  "INSERT OR REPLACE INTO key_value (namespace, key, value) VALUES ('mitmAlias', ?, ?)"
@@ -292,7 +292,7 @@ export async function setMitmAliasAll(toolName, mappings) {
292
292
 
293
293
  // ──────────────── Custom Models ────────────────
294
294
 
295
- export async function getCustomModels(providerId) {
295
+ export async function getCustomModels(providerId?: string) {
296
296
  const db = getDbInstance();
297
297
  if (providerId) {
298
298
  const row = db
@@ -342,7 +342,7 @@ export async function addCustomModel(
342
342
  const value = getKeyValue(row).value;
343
343
  const models = value ? JSON.parse(value) : [];
344
344
 
345
- const exists = models.find((m) => m.id === modelId);
345
+ const exists = models.find((m: JsonRecord) => m.id === modelId);
346
346
  if (exists) return exists;
347
347
 
348
348
  const model = {
@@ -430,7 +430,7 @@ export async function replaceCustomModels(
430
430
  return merged;
431
431
  }
432
432
 
433
- export async function removeCustomModel(providerId, modelId) {
433
+ export async function removeCustomModel(providerId: string, modelId: string) {
434
434
  const db = getDbInstance();
435
435
  const row = db
436
436
  .prepare("SELECT value FROM key_value WHERE namespace = 'customModels' AND key = ?")
@@ -441,7 +441,7 @@ export async function removeCustomModel(providerId, modelId) {
441
441
  if (!value) return false;
442
442
  const models = JSON.parse(value);
443
443
  const before = models.length;
444
- const filtered = models.filter((m) => m.id !== modelId);
444
+ const filtered = models.filter((m: JsonRecord) => m.id !== modelId);
445
445
 
446
446
  if (filtered.length === before) return false;
447
447
 
@@ -476,7 +476,7 @@ export async function updateCustomModel(
476
476
  if (!value) return null;
477
477
 
478
478
  const models = JSON.parse(value);
479
- const index = models.findIndex((m) => m.id === modelId);
479
+ const index = models.findIndex((m: JsonRecord) => m.id === modelId);
480
480
  if (index === -1) return null;
481
481
 
482
482
  const current = models[index];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omniroute",
3
- "version": "3.0.7",
3
+ "version": "3.0.9",
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": {