opencode-cmd-provider 1.2.0 → 1.2.2

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
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.2 - 2026-08-22
4
+
5
+ Chore: catalog refresh to `command-code@1.32.1`.
6
+
7
+ - Added `deepseek/deepseek-v4-flash-vision-exp` (DeepSeek V4 Flash Vision (exp)):
8
+ 1M context, text+image input, reasoning efforts `high`/`max`, $0.22/$0.66 per
9
+ 1M input/output tokens.
10
+ - Added reasoning efforts for `stealth/ox-alpha` (`low`, `high`, `max`).
11
+ - Deals catalog unchanged (56 entries).
12
+
13
+ ## 1.2.1 - 2026-08-21
14
+
15
+ Fix: `/connect` no longer lists Command Code — the plugin failed to load.
16
+
17
+ - The `cmd_plan_summary` tool runtime-imported `@opencode-ai/plugin`, an
18
+ optional peer dependency that `opencode plugin <pkg>` installs in
19
+ `.opencode/`, not next to the plugin. That import threw `ERR_MODULE_NOT_FOUND`
20
+ at load, silently killing the whole server plugin — no auto-registration and
21
+ no `/connect` entry (Command Code vanished from the provider list).
22
+ - The tool now builds its Zod args from a direct `zod` dependency instead of
23
+ `@opencode-ai/plugin`'s `tool()` helper, so the server bundle has zero
24
+ runtime imports of optional peers.
25
+ - Added a contract test that scans the built `dist/` and fails on any runtime
26
+ `@opencode-ai/*` import, so this class of regression can't ship again.
27
+
3
28
  ## 1.2.0 - 2026-08-21
4
29
 
5
30
  Feature: Deals intelligence — per-model pricing/allowance data in a sidebar panel and a plan-summary tool, delivered zero-step.
@@ -1,7 +1,7 @@
1
- export declare const FACTS_SOURCE_URL = "https://unpkg.com/command-code@1.31.0/dist/bundled/command-code-knowledge/reference/models.md";
2
- export declare const MODALITIES_SOURCE_URL = "https://unpkg.com/command-code@1.31.0/dist/cli.mjs";
3
- export declare const FACTS_PACKAGE_VERSION = "1.31.0";
4
- export declare const FACTS_LAST_REFRESHED = "2026-08-21";
1
+ export declare const FACTS_SOURCE_URL = "https://unpkg.com/command-code@1.32.1/dist/bundled/command-code-knowledge/reference/models.md";
2
+ export declare const MODALITIES_SOURCE_URL = "https://unpkg.com/command-code@1.32.1/dist/cli.mjs";
3
+ export declare const FACTS_PACKAGE_VERSION = "1.32.1";
4
+ export declare const FACTS_LAST_REFRESHED = "2026-08-22";
5
5
  export declare const MODEL_EFFORTS: Readonly<Record<string, readonly string[]>>;
6
6
  export declare const MODEL_COSTS: Readonly<Record<string, {
7
7
  input: number;
@@ -4,17 +4,19 @@
4
4
  // command-code npm package's bundled model catalog (models.md), plus input
5
5
  // modalities parsed from its CLI bundle (dist/cli.mjs). Regenerate
6
6
  // with `npm run refresh:snapshot`.
7
- export const FACTS_SOURCE_URL = "https://unpkg.com/command-code@1.31.0/dist/bundled/command-code-knowledge/reference/models.md";
8
- export const MODALITIES_SOURCE_URL = "https://unpkg.com/command-code@1.31.0/dist/cli.mjs";
9
- export const FACTS_PACKAGE_VERSION = "1.31.0";
10
- export const FACTS_LAST_REFRESHED = "2026-08-21";
7
+ export const FACTS_SOURCE_URL = "https://unpkg.com/command-code@1.32.1/dist/bundled/command-code-knowledge/reference/models.md";
8
+ export const MODALITIES_SOURCE_URL = "https://unpkg.com/command-code@1.32.1/dist/cli.mjs";
9
+ export const FACTS_PACKAGE_VERSION = "1.32.1";
10
+ export const FACTS_LAST_REFRESHED = "2026-08-22";
11
11
  export const MODEL_EFFORTS = {
12
12
  "deepseek/deepseek-v4-pro": ["high", "max"],
13
13
  "deepseek/deepseek-v4-flash": ["high", "max"],
14
+ "deepseek/deepseek-v4-flash-vision-exp": ["high", "max"],
14
15
  "zai-org/GLM-5.3": ["low", "high", "max"],
15
16
  "zai-org/GLM-5.2": ["high", "max"],
16
17
  "Qwen/Qwen3.8-Max": ["low", "medium", "xhigh"],
17
18
  "Qwen/Qwen3.8-27B": ["low", "medium", "xhigh"],
19
+ "stealth/ox-alpha": ["low", "high", "max"],
18
20
  "claude-sonnet-5": ["low", "medium", "high", "xhigh", "max"],
19
21
  "claude-sonnet-4-6": ["low", "medium", "high", "xhigh", "max"],
20
22
  "claude-fable-5": ["low", "medium", "high", "xhigh", "max"],
@@ -40,6 +42,7 @@ export const MODEL_EFFORTS = {
40
42
  export const MODEL_COSTS = {
41
43
  "deepseek/deepseek-v4-pro": { input: 0.66, output: 1.98, cacheRead: 0.022, cacheWrite: 0 },
42
44
  "deepseek/deepseek-v4-flash": { input: 0.22, output: 0.66, cacheRead: 0.007, cacheWrite: 0 },
45
+ "deepseek/deepseek-v4-flash-vision-exp": { input: 0.22, output: 0.66, cacheRead: 0.01, cacheWrite: 0 },
43
46
  "moonshotai/Kimi-K3": { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 0 },
44
47
  "moonshotai/Kimi-K2.7-Code": { input: 0.95, output: 4, cacheRead: 0.19, cacheWrite: 0 },
45
48
  "moonshotai/Kimi-K2.7-Code-Highspeed": { input: 1.9, output: 8, cacheRead: 0.38, cacheWrite: 0 },
@@ -110,6 +113,7 @@ export const MODEL_INPUT_MODALITIES = {
110
113
  "claude-opus-5": ["text", "image"],
111
114
  "claude-sonnet-4-6": ["text", "image"],
112
115
  "claude-sonnet-5": ["text", "image"],
116
+ "deepseek/deepseek-v4-flash-vision-exp": ["text", "image"],
113
117
  "google/gemini-3.1-flash-lite": ["text", "image"],
114
118
  "google/gemini-3.5-flash": ["text", "image"],
115
119
  "google/gemini-3.5-flash-lite": ["text", "image"],
@@ -20,6 +20,7 @@ export const MODEL_SNAPSHOT = [
20
20
  { id: "gpt-5.4-mini", name: "GPT-5.4 Mini", contextLength: 400000 },
21
21
  { id: "deepseek/deepseek-v4-pro", name: "DeepSeek V4 Pro (latest)", contextLength: 1000000 },
22
22
  { id: "deepseek/deepseek-v4-flash", name: "DeepSeek V4 Flash (latest)", contextLength: 1000000 },
23
+ { id: "deepseek/deepseek-v4-flash-vision-exp", name: "DeepSeek V4 Flash Vision (exp)", contextLength: 1000000 },
23
24
  { id: "moonshotai/Kimi-K3", name: "Kimi K3", contextLength: 1000000 },
24
25
  { id: "moonshotai/Kimi-K2.7-Code", name: "Kimi K2.7 Code", contextLength: 256000 },
25
26
  { id: "moonshotai/Kimi-K2.7-Code-Highspeed", name: "Kimi K2.7 Code HighSpeed", contextLength: 262000 },
@@ -51,5 +51,5 @@ export interface ModelDeals {
51
51
  export declare const MODEL_DEALS: Readonly<Record<string, ModelDeals>>;
52
52
  export declare const PLAN_CATALOG: Readonly<Record<PlanId, PlanInfo>>;
53
53
  export declare const DEAL_SOURCE_URL = "https://commandcode.ai/docs/resources/pricing-limits";
54
- export declare const DEAL_LAST_REFRESHED = "2026-08-21";
54
+ export declare const DEAL_LAST_REFRESHED = "2026-08-22";
55
55
  export declare const DEAL_PACKAGE_VERSION = "docs";
@@ -72,5 +72,5 @@ export const PLAN_CATALOG = {
72
72
  provider: { price: 15, credits: 0, window5h: 0, windowWeek: 0, display: "Provider" },
73
73
  };
74
74
  export const DEAL_SOURCE_URL = "https://commandcode.ai/docs/resources/pricing-limits";
75
- export const DEAL_LAST_REFRESHED = "2026-08-21";
75
+ export const DEAL_LAST_REFRESHED = "2026-08-22";
76
76
  export const DEAL_PACKAGE_VERSION = "docs";
@@ -1,3 +1,4 @@
1
+ import { z } from "zod";
1
2
  import { type ModelDeals, type PlanId, type PlanInfo } from "./catalog.js";
2
3
  export declare function normalizePlan(value: unknown): PlanId | undefined;
3
4
  export declare function resolvePlan(planArg: string | undefined, env?: NodeJS.ProcessEnv): Promise<PlanId>;
@@ -5,9 +6,9 @@ export declare function renderPlanSummary(plan: PlanId, deals?: Readonly<Record<
5
6
  export declare function planSummaryTool(): {
6
7
  description: string;
7
8
  args: {
8
- plan: import("zod").ZodOptional<import("zod").ZodString>;
9
+ plan: z.ZodOptional<z.ZodString>;
9
10
  };
10
- execute(args: {
11
- plan?: string | undefined;
12
- }, context: import("@opencode-ai/plugin").ToolContext): Promise<import("@opencode-ai/plugin").ToolResult>;
11
+ execute: (args: {
12
+ plan?: string;
13
+ }) => Promise<string>;
13
14
  };
@@ -2,7 +2,7 @@
2
2
  // breakdown. Plan resolution: tool arg → COMMANDCODE_PLAN → live /alpha/whoami
3
3
  // (when a key is present and the network works) → default "go". Rendering is a
4
4
  // pure function so tests never touch the network.
5
- import { tool } from "@opencode-ai/plugin";
5
+ import { z } from "zod";
6
6
  import { MODEL_COSTS } from "../catalog/facts.js";
7
7
  import { MODEL_DEALS, PLAN_CATALOG, } from "./catalog.js";
8
8
  import { getApiBase } from "../env.js";
@@ -150,11 +150,11 @@ function estimateMonthlyRequests(modelId, allowance) {
150
150
  return Math.floor(allowance / perRequest + 1e-9);
151
151
  }
152
152
  export function planSummaryTool() {
153
- return tool({
153
+ return {
154
154
  description: "Show the Command Code plan's credits, usage windows, per-model monthly allowances (GOAT/Pro) or active deals (other plans), with estimated monthly request counts. Set COMMANDCODE_PLAN (go|goat|pro|max|max20|teampro|provider) to pin the plan without network access.",
155
155
  args: {
156
- plan: tool.schema.string().optional().describe("go|goat|pro|max|max20|teampro|provider"),
156
+ plan: z.string().optional().describe("go|goat|pro|max|max20|teampro|provider"),
157
157
  },
158
158
  execute: async (args) => renderPlanSummary(await resolvePlan(args.plan)),
159
- });
159
+ };
160
160
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-cmd-provider",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Command Code provider + plugin for opencode",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -46,7 +46,8 @@
46
46
  "@ai-sdk/provider": "^4.0.7",
47
47
  "@opentui/core": "^0.5.4",
48
48
  "@opentui/solid": "^0.5.4",
49
- "solid-js": "1.9.12"
49
+ "solid-js": "1.9.12",
50
+ "zod": "^4.1.8"
50
51
  },
51
52
  "devDependencies": {
52
53
  "@opencode-ai/plugin": "*",