dsh-multi-router 0.6.8 → 0.6.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/CHANGELOG.md +9 -0
- package/README.md +5 -1
- package/cordis.patch.yml +2 -2
- package/lib/accounts.js +2 -2
- package/lib/api-service.js +3 -3
- package/lib/{chunk-YZIARLWT.js → chunk-2UM45OXY.js} +2 -2
- package/lib/{chunk-A4OIPIFX.js → chunk-BK2JVL3Q.js} +3 -3
- package/lib/{chunk-Q6A57FN3.js → chunk-D726WROP.js} +12 -2
- package/lib/{chunk-Q6A57FN3.js.map → chunk-D726WROP.js.map} +2 -2
- package/lib/{chunk-XD52ZGZ5.js → chunk-GEBZMIMA.js} +30 -14
- package/lib/chunk-GEBZMIMA.js.map +7 -0
- package/lib/{chunk-JV4DLVV4.js → chunk-I2CZXH2A.js} +15 -7
- package/lib/chunk-I2CZXH2A.js.map +7 -0
- package/lib/{chunk-CZKROASU.js → chunk-KHBV4LKT.js} +3 -3
- package/lib/{chunk-TKVFF7LN.js → chunk-RMIZSZ6B.js} +3 -3
- package/lib/cli.js +4 -4
- package/lib/client.js +10 -3
- package/lib/client.js.map +2 -2
- package/lib/clients.js +3 -3
- package/lib/{host-v0.6.8.js → host-v0.6.9.js} +7 -7
- package/lib/host.js +7 -7
- package/lib/index.js +7 -7
- package/lib/manager.js +6 -6
- package/lib/router.js +2 -2
- package/lib/shim.js +3 -3
- package/package.json +1 -1
- package/lib/chunk-JV4DLVV4.js.map +0 -7
- package/lib/chunk-XD52ZGZ5.js.map +0 -7
- /package/lib/{chunk-YZIARLWT.js.map → chunk-2UM45OXY.js.map} +0 -0
- /package/lib/{chunk-A4OIPIFX.js.map → chunk-BK2JVL3Q.js.map} +0 -0
- /package/lib/{chunk-CZKROASU.js.map → chunk-KHBV4LKT.js.map} +0 -0
- /package/lib/{chunk-TKVFF7LN.js.map → chunk-RMIZSZ6B.js.map} +0 -0
|
@@ -22,11 +22,11 @@ import {
|
|
|
22
22
|
RouteError,
|
|
23
23
|
abortable,
|
|
24
24
|
qoderContextModel
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-D726WROP.js";
|
|
26
26
|
import {
|
|
27
27
|
beijingDay,
|
|
28
28
|
writePrivateJson
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-GEBZMIMA.js";
|
|
30
30
|
|
|
31
31
|
// src/clients.mjs
|
|
32
32
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
@@ -5418,4 +5418,4 @@ export {
|
|
|
5418
5418
|
refreshWorkBuddyCheckinCredential,
|
|
5419
5419
|
createWorkBuddyCheckin
|
|
5420
5420
|
};
|
|
5421
|
-
//# sourceMappingURL=chunk-
|
|
5421
|
+
//# sourceMappingURL=chunk-RMIZSZ6B.js.map
|
package/lib/cli.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createAccountClient
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RMIZSZ6B.js";
|
|
5
5
|
import {
|
|
6
6
|
importAccount
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2UM45OXY.js";
|
|
8
8
|
import "./chunk-FLL3DUVP.js";
|
|
9
9
|
import "./chunk-KWXLQJS5.js";
|
|
10
10
|
import "./chunk-S5KMFAQM.js";
|
|
11
11
|
import "./chunk-4V52V5GO.js";
|
|
12
12
|
import {
|
|
13
13
|
Router
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D726WROP.js";
|
|
15
15
|
import {
|
|
16
16
|
DEFAULT_ROUTES,
|
|
17
17
|
PROVIDERS,
|
|
18
18
|
validateConfig,
|
|
19
19
|
writePrivateJson
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-GEBZMIMA.js";
|
|
21
21
|
|
|
22
22
|
// src/cli.mjs
|
|
23
23
|
import { parseArgs } from "node:util";
|
package/lib/client.js
CHANGED
|
@@ -50,7 +50,7 @@ module.exports = __toCommonJS(client_exports);
|
|
|
50
50
|
var import_react = require("react");
|
|
51
51
|
|
|
52
52
|
// package.json
|
|
53
|
-
var version = "0.6.
|
|
53
|
+
var version = "0.6.9";
|
|
54
54
|
|
|
55
55
|
// src/client.jsx
|
|
56
56
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -1005,7 +1005,7 @@ function RoutesTable({ data, busy, act, edit }) {
|
|
|
1005
1005
|
] }),
|
|
1006
1006
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { className: "check", children: [
|
|
1007
1007
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { type: "checkbox", "aria-label": `\u5C55\u793A\u8DEF\u7531 ${r.name}`, disabled: busy, checked: r.visible !== false, onChange: (e) => {
|
|
1008
|
-
const { id, reasoning, supportsImages, expiringStatus, freeStatus, maxContextWindow, supportedContextWindows, configuredContextWindow, contextKnown, eligibleAccountIds, enforceContext, ...route } = r;
|
|
1008
|
+
const { id, reasoning, supportsImages, expiringStatus, freeStatus, creditRates, maxContextWindow, supportedContextWindows, configuredContextWindow, contextKnown, eligibleAccountIds, enforceContext, ...route } = r;
|
|
1009
1009
|
void act({ action: "route.save", id, previousId: id, route: { ...route, visible: e.target.checked } });
|
|
1010
1010
|
} }),
|
|
1011
1011
|
r.visible !== false ? "\u5F00\u542F" : "\u5173\u95ED"
|
|
@@ -2297,7 +2297,7 @@ function FreeStatus({ route, busy, act, onUpdate }) {
|
|
|
2297
2297
|
function FreeRouteForm({ draft, setDraft, data, act, busy, error, notice }) {
|
|
2298
2298
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", { onSubmit: async (e) => {
|
|
2299
2299
|
e.preventDefault();
|
|
2300
|
-
const { id, previousId, revision, reasoning, supportsImages, expiringStatus, freeStatus, maxContextWindow, supportedContextWindows, configuredContextWindow, contextKnown, eligibleAccountIds, enforceContext, ...route } = draft;
|
|
2300
|
+
const { id, previousId, revision, reasoning, supportsImages, expiringStatus, freeStatus, creditRates, maxContextWindow, supportedContextWindows, configuredContextWindow, contextKnown, eligibleAccountIds, enforceContext, ...route } = draft;
|
|
2301
2301
|
route.targets = route.targets.map((t) => ({ provider: t.provider, ...t.account ? { account: t.account } : {}, ...t.model ? { model: t.model } : {}, ...t.models ? { models: t.models } : {} }));
|
|
2302
2302
|
if (await act({ action: "route.save", id, previousId, revision, route })) setDraft(null);
|
|
2303
2303
|
}, children: [
|
|
@@ -2463,6 +2463,13 @@ function RouteForm({ draft, setDraft, data, act, busy, error, notice }) {
|
|
|
2463
2463
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { type: "number", disabled: busy, min: "1", step: "1", required: true, value: draft.creditBalanceThreshold ?? 1e3, onChange: (e) => set("creditBalanceThreshold", Number(e.target.value)) })
|
|
2464
2464
|
] })
|
|
2465
2465
|
] }),
|
|
2466
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "box stack", children: [
|
|
2467
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { className: "check", children: [
|
|
2468
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { type: "checkbox", disabled: busy, checked: draft.discountOrder !== false, onChange: (e) => set("discountOrder", e.target.checked) }),
|
|
2469
|
+
"\u6309\u79EF\u5206\u6298\u6263\u6392\u5E8F\uFF08\u9ED8\u8BA4\u5F00\u542F\uFF09"
|
|
2470
|
+
] }),
|
|
2471
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "notice", children: "\u6BCF\u6B21\u8BF7\u6C42\u6309\u5404\u6E20\u9053\u5F53\u524D\u516C\u5E03\u7684\u79EF\u5206\u500D\u7387\u4ECE\u5C0F\u5230\u5927\u6392\u5217\u5019\u9009\u8D26\u53F7\uFF0C\u500D\u7387\u8D8A\u4F4E\u8D8A\u4FBF\u5B9C\u3001\u8D8A\u5148\u7528\u3002\u500D\u7387\u6765\u81EA\u6A21\u578B\u76EE\u5F55\u5E76\u968F\u76EE\u5F55\u5237\u65B0\uFF0C\u9650\u65F6\u4FC3\u9500\u5230\u671F\u540E\u81EA\u52A8\u6062\u590D\u3002\u4E34\u671F\u79EF\u5206\u4E0E\u79EF\u5206\u5747\u8861\u989D\u5EA6\u4ECD\u7136\u4F18\u5148\uFF0C\u6298\u6263\u53EA\u5728\u540C\u7C7B\u5019\u9009\u4E4B\u95F4\u51B3\u5B9A\u5148\u540E\uFF1B\u6CA1\u6709\u516C\u5E03\u500D\u7387\u7684\u8D26\u53F7\u6392\u5728\u6700\u540E\u3002" })
|
|
2472
|
+
] }),
|
|
2466
2473
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "bar", children: [
|
|
2467
2474
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: "\u6A21\u578B\u4E0E\u8D26\u53F7\u76EE\u6807" }),
|
|
2468
2475
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "notice", children: "\u6309\u4E0B\u65B9\u987A\u5E8F\u5207\u6362" })
|