opencode-aicodewith-auth 0.1.14 → 0.1.15

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.ai.md CHANGED
@@ -185,8 +185,8 @@ If the output is NOT `https://registry.npmjs.org/` (e.g., shows taobao, cnpm, or
185
185
  > 你现在可以使用以下模型:
186
186
  > - `gpt-5.2-codex`
187
187
  > - `gpt-5.2`
188
- > - `claude-sonnet-4-5`
189
- > - `claude-opus-4-5`
188
+ > - `claude-sonnet-4-5-20250929
189
+ > - `claude-opus-4-5-20251101
190
190
  > - `gemini-3-pro`
191
191
  >
192
192
  > 测试命令: `opencode --model gpt-5.2-codex`"
@@ -197,8 +197,8 @@ If the output is NOT `https://registry.npmjs.org/` (e.g., shows taobao, cnpm, or
197
197
  > 你现在可以使用以下模型:
198
198
  > - `gpt-5.2-codex`
199
199
  > - `gpt-5.2`
200
- > - `claude-sonnet-4-5`
201
- > - `claude-opus-4-5`
200
+ > - `claude-sonnet-4-5-20250929
201
+ > - `claude-opus-4-5-20251101
202
202
  > - `gemini-3-pro`
203
203
  >
204
204
  > 测试命令: `opencode --model gpt-5.2-codex`
package/README.md CHANGED
@@ -63,8 +63,8 @@ User Request → OpenCode → Plugin Auth Hook → Route by Model:
63
63
  |---------|---------|:-------:|---------|
64
64
  | `aicodewith/gpt-5.2-codex` | GPT-5.2 Codex | ✅ | 日常编程、代码生成 |
65
65
  | `aicodewith/gpt-5.2` | GPT-5.2 | ✅ | 架构设计、逻辑推理 |
66
- | `aicodewith/claude-sonnet-4-5` | Claude Sonnet 4.5 | ✅ | 代码审查、文档查询 |
67
- | `aicodewith/claude-opus-4-5` | Claude Opus 4.5 | ✅ | 复杂任务、深度思考 |
66
+ | `aicodewith/claude-sonnet-4-5-20250929 | Claude Sonnet 4.5 | ✅ | 代码审查、文档查询 |
67
+ | `aicodewith/claude-opus-4-5-20251101 | Claude Opus 4.5 | ✅ | 复杂任务、深度思考 |
68
68
  | `aicodewith/gemini-3-pro` | Gemini 3 Pro | ✅ | 前端 UI、多模态任务 |
69
69
 
70
70
  ---
package/dist/index.js CHANGED
@@ -1500,11 +1500,11 @@ var provider_config_default = {
1500
1500
  name: "GPT-5.2",
1501
1501
  modalities: { input: ["text", "image"], output: ["text"] }
1502
1502
  },
1503
- "claude-sonnet-4-5": {
1503
+ "claude-sonnet-4-5-20250929": {
1504
1504
  name: "Claude Sonnet 4.5",
1505
1505
  modalities: { input: ["text", "image"], output: ["text"] }
1506
1506
  },
1507
- "claude-opus-4-5": {
1507
+ "claude-opus-4-5-20251101": {
1508
1508
  name: "Claude Opus 4.5",
1509
1509
  modalities: { input: ["text", "image"], output: ["text"] }
1510
1510
  },
@@ -1582,39 +1582,6 @@ var buildStandardProviderConfig = () => ({
1582
1582
  ...provider_config_default,
1583
1583
  npm: PROVIDER_NPM
1584
1584
  });
1585
- var MODEL_ID_MIGRATIONS = {
1586
- "claude-sonnet-4-5-20250929": "claude-sonnet-4-5",
1587
- "claude-opus-4-5-20251101": "claude-opus-4-5",
1588
- "gemini-3-pro-high": "gemini-3-pro"
1589
- };
1590
- var migrateModelId = (modelId) => {
1591
- if (typeof modelId !== "string")
1592
- return modelId;
1593
- const withoutProvider = modelId.replace(/^aicodewith\//, "");
1594
- const migrated = MODEL_ID_MIGRATIONS[withoutProvider];
1595
- if (!migrated)
1596
- return modelId;
1597
- return modelId.startsWith("aicodewith/") ? `aicodewith/${migrated}` : migrated;
1598
- };
1599
- var migrateModelIdsInConfig = (obj) => {
1600
- if (!obj || typeof obj !== "object")
1601
- return false;
1602
- let changed = false;
1603
- for (const key in obj) {
1604
- if (key === "model" && typeof obj[key] === "string") {
1605
- const migrated = migrateModelId(obj[key]);
1606
- if (migrated !== obj[key]) {
1607
- obj[key] = migrated;
1608
- changed = true;
1609
- }
1610
- } else if (typeof obj[key] === "object") {
1611
- if (migrateModelIdsInConfig(obj[key])) {
1612
- changed = true;
1613
- }
1614
- }
1615
- }
1616
- return changed;
1617
- };
1618
1585
  var applyProviderConfig = (config) => {
1619
1586
  let changed = false;
1620
1587
  const providerMap = config.provider && typeof config.provider === "object" ? config.provider : {};
@@ -1630,9 +1597,6 @@ var applyProviderConfig = (config) => {
1630
1597
  config.plugin = nextPlugins;
1631
1598
  changed = true;
1632
1599
  }
1633
- if (migrateModelIdsInConfig(config)) {
1634
- changed = true;
1635
- }
1636
1600
  return changed;
1637
1601
  };
1638
1602
  var ensureConfigFile = async () => {
@@ -1656,16 +1620,6 @@ var ensureConfigFile = async () => {
1656
1620
  if (!config || typeof config !== "object")
1657
1621
  return;
1658
1622
  const changed = applyProviderConfig(config);
1659
- const omoPath = path4.join(configDir, "oh-my-opencode.json");
1660
- if (await fileExists(omoPath)) {
1661
- const omoConfig = await readJsonOrJsonc(omoPath);
1662
- if (omoConfig && typeof omoConfig === "object") {
1663
- if (migrateModelIdsInConfig(omoConfig)) {
1664
- await writeFile2(omoPath, `${JSON.stringify(omoConfig, null, 2)}
1665
- `, "utf-8");
1666
- }
1667
- }
1668
- }
1669
1623
  if (!changed)
1670
1624
  return;
1671
1625
  await mkdir2(configDir, { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-aicodewith-auth",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "OpenCode plugin for AICodewith authentication - Access GPT-5.2, Claude, and Gemini models through AICodewith API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",