Fix codex image

This commit is contained in:
decolua
2026-03-13 14:47:40 +07:00
parent f3e5c99e8c
commit 549223c8cf
2 changed files with 8 additions and 2 deletions

1
.gitignore vendored
View File

@@ -67,3 +67,4 @@ README1.md
deploy.sh
ecosystem.config.*
start.sh
src/mitm/server copy.js

View File

@@ -228,12 +228,17 @@ export function openaiToOpenAIResponsesRequest(model, body, stream, credentials)
}
}
// Convert tool results
// Convert tool results - output must be a string for Responses API
if (msg.role === "tool") {
const output = typeof msg.content === "string"
? msg.content
: Array.isArray(msg.content)
? msg.content.map(c => c.text || JSON.stringify(c)).join("")
: JSON.stringify(msg.content);
result.input.push({
type: "function_call_output",
call_id: msg.tool_call_id,
output: msg.content
output
});
}
}