fix(executor): streaming response format (#1972)

This commit is contained in:
Siddharth Ganesan
2025-11-13 15:27:15 -08:00
committed by GitHub
parent 3a8f01f3e4
commit 6f4f8cfad2

View File

@@ -565,7 +565,15 @@ export class BlockExecutor {
if (responseFormat) {
try {
const parsed = JSON.parse(fullContent.trim())
Object.assign(executionOutput, parsed)
streamingExec.execution.output = {
...parsed,
tokens: executionOutput.tokens,
toolCalls: executionOutput.toolCalls,
providerTiming: executionOutput.providerTiming,
cost: executionOutput.cost,
model: executionOutput.model,
}
return
} catch (error) {
logger.warn('Failed to parse streamed content for response format', { blockId, error })