@brainervirus/opencode-commandcode 0.10.3 → 0.10.5
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 +2 -2
- package/_version.txt +1 -1
- package/dist/plugin.js +7 -6
- package/manifest.json +7 -7
- package/models.json +96 -0
- package/package.json +1 -1
- package/plugin.ts +7 -7
- package/src/v2models.ts +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ For published plugin versions, the six-hour CI schedule extracts the latest `com
|
|
|
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
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
|
-
- **Version-specific registration** — V1 uses the `plugin` config key, `server()` provider map, and
|
|
38
|
+
- **Version-specific registration** — V1 uses the `plugin` config key, direct AI SDK packages, the `server()` provider map, and its auth callback. V2 uses `plugins`, OpenCode's native provider runtimes, 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.
|
|
40
40
|
|
|
41
41
|
## Quick Start
|
|
@@ -64,7 +64,7 @@ The bare package name is unpinned and resolves npm's `latest` release when OpenC
|
|
|
64
64
|
|
|
65
65
|
### 2. No provider block needed
|
|
66
66
|
|
|
67
|
-
On OpenCode V2 the plugin registers the `commandcode` provider, its models, and its API base URL through the V2 provider API. On V1 the `server` hook fills `provider.commandcode` defaults — `npm: "@ai-sdk/openai-compatible"` plus the Provider API `baseURL`; the plugin package itself is never the SDK `npm` field. Only add a manual provider entry if you need non-default transport options.
|
|
67
|
+
On OpenCode V2 the plugin registers the `commandcode` provider, its models, the native OpenCode runtime, and its API base URL through the V2 provider API. On V1 the `server` hook fills `provider.commandcode` defaults — `npm: "@ai-sdk/openai-compatible"` plus the Provider API `baseURL`; the plugin package itself is never the SDK `npm` field. Only add a manual provider entry if you need non-default transport options.
|
|
68
68
|
|
|
69
69
|
### 3. Connect
|
|
70
70
|
|
package/_version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.72.1
|
package/dist/plugin.js
CHANGED
|
@@ -20273,9 +20273,9 @@ function toV2Model(entry) {
|
|
|
20273
20273
|
};
|
|
20274
20274
|
const api2 = modelApi(entry);
|
|
20275
20275
|
if (api2 === "responses")
|
|
20276
|
-
model.package = "
|
|
20276
|
+
model.package = "@opencode/ai/providers/openai/responses";
|
|
20277
20277
|
else if (api2 === "messages")
|
|
20278
|
-
model.package = "
|
|
20278
|
+
model.package = "@opencode/ai/providers/anthropic";
|
|
20279
20279
|
return model;
|
|
20280
20280
|
}
|
|
20281
20281
|
function generateV2Models(entries) {
|
|
@@ -20316,7 +20316,8 @@ var catalogPaths = () => {
|
|
|
20316
20316
|
|
|
20317
20317
|
// plugin.ts
|
|
20318
20318
|
var { models: MODELS_PATH, manifest: MANIFEST_PATH, version: VERSION_PATH } = catalogPaths();
|
|
20319
|
-
var
|
|
20319
|
+
var V1_PROVIDER_SDK_NPM = "@ai-sdk/openai-compatible";
|
|
20320
|
+
var V2_PROVIDER_PACKAGE = "@opencode/ai/providers/openai-compatible";
|
|
20320
20321
|
var PROVIDER_API_BASE_URL = "https://api.commandcode.ai/provider/v1";
|
|
20321
20322
|
function loadPluginConfig(deps = liveEnv) {
|
|
20322
20323
|
const dir = join4(deps.homedir(), ".config", "opencode");
|
|
@@ -20487,12 +20488,12 @@ async function server() {
|
|
|
20487
20488
|
const pluginCfg = loadPluginConfig();
|
|
20488
20489
|
const debug = pluginCfg.debugStartupLogs === true;
|
|
20489
20490
|
if (!cc.npm)
|
|
20490
|
-
cc.npm =
|
|
20491
|
+
cc.npm = V1_PROVIDER_SDK_NPM;
|
|
20491
20492
|
if (!cc.name)
|
|
20492
20493
|
cc.name = "Command Code";
|
|
20493
20494
|
if (!cc.env)
|
|
20494
20495
|
cc.env = ["COMMANDCODE_API_KEY"];
|
|
20495
|
-
if (cc.npm ===
|
|
20496
|
+
if (cc.npm === V1_PROVIDER_SDK_NPM) {
|
|
20496
20497
|
if (cc.options === undefined)
|
|
20497
20498
|
cc.options = {};
|
|
20498
20499
|
if (typeof cc.options === "object" && cc.options !== null) {
|
|
@@ -20555,7 +20556,7 @@ async function setup(ctx) {
|
|
|
20555
20556
|
activation: "auto",
|
|
20556
20557
|
integrationID: "commandcode",
|
|
20557
20558
|
env: ["COMMANDCODE_API_KEY"],
|
|
20558
|
-
package:
|
|
20559
|
+
package: V2_PROVIDER_PACKAGE,
|
|
20559
20560
|
settings: {
|
|
20560
20561
|
baseURL: PROVIDER_API_BASE_URL
|
|
20561
20562
|
}
|
package/manifest.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
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.
|
|
7
|
-
"modelCount":
|
|
8
|
-
"reasoningModelCount":
|
|
3
|
+
"generatedAt": "2026-09-30T00:01:38.169Z",
|
|
4
|
+
"pluginVersion": "0.10.5",
|
|
5
|
+
"commandCodeVersion": "1.72.1",
|
|
6
|
+
"commandCodeTarball": "https://registry.npmjs.org/command-code/-/command-code-1.72.1.tgz",
|
|
7
|
+
"modelCount": 86,
|
|
8
|
+
"reasoningModelCount": 73,
|
|
9
9
|
"extraction": {
|
|
10
10
|
"modelCatalog": "ok",
|
|
11
11
|
"costCatalog": "cli",
|
|
12
12
|
"costCatalogError": null
|
|
13
13
|
},
|
|
14
14
|
"costSources": {
|
|
15
|
-
"cli":
|
|
15
|
+
"cli": 31,
|
|
16
16
|
"officialDocs": 55,
|
|
17
17
|
"thirdParty": 0,
|
|
18
18
|
"free": 0,
|
package/models.json
CHANGED
|
@@ -813,6 +813,66 @@
|
|
|
813
813
|
"/responses"
|
|
814
814
|
]
|
|
815
815
|
},
|
|
816
|
+
{
|
|
817
|
+
"id": "gpt-6.1-sol",
|
|
818
|
+
"name": "GPT-6.1 Sol",
|
|
819
|
+
"tier": "premium",
|
|
820
|
+
"reasoning": true,
|
|
821
|
+
"reasoningEfforts": [
|
|
822
|
+
"low",
|
|
823
|
+
"medium",
|
|
824
|
+
"high",
|
|
825
|
+
"xhigh",
|
|
826
|
+
"max"
|
|
827
|
+
],
|
|
828
|
+
"tool_call": true,
|
|
829
|
+
"cost": {
|
|
830
|
+
"input": 2,
|
|
831
|
+
"output": 10,
|
|
832
|
+
"cache_read": 0.1,
|
|
833
|
+
"cache_write": 2.5,
|
|
834
|
+
"tiers": [
|
|
835
|
+
{
|
|
836
|
+
"input": 4,
|
|
837
|
+
"output": 15,
|
|
838
|
+
"cache_read": 0.2,
|
|
839
|
+
"cache_write": 5,
|
|
840
|
+
"tier": {
|
|
841
|
+
"type": "context",
|
|
842
|
+
"size": 272000
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
],
|
|
846
|
+
"context_over_200k": {
|
|
847
|
+
"input": 4,
|
|
848
|
+
"output": 15,
|
|
849
|
+
"cache_read": 0.2,
|
|
850
|
+
"cache_write": 5
|
|
851
|
+
}
|
|
852
|
+
},
|
|
853
|
+
"limit": {
|
|
854
|
+
"context": 1050000,
|
|
855
|
+
"output": 65536,
|
|
856
|
+
"input": 922000
|
|
857
|
+
},
|
|
858
|
+
"attachment": true,
|
|
859
|
+
"modalities": {
|
|
860
|
+
"input": [
|
|
861
|
+
"text",
|
|
862
|
+
"image",
|
|
863
|
+
"pdf"
|
|
864
|
+
],
|
|
865
|
+
"output": [
|
|
866
|
+
"text"
|
|
867
|
+
]
|
|
868
|
+
},
|
|
869
|
+
"family": "gpt-sol",
|
|
870
|
+
"release_date": "2026-09-29",
|
|
871
|
+
"supported_endpoints": [
|
|
872
|
+
"/chat/completions",
|
|
873
|
+
"/responses"
|
|
874
|
+
]
|
|
875
|
+
},
|
|
816
876
|
{
|
|
817
877
|
"id": "deepseek/deepseek-v4-flash",
|
|
818
878
|
"name": "DeepSeek V4 Flash (latest)",
|
|
@@ -1019,6 +1079,8 @@
|
|
|
1019
1079
|
"text"
|
|
1020
1080
|
]
|
|
1021
1081
|
},
|
|
1082
|
+
"family": "deepseek-flash",
|
|
1083
|
+
"release_date": "2026-09-10",
|
|
1022
1084
|
"supported_endpoints": [
|
|
1023
1085
|
"/chat/completions",
|
|
1024
1086
|
"/responses"
|
|
@@ -2189,6 +2251,40 @@
|
|
|
2189
2251
|
"/chat/completions"
|
|
2190
2252
|
]
|
|
2191
2253
|
},
|
|
2254
|
+
{
|
|
2255
|
+
"id": "inclusionai/ling-3.1-flash:free",
|
|
2256
|
+
"name": "Ling 3.1 Flash",
|
|
2257
|
+
"tier": "open-source",
|
|
2258
|
+
"reasoning": true,
|
|
2259
|
+
"reasoningEfforts": [
|
|
2260
|
+
"low",
|
|
2261
|
+
"medium",
|
|
2262
|
+
"high"
|
|
2263
|
+
],
|
|
2264
|
+
"tool_call": true,
|
|
2265
|
+
"cost": {
|
|
2266
|
+
"input": 0,
|
|
2267
|
+
"output": 0
|
|
2268
|
+
},
|
|
2269
|
+
"limit": {
|
|
2270
|
+
"context": 262144,
|
|
2271
|
+
"output": 32768
|
|
2272
|
+
},
|
|
2273
|
+
"attachment": false,
|
|
2274
|
+
"modalities": {
|
|
2275
|
+
"input": [
|
|
2276
|
+
"text"
|
|
2277
|
+
],
|
|
2278
|
+
"output": [
|
|
2279
|
+
"text"
|
|
2280
|
+
]
|
|
2281
|
+
},
|
|
2282
|
+
"family": "ling",
|
|
2283
|
+
"release_date": "2026-09-29",
|
|
2284
|
+
"supported_endpoints": [
|
|
2285
|
+
"/chat/completions"
|
|
2286
|
+
]
|
|
2287
|
+
},
|
|
2192
2288
|
{
|
|
2193
2289
|
"id": "meituan/LongCat-2.0",
|
|
2194
2290
|
"name": "LongCat 2.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/opencode-commandcode",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.5",
|
|
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/plugin.ts
CHANGED
|
@@ -16,10 +16,10 @@ import { ManifestSchema, ModelEntrySchema, PluginFileConfigSchema } from "./src/
|
|
|
16
16
|
|
|
17
17
|
const { models: MODELS_PATH, manifest: MANIFEST_PATH, version: VERSION_PATH } = catalogPaths();
|
|
18
18
|
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
const
|
|
19
|
+
// V1 loads the AI SDK package directly. V2 uses OpenCode's native runtime so provider
|
|
20
|
+
// settings such as baseURL survive registry materialization.
|
|
21
|
+
const V1_PROVIDER_SDK_NPM = "@ai-sdk/openai-compatible";
|
|
22
|
+
const V2_PROVIDER_PACKAGE = "@opencode/ai/providers/openai-compatible";
|
|
23
23
|
const PROVIDER_API_BASE_URL = "https://api.commandcode.ai/provider/v1";
|
|
24
24
|
|
|
25
25
|
type PluginFileConfig = z.infer<typeof PluginFileConfigSchema>;
|
|
@@ -239,13 +239,13 @@ export async function server() {
|
|
|
239
239
|
const pluginCfg = loadPluginConfig();
|
|
240
240
|
const debug = pluginCfg.debugStartupLogs === true;
|
|
241
241
|
|
|
242
|
-
if (!cc.npm) cc.npm =
|
|
242
|
+
if (!cc.npm) cc.npm = V1_PROVIDER_SDK_NPM;
|
|
243
243
|
if (!cc.name) cc.name = "Command Code";
|
|
244
244
|
if (!cc.env) cc.env = ["COMMANDCODE_API_KEY"];
|
|
245
245
|
// V1 resolves `npm` through BunProc.install and calls the first `create*` export, so
|
|
246
246
|
// the SDK package must be the OpenAI-compatible one; give it the Provider API URL
|
|
247
247
|
// unless the user already configured another baseURL (custom npm stays untouched).
|
|
248
|
-
if (cc.npm ===
|
|
248
|
+
if (cc.npm === V1_PROVIDER_SDK_NPM) {
|
|
249
249
|
if (cc.options === undefined) cc.options = {};
|
|
250
250
|
if (typeof cc.options === "object" && cc.options !== null) {
|
|
251
251
|
const options = cc.options as Record<string, unknown>;
|
|
@@ -307,7 +307,7 @@ async function setup(ctx: any): Promise<void> {
|
|
|
307
307
|
activation: "auto",
|
|
308
308
|
integrationID: "commandcode",
|
|
309
309
|
env: ["COMMANDCODE_API_KEY"],
|
|
310
|
-
package:
|
|
310
|
+
package: V2_PROVIDER_PACKAGE,
|
|
311
311
|
settings: {
|
|
312
312
|
baseURL: PROVIDER_API_BASE_URL,
|
|
313
313
|
},
|
package/src/v2models.ts
CHANGED
|
@@ -92,8 +92,8 @@ export function toV2Model(entry: ModelEntry): V2Model {
|
|
|
92
92
|
},
|
|
93
93
|
};
|
|
94
94
|
const api = modelApi(entry);
|
|
95
|
-
if (api === "responses") model.package = "
|
|
96
|
-
else if (api === "messages") model.package = "
|
|
95
|
+
if (api === "responses") model.package = "@opencode/ai/providers/openai/responses";
|
|
96
|
+
else if (api === "messages") model.package = "@opencode/ai/providers/anthropic";
|
|
97
97
|
return model;
|
|
98
98
|
}
|
|
99
99
|
|