@brainervirus/opencode-commandcode 0.7.72 → 0.7.74

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.74] - 2026-09-22
11
+
12
+ ## [0.7.73] - 2026-09-21
13
+
10
14
  ## [0.7.72] - 2026-09-20
11
15
 
12
16
  ## [0.7.71] - 2026-09-19
package/_version.txt CHANGED
@@ -1 +1 @@
1
- 1.58.1
1
+ 1.62.0
package/manifest.json CHANGED
@@ -1,34 +1,27 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-09-20T12:00:52.504Z",
4
- "pluginVersion": "0.7.71",
5
- "commandCodeVersion": "1.58.1",
6
- "commandCodeTarball": "https://registry.npmjs.org/command-code/-/command-code-1.58.1.tgz",
7
- "modelCount": 78,
8
- "reasoningModelCount": 67,
3
+ "generatedAt": "2026-09-22T00:01:44.007Z",
4
+ "pluginVersion": "0.7.74",
5
+ "commandCodeVersion": "1.62.0",
6
+ "commandCodeTarball": "https://registry.npmjs.org/command-code/-/command-code-1.62.0.tgz",
7
+ "modelCount": 76,
8
+ "reasoningModelCount": 63,
9
9
  "extraction": {
10
10
  "modelCatalog": "ok",
11
11
  "costCatalog": "cli",
12
12
  "costCatalogError": null
13
13
  },
14
14
  "costSources": {
15
- "cli": 22,
16
- "officialDocs": 50,
15
+ "cli": 21,
16
+ "officialDocs": 55,
17
17
  "thirdParty": 0,
18
- "free": 6,
18
+ "free": 0,
19
19
  "fallback": 0,
20
20
  "unmatched": 0
21
21
  },
22
22
  "review": {
23
23
  "thirdParty": [],
24
- "free": [
25
- "inclusionai/ling-3.0-flash-free",
26
- "meituan/LongCat-2.0:free",
27
- "minimax/minimax-m2.7-free",
28
- "minimax/minimax-m3-free",
29
- "MiniMaxAI/MiniMax-M3-Free",
30
- "tencent/Hy3"
31
- ],
24
+ "free": [],
32
25
  "unmatched": []
33
26
  },
34
27
  "status": "healthy"
package/models.json CHANGED
@@ -401,41 +401,6 @@
401
401
  ]
402
402
  }
403
403
  },
404
- {
405
- "id": "gpt-6-astra",
406
- "name": "GPT-6 Astra",
407
- "tier": "premium",
408
- "reasoning": true,
409
- "reasoningEfforts": [
410
- "low",
411
- "medium",
412
- "high",
413
- "xhigh",
414
- "max"
415
- ],
416
- "tool_call": true,
417
- "cost": {
418
- "input": 10,
419
- "output": 50,
420
- "cache_read": 1,
421
- "cache_write": 12.5
422
- },
423
- "limit": {
424
- "context": 1050000,
425
- "output": 65536
426
- },
427
- "attachment": true,
428
- "modalities": {
429
- "input": [
430
- "text",
431
- "image",
432
- "pdf"
433
- ],
434
- "output": [
435
- "text"
436
- ]
437
- }
438
- },
439
404
  {
440
405
  "id": "deepseek/deepseek-v4-flash",
441
406
  "name": "DeepSeek V4 Flash (latest)",
@@ -1186,6 +1151,38 @@
1186
1151
  ]
1187
1152
  }
1188
1153
  },
1154
+ {
1155
+ "id": "xai/grok-4.7",
1156
+ "name": "Grok 4.7",
1157
+ "tier": "open-source",
1158
+ "reasoning": true,
1159
+ "reasoningEfforts": [
1160
+ "low",
1161
+ "medium",
1162
+ "high",
1163
+ "xhigh"
1164
+ ],
1165
+ "tool_call": true,
1166
+ "cost": {
1167
+ "input": 1.2,
1168
+ "output": 3.6,
1169
+ "cache_read": 0.3
1170
+ },
1171
+ "limit": {
1172
+ "context": 500000,
1173
+ "output": 65536
1174
+ },
1175
+ "attachment": true,
1176
+ "modalities": {
1177
+ "input": [
1178
+ "text",
1179
+ "image"
1180
+ ],
1181
+ "output": [
1182
+ "text"
1183
+ ]
1184
+ }
1185
+ },
1189
1186
  {
1190
1187
  "id": "thinkingmachines/inkling",
1191
1188
  "name": "Inkling",
@@ -1400,30 +1397,6 @@
1400
1397
  ]
1401
1398
  }
1402
1399
  },
1403
- {
1404
- "id": "inclusionai/ling-3.0-flash-free",
1405
- "name": "Ling 3.0 Flash",
1406
- "tier": "open-source",
1407
- "reasoning": true,
1408
- "tool_call": true,
1409
- "cost": {
1410
- "input": 0,
1411
- "output": 0
1412
- },
1413
- "limit": {
1414
- "context": 256000,
1415
- "output": 32768
1416
- },
1417
- "attachment": false,
1418
- "modalities": {
1419
- "input": [
1420
- "text"
1421
- ],
1422
- "output": [
1423
- "text"
1424
- ]
1425
- }
1426
- },
1427
1400
  {
1428
1401
  "id": "inclusionai/ling-3.0-flash-sante:free",
1429
1402
  "name": "Ling 3.0 Flash Sante",
@@ -1474,30 +1447,6 @@
1474
1447
  ]
1475
1448
  }
1476
1449
  },
1477
- {
1478
- "id": "meituan/LongCat-2.0:free",
1479
- "name": "LongCat 2.0 (Free)",
1480
- "tier": "open-source",
1481
- "reasoning": true,
1482
- "tool_call": true,
1483
- "cost": {
1484
- "input": 0,
1485
- "output": 0
1486
- },
1487
- "limit": {
1488
- "context": 1048576,
1489
- "output": 65536
1490
- },
1491
- "attachment": false,
1492
- "modalities": {
1493
- "input": [
1494
- "text"
1495
- ],
1496
- "output": [
1497
- "text"
1498
- ]
1499
- }
1500
- },
1501
1450
  {
1502
1451
  "id": "xiaomi/mimo-v2.5",
1503
1452
  "name": "MiMo V2.5",
@@ -1552,23 +1501,27 @@
1552
1501
  }
1553
1502
  },
1554
1503
  {
1555
- "id": "MiniMaxAI/MiniMax-M2.5",
1556
- "name": "MiniMax M2.5",
1504
+ "id": "xiaomi/mimo-v2.6-flash",
1505
+ "name": "MiMo V2.6 Flash",
1557
1506
  "tier": "open-source",
1558
1507
  "reasoning": false,
1559
1508
  "tool_call": true,
1560
1509
  "cost": {
1561
- "input": 0.5,
1562
- "output": 2
1510
+ "input": 0.14,
1511
+ "output": 0.28,
1512
+ "cache_read": 0.0028
1563
1513
  },
1564
1514
  "limit": {
1565
- "context": 200000,
1566
- "output": 131072
1515
+ "context": 1048576,
1516
+ "output": 65536
1567
1517
  },
1568
- "attachment": false,
1518
+ "attachment": true,
1569
1519
  "modalities": {
1570
1520
  "input": [
1571
- "text"
1521
+ "text",
1522
+ "image",
1523
+ "video",
1524
+ "audio"
1572
1525
  ],
1573
1526
  "output": [
1574
1527
  "text"
@@ -1576,24 +1529,27 @@
1576
1529
  }
1577
1530
  },
1578
1531
  {
1579
- "id": "MiniMaxAI/MiniMax-M2.7",
1580
- "name": "MiniMax M2.7",
1532
+ "id": "xiaomi/mimo-v2.6-pro",
1533
+ "name": "MiMo V2.6 Pro",
1581
1534
  "tier": "open-source",
1582
1535
  "reasoning": false,
1583
1536
  "tool_call": true,
1584
1537
  "cost": {
1585
- "input": 0.3,
1586
- "output": 1.2,
1587
- "cache_read": 0.06
1538
+ "input": 0.435,
1539
+ "output": 0.87,
1540
+ "cache_read": 0.0036
1588
1541
  },
1589
1542
  "limit": {
1590
- "context": 1000000,
1591
- "output": 131072
1543
+ "context": 1048576,
1544
+ "output": 65536
1592
1545
  },
1593
- "attachment": false,
1546
+ "attachment": true,
1594
1547
  "modalities": {
1595
1548
  "input": [
1596
- "text"
1549
+ "text",
1550
+ "image",
1551
+ "video",
1552
+ "audio"
1597
1553
  ],
1598
1554
  "output": [
1599
1555
  "text"
@@ -1601,23 +1557,27 @@
1601
1557
  }
1602
1558
  },
1603
1559
  {
1604
- "id": "minimax/minimax-m2.7-free",
1605
- "name": "MiniMax M2.7 (Free)",
1560
+ "id": "xiaomi/mimo-v2.6-pro-ultraspeed",
1561
+ "name": "MiMo V2.6 Pro UltraSpeed",
1606
1562
  "tier": "open-source",
1607
1563
  "reasoning": false,
1608
1564
  "tool_call": true,
1609
1565
  "cost": {
1610
- "input": 0,
1611
- "output": 0
1566
+ "input": 4.35,
1567
+ "output": 8.7,
1568
+ "cache_read": 0.036
1612
1569
  },
1613
1570
  "limit": {
1614
- "context": 197000,
1571
+ "context": 1048576,
1615
1572
  "output": 65536
1616
1573
  },
1617
- "attachment": false,
1574
+ "attachment": true,
1618
1575
  "modalities": {
1619
1576
  "input": [
1620
- "text"
1577
+ "text",
1578
+ "image",
1579
+ "video",
1580
+ "audio"
1621
1581
  ],
1622
1582
  "output": [
1623
1583
  "text"
@@ -1625,31 +1585,23 @@
1625
1585
  }
1626
1586
  },
1627
1587
  {
1628
- "id": "MiniMaxAI/MiniMax-M3",
1629
- "name": "MiniMax M3",
1588
+ "id": "MiniMaxAI/MiniMax-M2.5",
1589
+ "name": "MiniMax M2.5",
1630
1590
  "tier": "open-source",
1631
- "reasoning": true,
1632
- "reasoningEfforts": [
1633
- "low",
1634
- "medium",
1635
- "high"
1636
- ],
1591
+ "reasoning": false,
1637
1592
  "tool_call": true,
1638
1593
  "cost": {
1639
- "input": 0.3,
1640
- "output": 1.2,
1641
- "cache_read": 0.06
1594
+ "input": 0.5,
1595
+ "output": 2
1642
1596
  },
1643
1597
  "limit": {
1644
- "context": 1000000,
1645
- "output": 65536
1598
+ "context": 200000,
1599
+ "output": 131072
1646
1600
  },
1647
- "attachment": true,
1601
+ "attachment": false,
1648
1602
  "modalities": {
1649
1603
  "input": [
1650
- "text",
1651
- "image",
1652
- "video"
1604
+ "text"
1653
1605
  ],
1654
1606
  "output": [
1655
1607
  "text"
@@ -1657,30 +1609,24 @@
1657
1609
  }
1658
1610
  },
1659
1611
  {
1660
- "id": "minimax/minimax-m3-free",
1661
- "name": "MiniMax M3 (Free)",
1612
+ "id": "MiniMaxAI/MiniMax-M2.7",
1613
+ "name": "MiniMax M2.7",
1662
1614
  "tier": "open-source",
1663
- "reasoning": true,
1664
- "reasoningEfforts": [
1665
- "low",
1666
- "medium",
1667
- "high"
1668
- ],
1615
+ "reasoning": false,
1669
1616
  "tool_call": true,
1670
1617
  "cost": {
1671
- "input": 0,
1672
- "output": 0
1618
+ "input": 0.3,
1619
+ "output": 1.2,
1620
+ "cache_read": 0.06
1673
1621
  },
1674
1622
  "limit": {
1675
1623
  "context": 1000000,
1676
- "output": 65536
1624
+ "output": 131072
1677
1625
  },
1678
- "attachment": true,
1626
+ "attachment": false,
1679
1627
  "modalities": {
1680
1628
  "input": [
1681
- "text",
1682
- "image",
1683
- "video"
1629
+ "text"
1684
1630
  ],
1685
1631
  "output": [
1686
1632
  "text"
@@ -1688,8 +1634,8 @@
1688
1634
  }
1689
1635
  },
1690
1636
  {
1691
- "id": "MiniMaxAI/MiniMax-M3-Free",
1692
- "name": "MiniMax M3 Free",
1637
+ "id": "MiniMaxAI/MiniMax-M3",
1638
+ "name": "MiniMax M3",
1693
1639
  "tier": "open-source",
1694
1640
  "reasoning": true,
1695
1641
  "reasoningEfforts": [
@@ -1699,8 +1645,9 @@
1699
1645
  ],
1700
1646
  "tool_call": true,
1701
1647
  "cost": {
1702
- "input": 0,
1703
- "output": 0
1648
+ "input": 0.3,
1649
+ "output": 1.2,
1650
+ "cache_read": 0.06
1704
1651
  },
1705
1652
  "limit": {
1706
1653
  "context": 1000000,
@@ -2270,24 +2217,31 @@
2270
2217
  }
2271
2218
  },
2272
2219
  {
2273
- "id": "tencent/hy3-paid",
2274
- "name": "Tencent Hy3",
2220
+ "id": "stepfun/Step-5-Preview",
2221
+ "name": "Step 5 Preview",
2275
2222
  "tier": "open-source",
2276
2223
  "reasoning": true,
2224
+ "reasoningEfforts": [
2225
+ "low",
2226
+ "medium",
2227
+ "high"
2228
+ ],
2277
2229
  "tool_call": true,
2278
2230
  "cost": {
2279
- "input": 0.14,
2280
- "output": 0.58,
2281
- "cache_read": 0.035
2231
+ "input": 1,
2232
+ "output": 2.7,
2233
+ "cache_read": 0.05
2282
2234
  },
2283
2235
  "limit": {
2284
- "context": 262144,
2236
+ "context": 1000000,
2285
2237
  "output": 65536
2286
2238
  },
2287
- "attachment": false,
2239
+ "attachment": true,
2288
2240
  "modalities": {
2289
2241
  "input": [
2290
- "text"
2242
+ "text",
2243
+ "image",
2244
+ "video"
2291
2245
  ],
2292
2246
  "output": [
2293
2247
  "text"
@@ -2295,14 +2249,15 @@
2295
2249
  }
2296
2250
  },
2297
2251
  {
2298
- "id": "tencent/Hy3",
2299
- "name": "Tencent Hy3 (Free)",
2252
+ "id": "tencent/hy3-paid",
2253
+ "name": "Tencent Hy3",
2300
2254
  "tier": "open-source",
2301
2255
  "reasoning": true,
2302
2256
  "tool_call": true,
2303
2257
  "cost": {
2304
- "input": 0,
2305
- "output": 0
2258
+ "input": 0.14,
2259
+ "output": 0.58,
2260
+ "cache_read": 0.035
2306
2261
  },
2307
2262
  "limit": {
2308
2263
  "context": 262144,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/opencode-commandcode",
3
- "version": "0.7.72",
3
+ "version": "0.7.74",
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",
@@ -62,6 +62,7 @@
62
62
  "test:integration": "bun test tests/integration/",
63
63
  "test:all": "bun test",
64
64
  "typecheck": "tsc --noEmit",
65
+ "prepack": "bun run scripts/verify-manifest-version.ts",
65
66
  "verify:release-candidate": "bun run scripts/verify-release-candidate.ts",
66
67
  "generate-readme": "bun run scripts/generate-readme.ts",
67
68
  "sync": "bun run scripts/sync-models.ts",
package/src/catalog.ts CHANGED
@@ -781,7 +781,59 @@ export function generateOpencodeModels(entries: ModelEntry[]): Record<string, un
781
781
  return models;
782
782
  }
783
783
 
784
- // Keep import.meta.url resolution available for callers that need package-relative paths
784
+ export const MODELS_API_URL = "https://api.commandcode.ai/provider/v1/models";
785
+
786
+ export interface FilteredCatalog<T extends { id: string }> {
787
+ retained: T[];
788
+ unavailable: string[];
789
+ }
790
+
791
+ function isNonEmptyString(value: unknown): value is string {
792
+ return typeof value === "string" && value.length > 0;
793
+ }
794
+
795
+ /** Validate the OpenAI-style `{ object: "list", data: [{ id }] }` availability payload. */
796
+ export function parseAvailabilityIds(payload: unknown): string[] {
797
+ if (!payload || typeof payload !== "object" || Array.isArray(payload)) {
798
+ throw new Error("availability response must be an object");
799
+ }
800
+ const body = payload as Record<string, unknown>;
801
+ if (body["object"] !== "list") throw new Error('availability response object must be "list"');
802
+ const data = body["data"];
803
+ if (!Array.isArray(data) || data.length === 0) {
804
+ throw new Error("availability response data must be a non-empty array");
805
+ }
806
+ const ids: string[] = [];
807
+ const seen = new Set<string>();
808
+ for (const item of data) {
809
+ if (!item || typeof item !== "object" || Array.isArray(item)) {
810
+ throw new Error("availability response items must be objects with a non-empty string id");
811
+ }
812
+ const id = (item as Record<string, unknown>)["id"];
813
+ if (!isNonEmptyString(id)) {
814
+ throw new Error("availability response items must be objects with a non-empty string id");
815
+ }
816
+ if (seen.has(id)) throw new Error(`duplicate availability id: ${id}`);
817
+ seen.add(id);
818
+ ids.push(id);
819
+ }
820
+ return ids;
821
+ }
822
+
823
+ /** Retain only candidates whose exact ID is callable; collect sorted excluded IDs. */
824
+ export function filterCatalogByAvailability<T extends { id: string }>(
825
+ candidates: T[],
826
+ availableIds: string[],
827
+ ): FilteredCatalog<T> {
828
+ const available = new Set(availableIds);
829
+ const retained = candidates.filter((entry) => available.has(entry.id));
830
+ const unavailable = candidates
831
+ .filter((entry) => !available.has(entry.id))
832
+ .map((entry) => entry.id)
833
+ .sort();
834
+ return { retained, unavailable };
835
+ }
836
+
785
837
  export function catalogModuleDir(): string {
786
838
  return dirname(fileURLToPath(import.meta.url));
787
839
  }
package/src/manifest.ts CHANGED
@@ -12,10 +12,16 @@ export type CostSources = {
12
12
  unmatched: number;
13
13
  };
14
14
 
15
+ export type UnavailableEntry = {
16
+ id: string;
17
+ reason: "not-listed-by-provider-api";
18
+ };
19
+
15
20
  export type CatalogReview = {
16
21
  thirdParty: string[];
17
22
  free: string[];
18
23
  unmatched: string[];
24
+ unavailable?: UnavailableEntry[];
19
25
  };
20
26
 
21
27
  export type CatalogManifest = {
@@ -49,6 +55,25 @@ export type BuildManifestInput = {
49
55
  costCatalogError?: string | null;
50
56
  };
51
57
 
58
+ export function withUnavailableIds(
59
+ review: CatalogReview | undefined,
60
+ unavailable: string[],
61
+ ): CatalogReview | undefined {
62
+ const entries: UnavailableEntry[] = [...unavailable]
63
+ .sort()
64
+ .map((id) => ({ id, reason: "not-listed-by-provider-api" as const }));
65
+ if (entries.length === 0) return review;
66
+ return { ...(review ?? { thirdParty: [], free: [], unmatched: [] }), unavailable: entries };
67
+ }
68
+
69
+ /** Update only the embedded plugin version; reject a missing target version. */
70
+ export function withPluginVersion(manifest: CatalogManifest, version: string): CatalogManifest {
71
+ if (!version || typeof version !== "string" || version.trim().length === 0) {
72
+ throw new Error("target plugin version must be a non-empty string");
73
+ }
74
+ return { ...manifest, pluginVersion: version };
75
+ }
76
+
52
77
  export function bumpPatch(version: string): string {
53
78
  const parts = version.split(".");
54
79
  const patch = Number(parts[2] ?? "0");