@brainervirus/opencode-commandcode 0.10.1 → 0.10.3
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 +4 -0
- package/README.md +6 -6
- package/_version.txt +1 -1
- package/dist/plugin.js +2 -2
- package/manifest.json +4 -4
- package/models.json +19 -3
- package/package.json +1 -1
- package/src/catalog.ts +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ This package is based on **[FanFan4204/opencode-commandcode-provider](https://gi
|
|
|
25
25
|
- Vision vs text-only comes from the Command Code CLI catalog (`inputModalities` on every SKU). [models.dev](https://models.dev) only adds extra inputs (video/audio/pdf) when it matches.
|
|
26
26
|
- Reasoning effort **variants** on models that declare `reasoningEfforts`.
|
|
27
27
|
- Release date, family, input limits, model status, vendor context limits, and matched context-price tiers flow through the bundled catalog. V2 gets native release, family, input, status, and tier fields; V1 keeps its supported fields and base prices, with `context_over_200k` where representable.
|
|
28
|
-
- The provider's `supported_endpoints` metadata chooses each model's API route. Responses
|
|
28
|
+
- The provider's `supported_endpoints` metadata chooses each model's API route. Messages is preferred when advertised; otherwise Chat Completions is preferred, and Responses is used only when it is the sole advertised route. This avoids the malformed Responses function-call start event observed on DeepSeek V4.1 Flash `#max` in OpenCode V2.0.18: `response.output_item.added` contained a `function_call` item without its required `arguments` string. That exact tool-call flow now passes through Chat Completions on V1 and V2. Responses mappings remain available for response-only models, but the current catalog has none. Claude Sonnet 4.6 returned `MODEL_NOT_IN_PLAN` with the message “available in Pro and above plans or extra on-demand usage”; entitled Claude access has not been live-verified. If a model fails on an account entitled to use it, please [open an issue](https://github.com/BrainerVirus/opencode-commandcode/issues) with the model ID and OpenCode version, or submit a PR with a reproducible fix.
|
|
29
29
|
- Quiet OpenCode startup (diagnostics go to `startup.json`, not stdout).
|
|
30
30
|
|
|
31
31
|
## How it works
|
|
@@ -33,7 +33,7 @@ This package is based on **[FanFan4204/opencode-commandcode-provider](https://gi
|
|
|
33
33
|
For published plugin versions, the six-hour CI schedule extracts the latest `command-code` npm bundle and refreshes callable models plus endpoint metadata, even when the CLI version is unchanged. It opens a catalog PR only when generated artifacts change; at startup the plugin loads those artifacts and registers them with OpenCode — never the other way around.
|
|
34
34
|
|
|
35
35
|
- **Extract + filter** — model entries (ids, names, reasoning, `inputModalities`, limits) are evaluated out of the minified CLI bundle (`src/catalog.ts`), then intersected with the callable IDs reported by the provider API.
|
|
36
|
-
- **Metadata + costs merge** — vendor context length tightens only a fallback context limit, while `supported_endpoints` selects Chat Completions,
|
|
36
|
+
- **Metadata + costs merge** — vendor context length tightens only a fallback context limit, while `supported_endpoints` selects Messages, Chat Completions, or Responses per model in that preference order; missing endpoint metadata preserves the last known route data. models.dev contributes release date, family, input limit, status, modalities, and cost tiers when present. Tier rows are accepted only when their base prices match this Command Code catalog. Base costs use CLI bundle → official Command Code docs → free SKUs (`$0`) → [models.dev](https://models.dev) reference prices → unmatched placeholder. Anything still unmatched marks the catalog `degraded`. This runs at sync time only; runtime never fetches metadata or prices.
|
|
37
37
|
- **Artifacts** — `models.json` (the catalog), `_version.txt` (upstream version), `manifest.json` (counts, per-source cost stats, `healthy`/`degraded`/`broken` status).
|
|
38
38
|
- **Version-specific registration** — V1 uses the `plugin` config key, `server()` provider map, and V1 auth callback. V2 uses `plugins`, provider/model transforms, and a `commandcode` integration with key and `COMMANDCODE_API_KEY` environment methods. Both retain the Command Code wire model ID. V2 exposes tiered context pricing; V1 emits its supported `context_over_200k` field and keeps flat pricing for other tiers.
|
|
39
39
|
- **Degraded/cache fallbacks** — a `degraded`/`broken` manifest sets the degraded flag with a reason; an unreadable bundled `models.json` falls back to the last-good cache; auth/connect still registers even with an empty catalog.
|
|
@@ -46,7 +46,7 @@ OpenCode V2:
|
|
|
46
46
|
|
|
47
47
|
```json
|
|
48
48
|
{
|
|
49
|
-
"plugins": ["@brainervirus/opencode-commandcode
|
|
49
|
+
"plugins": ["@brainervirus/opencode-commandcode"]
|
|
50
50
|
}
|
|
51
51
|
```
|
|
52
52
|
|
|
@@ -54,11 +54,11 @@ OpenCode V1:
|
|
|
54
54
|
|
|
55
55
|
```json
|
|
56
56
|
{
|
|
57
|
-
"plugin": ["@brainervirus/opencode-commandcode
|
|
57
|
+
"plugin": ["@brainervirus/opencode-commandcode"]
|
|
58
58
|
}
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
The bare package name is unpinned and resolves npm's `latest` release when OpenCode installs or updates it; adding `@latest` is unnecessary. OpenCode V2 checks for updates at startup but keeps an existing cached package. Apply a newer package with OpenCode's plugin-update action, then restart to load it. OpenCode V1 can refresh the global package with `opencode plugin @brainervirus/opencode-commandcode --global --force`.
|
|
62
62
|
|
|
63
63
|
`file://` checkouts are **not** updated by npm; `git pull` after CI commits, or switch to the npm plugin line.
|
|
64
64
|
|
|
@@ -76,7 +76,7 @@ Set `COMMANDCODE_API_KEY`, or connect interactively. OpenCode V1 provides **Comm
|
|
|
76
76
|
/models
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
Catalog patches
|
|
79
|
+
Catalog patches ship in new npm releases. OpenCode loads the version in its package cache; an update must be applied through the host before the new catalog appears. If a new model is missing after an announced sync, check the installed package version, apply the update, and restart OpenCode.
|
|
80
80
|
|
|
81
81
|
## Plugin config file
|
|
82
82
|
|
package/_version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.69.0
|
package/dist/plugin.js
CHANGED
|
@@ -20118,12 +20118,12 @@ function modelApi(entry) {
|
|
|
20118
20118
|
const path = (endpoint.split(/[?#]/, 1)[0] ?? "").replace(/\/+$/, "");
|
|
20119
20119
|
return path === route || path.endsWith(`/${route}`);
|
|
20120
20120
|
}) ?? false;
|
|
20121
|
-
if (supports("responses"))
|
|
20122
|
-
return "responses";
|
|
20123
20121
|
if (supports("messages"))
|
|
20124
20122
|
return "messages";
|
|
20125
20123
|
if (supports("chat/completions"))
|
|
20126
20124
|
return "chat";
|
|
20125
|
+
if (supports("responses"))
|
|
20126
|
+
return "responses";
|
|
20127
20127
|
return usesAnthropicMessagesApi(entry.id) ? "messages" : "chat";
|
|
20128
20128
|
}
|
|
20129
20129
|
function generateOpencodeModels(entries) {
|
package/manifest.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-09-
|
|
4
|
-
"pluginVersion": "0.10.
|
|
5
|
-
"commandCodeVersion": "1.
|
|
6
|
-
"commandCodeTarball": "https://registry.npmjs.org/command-code/-/command-code-1.
|
|
3
|
+
"generatedAt": "2026-09-29T06:01:06.703Z",
|
|
4
|
+
"pluginVersion": "0.10.3",
|
|
5
|
+
"commandCodeVersion": "1.69.0",
|
|
6
|
+
"commandCodeTarball": "https://registry.npmjs.org/command-code/-/command-code-1.69.0.tgz",
|
|
7
7
|
"modelCount": 84,
|
|
8
8
|
"reasoningModelCount": 71,
|
|
9
9
|
"extraction": {
|
package/models.json
CHANGED
|
@@ -1854,9 +1854,25 @@
|
|
|
1854
1854
|
],
|
|
1855
1855
|
"tool_call": true,
|
|
1856
1856
|
"cost": {
|
|
1857
|
-
"input":
|
|
1858
|
-
"output":
|
|
1859
|
-
"cache_read": 0.
|
|
1857
|
+
"input": 2,
|
|
1858
|
+
"output": 6,
|
|
1859
|
+
"cache_read": 0.5,
|
|
1860
|
+
"tiers": [
|
|
1861
|
+
{
|
|
1862
|
+
"input": 4,
|
|
1863
|
+
"output": 12,
|
|
1864
|
+
"cache_read": 1,
|
|
1865
|
+
"tier": {
|
|
1866
|
+
"type": "context",
|
|
1867
|
+
"size": 200000
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
],
|
|
1871
|
+
"context_over_200k": {
|
|
1872
|
+
"input": 4,
|
|
1873
|
+
"output": 12,
|
|
1874
|
+
"cache_read": 1
|
|
1875
|
+
}
|
|
1860
1876
|
},
|
|
1861
1877
|
"limit": {
|
|
1862
1878
|
"context": 500000,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/opencode-commandcode",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
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",
|
package/src/catalog.ts
CHANGED
|
@@ -797,9 +797,9 @@ export function modelApi(entry: Pick<ModelEntry, "id" | "supported_endpoints">):
|
|
|
797
797
|
return path === route || path.endsWith(`/${route}`);
|
|
798
798
|
}) ?? false;
|
|
799
799
|
|
|
800
|
-
if (supports("responses")) return "responses";
|
|
801
800
|
if (supports("messages")) return "messages";
|
|
802
801
|
if (supports("chat/completions")) return "chat";
|
|
802
|
+
if (supports("responses")) return "responses";
|
|
803
803
|
return usesAnthropicMessagesApi(entry.id) ? "messages" : "chat";
|
|
804
804
|
}
|
|
805
805
|
|