Fix codex

This commit is contained in:
decolua
2026-05-26 11:35:39 +07:00
parent b876e0225a
commit a648a42bdb
14 changed files with 645 additions and 52 deletions
@@ -568,10 +568,17 @@ export function openaiResponsesToOpenAIResponse(chunk, state) {
return null;
}
// Reasoning events (convert to content or skip)
// Reasoning summary delta → emit as reasoning_content for client thinking display
if (eventType === "response.reasoning_summary_text.delta") {
// Optionally include reasoning as content, or skip
return null;
const delta = data.delta || "";
if (!delta) return null;
return {
id: state.chatId,
object: "chat.completion.chunk",
created: state.created,
model: state.model || "unknown",
choices: [{ index: 0, delta: { reasoning_content: delta }, finish_reason: null }]
};
}
// Ignore other events