fix(stream): omit prior reasoning from request history

This commit is contained in:
Patrick Wozniak
2026-08-07 16:39:18 +02:00
parent 7d02d345f1
commit ea55ead662
5 changed files with 87 additions and 7 deletions
-5
View File
@@ -174,11 +174,6 @@ export function messagesToCC(messages?: readonly MessageLike[]): unknown[] {
for (const content of recordArray(message.content)) {
if (content.type === "text") {
parts.push({ type: "text", text: stringValue(content.text) ?? "" })
} else if (content.type === "thinking") {
parts.push({
type: "reasoning",
text: stringValue(content.thinking) ?? "",
})
} else if (content.type === "toolCall") {
const toolCallId = stringValue(content.id) ?? ""
if (!pairedToolCallIds.has(toolCallId)) continue