my-opencode 1.3.3 → 1.3.4

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/README.md CHANGED
@@ -85,9 +85,12 @@ npx my-opencode help # 顯示說明
85
85
  | Profile | Primary / heavy | Small / verifier |
86
86
  |---------|------------------|------------------|
87
87
  | `opencode` | `opencode-go/deepseek-v4-pro` | `opencode-go/deepseek-v4-flash` |
88
- | `openai` | `openai/gpt-5.4` | `openai/gpt-5.4-mini` |
88
+ | `openai` | `openai/gpt-5.6` | `openai/gpt-5.6-luna` |
89
89
  | `google` | `google/gemini-3.1-pro-preview-customtools` | `google/gemini-3.5-flash` |
90
- | `copilot` | `copilot/gpt-5.4` | `copilot/gpt-5.4-mini` |
90
+ | `copilot` | `github-copilot/gpt-5.6-sol` | `github-copilot/gpt-5.6-luna` |
91
+
92
+ > 💡 `openai` 與 `copilot` profile 的 `gpt-5.6-luna`(verifier / 小型任務)支援 reasoning effort 切換:
93
+ > **high / medium / low** 三檔(預設 `low`)。在 opencode 內用 `variant_cycle` 快捷鍵循環切換。
91
94
 
92
95
  ```bash
93
96
  # 預設 profile(opencode)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-opencode",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "高品質 opencode 開發流程 skill 與 agents 集合 — Contract-First 開發流程、ADR、PR Review、測試生成、文件生成",
5
5
  "keywords": [
6
6
  "opencode",
@@ -26,7 +26,8 @@
26
26
  "url": "git+https://github.com/jjyung/my-opencode.git"
27
27
  },
28
28
  "scripts": {
29
- "postinstall": "node scripts/postinstall.js"
29
+ "postinstall": "node scripts/postinstall.js",
30
+ "test": "node --test"
30
31
  },
31
32
  "bin": {
32
33
  "my-opencode": "bin/cli.js",
package/plugins/README.md CHANGED
@@ -16,9 +16,12 @@ opencode plugin 是透過 `opencode.json` 的 `plugin` 區塊註冊的 npm 或
16
16
  | Profile | Primary / heavy | Small / verifier |
17
17
  |---------|------------------|------------------|
18
18
  | `opencode` | `opencode-go/deepseek-v4-pro` | `opencode-go/deepseek-v4-flash` |
19
- | `openai` | `openai/gpt-5.4` | `openai/gpt-5.4-mini` |
19
+ | `openai` | `openai/gpt-5.6` | `openai/gpt-5.6-luna` |
20
20
  | `google` | `google/gemini-3.1-pro-preview-customtools` | `google/gemini-3.5-flash` |
21
- | `copilot` | `copilot/gpt-5.4` | `copilot/gpt-5.4-mini` |
21
+ | `copilot` | `github-copilot/gpt-5.6-sol` | `github-copilot/gpt-5.6-luna` |
22
+
23
+ > 💡 `openai` 與 `copilot` profile 的 `gpt-5.6-luna` 支援 reasoning effort 切換(high / medium / low,預設 `low`),
24
+ > 在 opencode 內用 `variant_cycle` 快捷鍵循環切換。
22
25
 
23
26
  ### 用法
24
27
 
@@ -13,9 +13,15 @@ const PROFILE_MAP = Object.freeze({
13
13
  heavy_model: "opencode-go/deepseek-v4-pro",
14
14
  }),
15
15
  openai: Object.freeze({
16
- model: "openai/gpt-5.4",
17
- small_model: "openai/gpt-5.4-mini",
18
- heavy_model: "openai/gpt-5.4",
16
+ model: "openai/gpt-5.6",
17
+ small_model: "openai/gpt-5.6-luna",
18
+ heavy_model: "openai/gpt-5.6",
19
+ reasoning: Object.freeze({
20
+ "openai/gpt-5.6-luna": Object.freeze({
21
+ default_effort: "low",
22
+ efforts: ["high", "medium", "low"],
23
+ }),
24
+ }),
19
25
  }),
20
26
  google: Object.freeze({
21
27
  model: "google/gemini-3.1-pro-preview-customtools",
@@ -23,9 +29,15 @@ const PROFILE_MAP = Object.freeze({
23
29
  heavy_model: "google/gemini-3.1-pro-preview-customtools",
24
30
  }),
25
31
  copilot: Object.freeze({
26
- model: "copilot/gpt-5.4",
27
- small_model: "copilot/gpt-5.4-mini",
28
- heavy_model: "copilot/gpt-5.4",
32
+ model: "github-copilot/gpt-5.6-sol",
33
+ small_model: "github-copilot/gpt-5.6-luna",
34
+ heavy_model: "github-copilot/gpt-5.6-sol",
35
+ reasoning: Object.freeze({
36
+ "github-copilot/gpt-5.6-luna": Object.freeze({
37
+ default_effort: "low",
38
+ efforts: ["high", "medium", "low"],
39
+ }),
40
+ }),
29
41
  }),
30
42
  });
31
43
 
@@ -73,17 +85,60 @@ export default function resolveProfile(options = {}) {
73
85
  }
74
86
 
75
87
  export function buildProfileConfig(options = {}) {
88
+ const activeProfile = pickProfile(options);
89
+ const profile = PROFILE_MAP[activeProfile];
76
90
  const resolved = resolveProfile(options);
91
+ const provider = buildProviderOverrides(profile);
77
92
 
78
93
  return {
79
94
  model: resolved.model,
80
95
  small_model: resolved.small_model,
96
+ ...(Object.keys(provider).length > 0 ? { provider } : {}),
81
97
  agent: Object.fromEntries(
82
98
  ALL_OVERRIDDEN_AGENTS.map((name) => [name, { model: resolved.agent_overrides[name] }]),
83
99
  ),
84
100
  };
85
101
  }
86
102
 
103
+ /**
104
+ * Build the `provider` config fragment for models that need reasoning-effort
105
+ * variants (e.g. gpt-5.6-luna with high/medium/low effort switching).
106
+ *
107
+ * Output shape (merged into opencode config via OPENCODE_CONFIG_CONTENT):
108
+ * provider.openai.models["gpt-5.6-luna"] = {
109
+ * options: { reasoningEffort: <default_effort> },
110
+ * variants: { high: { reasoningEffort: "high" }, ... },
111
+ * }
112
+ */
113
+ function buildProviderOverrides(profile) {
114
+ if (!profile.reasoning) return {};
115
+
116
+ const provider = {};
117
+ for (const [modelRef, cfg] of Object.entries(profile.reasoning)) {
118
+ const [providerId, ...rest] = modelRef.split("/");
119
+ const modelId = rest.join("/");
120
+ if (!providerId || !modelId) continue;
121
+
122
+ const variants = {};
123
+ for (const effort of cfg.efforts) {
124
+ variants[effort] = { reasoningEffort: effort };
125
+ }
126
+
127
+ const modelConfig = { variants };
128
+ if (cfg.default_effort) {
129
+ modelConfig.options = { reasoningEffort: cfg.default_effort };
130
+ }
131
+
132
+ provider[providerId] = {
133
+ models: {
134
+ [modelId]: modelConfig,
135
+ },
136
+ };
137
+ }
138
+
139
+ return provider;
140
+ }
141
+
87
142
  function isProviderProfilePlugin(entry) {
88
143
  return typeof entry === "string" && entry.replaceAll("\\", "/").endsWith("provider-profile.mjs");
89
144
  }