dsh-any-deepseek 0.0.9 → 0.0.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.
- package/lib/client.js +1 -1
- package/lib/index.js +21 -2
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -769,7 +769,7 @@ window.__ModuleLoader__.load({
|
|
|
769
769
|
children: "合计"
|
|
770
770
|
})
|
|
771
771
|
] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tbody", { children: [stats.rows.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [
|
|
772
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: row.key }),
|
|
772
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: row.label ?? row.key }),
|
|
773
773
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
774
774
|
className: "ad-num",
|
|
775
775
|
children: row.aggregate.requests
|
package/lib/index.js
CHANGED
|
@@ -288,7 +288,7 @@ const CHANNEL_PRESETS = {
|
|
|
288
288
|
displayName: "DeepSeek Official",
|
|
289
289
|
api: "openai-completions",
|
|
290
290
|
baseURL: "https://api.deepseek.com",
|
|
291
|
-
model: "deepseek-
|
|
291
|
+
model: "deepseek-flash",
|
|
292
292
|
...V41_FLASH_CAPS
|
|
293
293
|
}
|
|
294
294
|
};
|
|
@@ -1820,13 +1820,32 @@ function registerStatsRoutes(ctx, webServer, deps) {
|
|
|
1820
1820
|
const group = url.searchParams.get("group") ?? "channel";
|
|
1821
1821
|
const entries = await readLedgerRange(deps.ledgerDir(), from, to);
|
|
1822
1822
|
const rows = group === "day" ? summarize(entries, (entry) => dayKey(new Date(entry.at))) : summarize(entries, (entry) => entry.channel);
|
|
1823
|
+
/**
|
|
1824
|
+
* 🔴 Label each row with the channel's DISPLAY NAME, not its id.
|
|
1825
|
+
*
|
|
1826
|
+
* Owner report (2026-10-22): 「统计要按显示名称来」. The ledger keys rows by the channel
|
|
1827
|
+
* id because that is the channel's identity — it must not change when a user renames a
|
|
1828
|
+
* channel (decision 37: renaming touches `label`, never `id`). But the id is an
|
|
1829
|
+
* implementation handle, and showing it makes the table disagree with the list above it,
|
|
1830
|
+
* where the same channel appears under its display name.
|
|
1831
|
+
*
|
|
1832
|
+
* Resolution is done here, at read time, from the LIVE channel list — so a rename is
|
|
1833
|
+
* reflected immediately in historical rows too, with no ledger rewrite. A row whose
|
|
1834
|
+
* channel no longer exists keeps its raw id: that usage is real and must stay visible,
|
|
1835
|
+
* and inventing a name for a channel that is gone would be worse than the id.
|
|
1836
|
+
*/
|
|
1837
|
+
const labels = new Map(deps.channels().map((channel) => [channel.id, channel.label]));
|
|
1838
|
+
const named = rows.map((row) => ({
|
|
1839
|
+
...row,
|
|
1840
|
+
label: group === "day" ? row.key : labels.get(row.key) ?? row.key
|
|
1841
|
+
}));
|
|
1823
1842
|
json(res, 200, {
|
|
1824
1843
|
range: {
|
|
1825
1844
|
from: from?.toISOString() ?? null,
|
|
1826
1845
|
to: to?.toISOString() ?? null,
|
|
1827
1846
|
group
|
|
1828
1847
|
},
|
|
1829
|
-
rows,
|
|
1848
|
+
rows: named,
|
|
1830
1849
|
total: totalOf(rows),
|
|
1831
1850
|
note: "input is uncached input only; billable input = input + cacheRead + cacheWrite"
|
|
1832
1851
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-any-deepseek",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "One DeepSeek V4.1 Flash provider for DeepSeek Harness: paste a key per channel, switch channels manually, token usage booked per real upstream.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|