opencode-aicodewith-auth 0.1.49 → 0.1.52

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -705,14 +705,16 @@ function sanitizeItemIds(input) {
705
705
  }
706
706
  }
707
707
  return input.filter((item) => item.type !== "item_reference").map((item) => {
708
- const isCallItem = item.type === "function_call" || item.type === "local_shell_call" || item.type === "custom_tool_call";
709
- if (!isCallItem || !("id" in item)) {
708
+ if (!("id" in item)) {
710
709
  return item;
711
710
  }
712
- const callId = item.call_id;
713
- const hasMatchingOutput = typeof callId === "string" && callId.trim().length > 0 && outputCallIds.has(callId.trim());
714
- if (hasMatchingOutput) {
715
- return item;
711
+ const isCallItem = item.type === "function_call" || item.type === "local_shell_call" || item.type === "custom_tool_call";
712
+ if (isCallItem) {
713
+ const callId = item.call_id;
714
+ const hasMatchingOutput = typeof callId === "string" && callId.trim().length > 0 && outputCallIds.has(callId.trim());
715
+ if (hasMatchingOutput) {
716
+ return item;
717
+ }
716
718
  }
717
719
  const { id, ...rest } = item;
718
720
  return rest;
@@ -766,6 +768,8 @@ async function transformRequestBody(body, codexInstructions) {
766
768
  body.model = normalizedModel;
767
769
  body.stream = true;
768
770
  body.store = false;
771
+ delete body.previousResponseId;
772
+ delete body.previous_response_id;
769
773
  body.instructions = codexInstructions;
770
774
  if (body.input && Array.isArray(body.input)) {
771
775
  body.input = sanitizeItemIds(body.input);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-aicodewith-auth",
3
- "version": "0.1.49",
3
+ "version": "0.1.52",
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",