@brainervirus/opencode-commandcode 0.7.72 → 0.7.73
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 +2 -0
- package/manifest.json +38 -15
- package/models.json +0 -193
- package/package.json +2 -1
- package/src/catalog.ts +53 -1
- package/src/manifest.ts +25 -0
package/CHANGELOG.md
CHANGED
package/manifest.json
CHANGED
|
@@ -1,35 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-09-
|
|
4
|
-
"pluginVersion": "0.7.
|
|
3
|
+
"generatedAt": "2026-09-20T16:38:04.091Z",
|
|
4
|
+
"pluginVersion": "0.7.73",
|
|
5
5
|
"commandCodeVersion": "1.58.1",
|
|
6
6
|
"commandCodeTarball": "https://registry.npmjs.org/command-code/-/command-code-1.58.1.tgz",
|
|
7
|
-
"modelCount":
|
|
8
|
-
"reasoningModelCount":
|
|
7
|
+
"modelCount": 71,
|
|
8
|
+
"reasoningModelCount": 61,
|
|
9
9
|
"extraction": {
|
|
10
10
|
"modelCatalog": "ok",
|
|
11
11
|
"costCatalog": "cli",
|
|
12
12
|
"costCatalogError": null
|
|
13
13
|
},
|
|
14
14
|
"costSources": {
|
|
15
|
-
"cli":
|
|
15
|
+
"cli": 21,
|
|
16
16
|
"officialDocs": 50,
|
|
17
17
|
"thirdParty": 0,
|
|
18
|
-
"free":
|
|
18
|
+
"free": 0,
|
|
19
19
|
"fallback": 0,
|
|
20
20
|
"unmatched": 0
|
|
21
21
|
},
|
|
22
22
|
"review": {
|
|
23
23
|
"thirdParty": [],
|
|
24
|
-
"free": [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
"free": [],
|
|
25
|
+
"unmatched": [],
|
|
26
|
+
"unavailable": [
|
|
27
|
+
{
|
|
28
|
+
"id": "MiniMaxAI/MiniMax-M3-Free",
|
|
29
|
+
"reason": "not-listed-by-provider-api"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "gpt-6-astra",
|
|
33
|
+
"reason": "not-listed-by-provider-api"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "inclusionai/ling-3.0-flash-free",
|
|
37
|
+
"reason": "not-listed-by-provider-api"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "meituan/LongCat-2.0:free",
|
|
41
|
+
"reason": "not-listed-by-provider-api"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "minimax/minimax-m2.7-free",
|
|
45
|
+
"reason": "not-listed-by-provider-api"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "minimax/minimax-m3-free",
|
|
49
|
+
"reason": "not-listed-by-provider-api"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "tencent/Hy3",
|
|
53
|
+
"reason": "not-listed-by-provider-api"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
33
56
|
},
|
|
34
57
|
"status": "healthy"
|
|
35
58
|
}
|
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)",
|
|
@@ -1400,30 +1365,6 @@
|
|
|
1400
1365
|
]
|
|
1401
1366
|
}
|
|
1402
1367
|
},
|
|
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
1368
|
{
|
|
1428
1369
|
"id": "inclusionai/ling-3.0-flash-sante:free",
|
|
1429
1370
|
"name": "Ling 3.0 Flash Sante",
|
|
@@ -1474,30 +1415,6 @@
|
|
|
1474
1415
|
]
|
|
1475
1416
|
}
|
|
1476
1417
|
},
|
|
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
1418
|
{
|
|
1502
1419
|
"id": "xiaomi/mimo-v2.5",
|
|
1503
1420
|
"name": "MiMo V2.5",
|
|
@@ -1600,30 +1517,6 @@
|
|
|
1600
1517
|
]
|
|
1601
1518
|
}
|
|
1602
1519
|
},
|
|
1603
|
-
{
|
|
1604
|
-
"id": "minimax/minimax-m2.7-free",
|
|
1605
|
-
"name": "MiniMax M2.7 (Free)",
|
|
1606
|
-
"tier": "open-source",
|
|
1607
|
-
"reasoning": false,
|
|
1608
|
-
"tool_call": true,
|
|
1609
|
-
"cost": {
|
|
1610
|
-
"input": 0,
|
|
1611
|
-
"output": 0
|
|
1612
|
-
},
|
|
1613
|
-
"limit": {
|
|
1614
|
-
"context": 197000,
|
|
1615
|
-
"output": 65536
|
|
1616
|
-
},
|
|
1617
|
-
"attachment": false,
|
|
1618
|
-
"modalities": {
|
|
1619
|
-
"input": [
|
|
1620
|
-
"text"
|
|
1621
|
-
],
|
|
1622
|
-
"output": [
|
|
1623
|
-
"text"
|
|
1624
|
-
]
|
|
1625
|
-
}
|
|
1626
|
-
},
|
|
1627
1520
|
{
|
|
1628
1521
|
"id": "MiniMaxAI/MiniMax-M3",
|
|
1629
1522
|
"name": "MiniMax M3",
|
|
@@ -1656,68 +1549,6 @@
|
|
|
1656
1549
|
]
|
|
1657
1550
|
}
|
|
1658
1551
|
},
|
|
1659
|
-
{
|
|
1660
|
-
"id": "minimax/minimax-m3-free",
|
|
1661
|
-
"name": "MiniMax M3 (Free)",
|
|
1662
|
-
"tier": "open-source",
|
|
1663
|
-
"reasoning": true,
|
|
1664
|
-
"reasoningEfforts": [
|
|
1665
|
-
"low",
|
|
1666
|
-
"medium",
|
|
1667
|
-
"high"
|
|
1668
|
-
],
|
|
1669
|
-
"tool_call": true,
|
|
1670
|
-
"cost": {
|
|
1671
|
-
"input": 0,
|
|
1672
|
-
"output": 0
|
|
1673
|
-
},
|
|
1674
|
-
"limit": {
|
|
1675
|
-
"context": 1000000,
|
|
1676
|
-
"output": 65536
|
|
1677
|
-
},
|
|
1678
|
-
"attachment": true,
|
|
1679
|
-
"modalities": {
|
|
1680
|
-
"input": [
|
|
1681
|
-
"text",
|
|
1682
|
-
"image",
|
|
1683
|
-
"video"
|
|
1684
|
-
],
|
|
1685
|
-
"output": [
|
|
1686
|
-
"text"
|
|
1687
|
-
]
|
|
1688
|
-
}
|
|
1689
|
-
},
|
|
1690
|
-
{
|
|
1691
|
-
"id": "MiniMaxAI/MiniMax-M3-Free",
|
|
1692
|
-
"name": "MiniMax M3 Free",
|
|
1693
|
-
"tier": "open-source",
|
|
1694
|
-
"reasoning": true,
|
|
1695
|
-
"reasoningEfforts": [
|
|
1696
|
-
"low",
|
|
1697
|
-
"medium",
|
|
1698
|
-
"high"
|
|
1699
|
-
],
|
|
1700
|
-
"tool_call": true,
|
|
1701
|
-
"cost": {
|
|
1702
|
-
"input": 0,
|
|
1703
|
-
"output": 0
|
|
1704
|
-
},
|
|
1705
|
-
"limit": {
|
|
1706
|
-
"context": 1000000,
|
|
1707
|
-
"output": 65536
|
|
1708
|
-
},
|
|
1709
|
-
"attachment": true,
|
|
1710
|
-
"modalities": {
|
|
1711
|
-
"input": [
|
|
1712
|
-
"text",
|
|
1713
|
-
"image",
|
|
1714
|
-
"video"
|
|
1715
|
-
],
|
|
1716
|
-
"output": [
|
|
1717
|
-
"text"
|
|
1718
|
-
]
|
|
1719
|
-
}
|
|
1720
|
-
},
|
|
1721
1552
|
{
|
|
1722
1553
|
"id": "meta/muse-spark-1.1",
|
|
1723
1554
|
"name": "Muse Spark 1.1",
|
|
@@ -2294,30 +2125,6 @@
|
|
|
2294
2125
|
]
|
|
2295
2126
|
}
|
|
2296
2127
|
},
|
|
2297
|
-
{
|
|
2298
|
-
"id": "tencent/Hy3",
|
|
2299
|
-
"name": "Tencent Hy3 (Free)",
|
|
2300
|
-
"tier": "open-source",
|
|
2301
|
-
"reasoning": true,
|
|
2302
|
-
"tool_call": true,
|
|
2303
|
-
"cost": {
|
|
2304
|
-
"input": 0,
|
|
2305
|
-
"output": 0
|
|
2306
|
-
},
|
|
2307
|
-
"limit": {
|
|
2308
|
-
"context": 262144,
|
|
2309
|
-
"output": 65536
|
|
2310
|
-
},
|
|
2311
|
-
"attachment": false,
|
|
2312
|
-
"modalities": {
|
|
2313
|
-
"input": [
|
|
2314
|
-
"text"
|
|
2315
|
-
],
|
|
2316
|
-
"output": [
|
|
2317
|
-
"text"
|
|
2318
|
-
]
|
|
2319
|
-
}
|
|
2320
|
-
},
|
|
2321
2128
|
{
|
|
2322
2129
|
"id": "tencent/hy4-preview",
|
|
2323
2130
|
"name": "Tencent Hy4 Preview",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/opencode-commandcode",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.73",
|
|
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
|
-
|
|
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");
|