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.
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/build-manifest.json +2 -2
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/a2a/page_client-reference-manifest.js +1 -1
- 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-log/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/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/mcp/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/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/profile/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/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/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 +2 -2
- 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/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]__051203a6._.js +2 -2
- package/app/.next/server/chunks/[root-of-the-server]__0891af92._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__1f2b0d89._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__46e00e59._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__6e52619e._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__70a3877b._.js +5 -5
- package/app/.next/server/chunks/[root-of-the-server]__7ace0fcd._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__7fa4d14e._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__b013abab._.js +6 -6
- package/app/.next/server/chunks/_05c48915._.js +1 -1
- package/app/.next/server/chunks/_06515a8a._.js +1 -1
- package/app/.next/server/chunks/_2115d8de._.js +1 -1
- package/app/.next/server/chunks/_3ac953eb._.js +1 -1
- package/app/.next/server/chunks/_4b8fd853._.js +1 -1
- package/app/.next/server/chunks/_68683848._.js +1 -1
- package/app/.next/server/chunks/_ee9b677b._.js +1 -1
- package/app/.next/server/chunks/_efd5ede2._.js +5 -5
- package/app/.next/server/chunks/open-sse_translator_index_ts_f5fd0821._.js +1 -1
- package/app/.next/server/chunks/ssr/[root-of-the-server]__9ef96d20._.js +1 -1
- package/app/.next/server/chunks/ssr/[root-of-the-server]__a6942102._.js +1 -1
- package/app/.next/server/pages/500.html +2 -2
- 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/{84065c05df1a3a1a.js → 99d7f85f909fb5e1.js} +1 -1
- package/app/CHANGELOG.md +33 -0
- package/app/docs/openapi.yaml +1 -1
- package/app/open-sse/handlers/responseSanitizer.ts +69 -0
- package/app/open-sse/translator/response/openai-to-claude.ts +12 -1
- package/app/open-sse/utils/usageTracking.ts +44 -5
- package/app/package-lock.json +23 -23
- package/app/package.json +1 -1
- package/app/src/lib/db/combos.ts +5 -5
- package/app/src/lib/db/models.ts +9 -9
- package/package.json +1 -1
- /package/app/.next/static/{kmbT_1tKg7aSbEcFkhAUg → nOx2-MqITU8BMdt9WgycY}/_buildManifest.js +0 -0
- /package/app/.next/static/{kmbT_1tKg7aSbEcFkhAUg → nOx2-MqITU8BMdt9WgycY}/_clientMiddlewareManifest.json +0 -0
- /package/app/.next/static/{kmbT_1tKg7aSbEcFkhAUg → nOx2-MqITU8BMdt9WgycY}/_ssgManifest.js +0 -0
package/app/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omniroute",
|
|
3
|
-
"version": "3.0.
|
|
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.
|
|
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.
|
|
3100
|
-
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.
|
|
3101
|
-
"integrity": "sha512-
|
|
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.
|
|
12846
|
-
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.
|
|
12847
|
-
"integrity": "sha512-
|
|
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.
|
|
15315
|
-
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.
|
|
15316
|
-
"integrity": "sha512-
|
|
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.
|
|
18229
|
-
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.
|
|
18230
|
-
"integrity": "sha512-
|
|
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.
|
|
19377
|
-
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.
|
|
19378
|
-
"integrity": "sha512-
|
|
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.
|
|
19472
|
-
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.
|
|
19473
|
-
"integrity": "sha512-
|
|
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.
|
|
19815
|
-
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.
|
|
19816
|
-
"integrity": "sha512-
|
|
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.
|
|
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": {
|
package/app/src/lib/db/combos.ts
CHANGED
|
@@ -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;
|
package/app/src/lib/db/models.ts
CHANGED
|
@@ -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.
|
|
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": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|