@openclaw/deepseek-provider 2026.9.6 → 2026.9.8

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/assets/icon.png CHANGED
Binary file
@@ -49,16 +49,6 @@ const ZERO_COST = {
49
49
  cacheRead: 0,
50
50
  cacheWrite: 0
51
51
  };
52
- /**
53
- * Build a lookup from the bundled DeepSeek model catalog so we can hydrate
54
- * missing metadata (contextWindow, cost, maxTokens) into user-configured
55
- * model rows without overwriting explicit overrides.
56
- */
57
- function buildCatalogIndex() {
58
- const index = /* @__PURE__ */ new Map();
59
- for (const model of DEEPSEEK_MODEL_CATALOG) index.set(model.id, model);
60
- return index;
61
- }
62
52
  function isPositiveNumber(value) {
63
53
  return typeof value === "number" && Number.isFinite(value) && value > 0;
64
54
  }
@@ -89,32 +79,19 @@ function isPreviousBundledMetadataSnapshot(raw, previous) {
89
79
  function normalizeConfig(params) {
90
80
  const { providerConfig } = params;
91
81
  if (!Array.isArray(providerConfig.models) || providerConfig.models.length === 0) return providerConfig;
92
- const catalog = buildCatalogIndex();
82
+ const catalog = new Map(DEEPSEEK_MODEL_CATALOG.map((model) => [model.id, model]));
93
83
  let mutated = false;
94
84
  const nextModels = providerConfig.models.map((model) => {
95
- const raw = model;
96
- const catalogEntry = catalog.get(raw.id);
85
+ const catalogEntry = catalog.get(model.id);
97
86
  if (!catalogEntry) return model;
98
- const previousEntry = PREVIOUS_BUNDLED_METADATA[raw.id];
99
- const hasPreviousBundledMetadata = isPreviousBundledMetadataSnapshot(raw, previousEntry);
100
- let modelMutated = false;
87
+ const hasPreviousBundledMetadata = isPreviousBundledMetadataSnapshot(model, PREVIOUS_BUNDLED_METADATA[model.id]);
101
88
  const patched = {};
102
- if ((!isPositiveNumber(raw.contextWindow) || hasPreviousBundledMetadata && raw.contextWindow !== catalogEntry.contextWindow) && isPositiveNumber(catalogEntry.contextWindow)) {
103
- patched.contextWindow = catalogEntry.contextWindow;
104
- modelMutated = true;
105
- }
106
- if ((!isPositiveNumber(raw.maxTokens) || hasPreviousBundledMetadata && raw.maxTokens !== catalogEntry.maxTokens) && isPositiveNumber(catalogEntry.maxTokens)) {
107
- patched.maxTokens = catalogEntry.maxTokens;
108
- modelMutated = true;
109
- }
110
- if ((!hasCostValues(raw.cost) || hasPreviousBundledMetadata) && hasCostValues(catalogEntry.cost) && !hasSameCost(raw.cost, catalogEntry.cost)) {
111
- patched.cost = catalogEntry.cost;
112
- modelMutated = true;
113
- }
114
- if (!modelMutated) return model;
89
+ for (const key of ["contextWindow", "maxTokens"]) if ((!isPositiveNumber(model[key]) || hasPreviousBundledMetadata && model[key] !== catalogEntry[key]) && isPositiveNumber(catalogEntry[key])) patched[key] = catalogEntry[key];
90
+ if ((!hasCostValues(model.cost) || hasPreviousBundledMetadata) && hasCostValues(catalogEntry.cost) && !hasSameCost(model.cost, catalogEntry.cost)) patched.cost = catalogEntry.cost;
91
+ if (Object.keys(patched).length === 0) return model;
115
92
  mutated = true;
116
93
  return {
117
- ...raw,
94
+ ...model,
118
95
  ...patched
119
96
  };
120
97
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/deepseek-provider",
3
- "version": "2026.9.6",
3
+ "version": "2026.9.8",
4
4
  "description": "OpenClaw DeepSeek provider plugin.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,10 +18,10 @@
18
18
  "minHostVersion": ">=2026.6.8"
19
19
  },
20
20
  "compat": {
21
- "pluginApi": ">=2026.9.6"
21
+ "pluginApi": ">=2026.9.8"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.9.6",
24
+ "openclawVersion": "2026.9.8",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -40,7 +40,7 @@
40
40
  "assets/activity.svg"
41
41
  ],
42
42
  "peerDependencies": {
43
- "openclaw": ">=2026.9.6"
43
+ "openclaw": ">=2026.9.8"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "openclaw": {