@brainervirus/opencode-commandcode 0.7.45 → 0.7.47

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 CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.7.47] - 2026-09-02
11
+
12
+ ## [0.7.46] - 2026-09-02
13
+
10
14
  ## [0.7.45] - 2026-09-02
11
15
 
12
16
  ## [0.7.44] - 2026-09-02
package/manifest.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "generatedAt": "2026-09-02T12:41:12.672Z",
4
- "pluginVersion": "0.7.44",
4
+ "pluginVersion": "0.7.46",
5
5
  "commandCodeVersion": "1.40.1",
6
6
  "commandCodeTarball": "https://registry.npmjs.org/command-code/-/command-code-1.40.1.tgz",
7
7
  "modelCount": 67,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/opencode-commandcode",
3
- "version": "0.7.45",
3
+ "version": "0.7.47",
4
4
  "description": "Command Code API provider for opencode — use Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM, MiniMax, and Step models via Command Code",
5
5
  "keywords": [
6
6
  "ai",
@@ -73,6 +73,7 @@
73
73
  "@semantic-release/github": "12.0.9",
74
74
  "@semantic-release/npm": "13.1.5",
75
75
  "@semantic-release/release-notes-generator": "14.1.1",
76
+ "@types/bun": "1.4.0",
76
77
  "@types/node": "^25.9.1",
77
78
  "ai": "6.0.191",
78
79
  "oxfmt": "0.63.0",
package/src/catalog.ts CHANGED
@@ -396,16 +396,20 @@ export function extractModelCatalog(
396
396
  }
397
397
  if (candidates.length === 0) throw new Error("Could not locate model catalog object");
398
398
 
399
+ let lastError: unknown = null;
399
400
  for (const raw of candidates) {
400
401
  try {
401
402
  const value = evaluateWithContext(normalizeForEval(raw), ctx);
402
403
  if (isModelCatalog(value)) return value;
403
- } catch {
404
- // try next span
404
+ } catch (err) {
405
+ // keep the first real failure (e.g. "$R is not defined") — it names the
406
+ // missing binding; later candidates usually fail on the same cause
407
+ lastError ??= err;
405
408
  }
406
409
  }
407
410
 
408
- throw new Error("Could not evaluate model catalog");
411
+ const detail = lastError instanceof Error ? `: ${lastError.message}` : "";
412
+ throw new Error(`Could not evaluate model catalog${detail}`);
409
413
  }
410
414
 
411
415
  function isCostMap(value: unknown): value is Record<string, CostEntry[]> {