opencode-aicodewith-auth 0.1.46 → 0.1.47
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/dist/index.js +10 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -694,6 +694,15 @@ function resolveInclude(body) {
|
|
|
694
694
|
}
|
|
695
695
|
return include;
|
|
696
696
|
}
|
|
697
|
+
function stripItemIds(input) {
|
|
698
|
+
return input.filter((item) => item.type !== "item_reference").map((item) => {
|
|
699
|
+
if ("id" in item) {
|
|
700
|
+
const { id, ...rest } = item;
|
|
701
|
+
return rest;
|
|
702
|
+
}
|
|
703
|
+
return item;
|
|
704
|
+
});
|
|
705
|
+
}
|
|
697
706
|
function filterOpenCodeSystemPrompts(input) {
|
|
698
707
|
if (!Array.isArray(input))
|
|
699
708
|
return input;
|
|
@@ -743,6 +752,7 @@ async function transformRequestBody(body, codexInstructions) {
|
|
|
743
752
|
body.stream = true;
|
|
744
753
|
body.instructions = codexInstructions;
|
|
745
754
|
if (body.input && Array.isArray(body.input)) {
|
|
755
|
+
body.input = stripItemIds(body.input);
|
|
746
756
|
body.input = filterOpenCodeSystemPrompts(body.input);
|
|
747
757
|
body.input = addCodexBridgeMessage(body.input, !!body.tools);
|
|
748
758
|
if (body.input) {
|
|
@@ -2016,9 +2026,6 @@ var AicodewithCodexAuthPlugin = async (ctx) => {
|
|
|
2016
2026
|
if (input.model.providerID !== PROVIDER_ID2)
|
|
2017
2027
|
return;
|
|
2018
2028
|
if (isCodexModel(input.model.id)) {
|
|
2019
|
-
if (!output.options)
|
|
2020
|
-
output.options = {};
|
|
2021
|
-
output.options.store = true;
|
|
2022
2029
|
return;
|
|
2023
2030
|
}
|
|
2024
2031
|
if (!input.model.id?.startsWith("claude-"))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-aicodewith-auth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.47",
|
|
4
4
|
"description": "OpenCode plugin for AICodewith authentication - Access GPT-5.3 Codex, GPT-5.2, Claude, and Gemini models through AICodewith API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|