opencode-aicodewith-auth 0.1.14 → 0.1.16
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 +4 -4
- package/README.md +2 -2
- package/dist/index.js +3 -48
- package/package.json +1 -1
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
|
|
67
|
-
| `aicodewith/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
|
@@ -854,6 +854,7 @@ async function transformRequestBody(body, codexInstructions) {
|
|
|
854
854
|
});
|
|
855
855
|
body.model = normalizedModel;
|
|
856
856
|
body.stream = true;
|
|
857
|
+
body.store = false;
|
|
857
858
|
body.instructions = codexInstructions;
|
|
858
859
|
if (body.input && Array.isArray(body.input)) {
|
|
859
860
|
const originalIds = body.input.filter((item) => item.id).map((item) => item.id);
|
|
@@ -1500,11 +1501,11 @@ var provider_config_default = {
|
|
|
1500
1501
|
name: "GPT-5.2",
|
|
1501
1502
|
modalities: { input: ["text", "image"], output: ["text"] }
|
|
1502
1503
|
},
|
|
1503
|
-
"claude-sonnet-4-5": {
|
|
1504
|
+
"claude-sonnet-4-5-20250929": {
|
|
1504
1505
|
name: "Claude Sonnet 4.5",
|
|
1505
1506
|
modalities: { input: ["text", "image"], output: ["text"] }
|
|
1506
1507
|
},
|
|
1507
|
-
"claude-opus-4-5": {
|
|
1508
|
+
"claude-opus-4-5-20251101": {
|
|
1508
1509
|
name: "Claude Opus 4.5",
|
|
1509
1510
|
modalities: { input: ["text", "image"], output: ["text"] }
|
|
1510
1511
|
},
|
|
@@ -1582,39 +1583,6 @@ var buildStandardProviderConfig = () => ({
|
|
|
1582
1583
|
...provider_config_default,
|
|
1583
1584
|
npm: PROVIDER_NPM
|
|
1584
1585
|
});
|
|
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
1586
|
var applyProviderConfig = (config) => {
|
|
1619
1587
|
let changed = false;
|
|
1620
1588
|
const providerMap = config.provider && typeof config.provider === "object" ? config.provider : {};
|
|
@@ -1630,9 +1598,6 @@ var applyProviderConfig = (config) => {
|
|
|
1630
1598
|
config.plugin = nextPlugins;
|
|
1631
1599
|
changed = true;
|
|
1632
1600
|
}
|
|
1633
|
-
if (migrateModelIdsInConfig(config)) {
|
|
1634
|
-
changed = true;
|
|
1635
|
-
}
|
|
1636
1601
|
return changed;
|
|
1637
1602
|
};
|
|
1638
1603
|
var ensureConfigFile = async () => {
|
|
@@ -1656,16 +1621,6 @@ var ensureConfigFile = async () => {
|
|
|
1656
1621
|
if (!config || typeof config !== "object")
|
|
1657
1622
|
return;
|
|
1658
1623
|
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
1624
|
if (!changed)
|
|
1670
1625
|
return;
|
|
1671
1626
|
await mkdir2(configDir, { recursive: true });
|
package/package.json
CHANGED