Skip to content

Commit 6f4f8cf

Browse files
authored
fix(executor): streaming response format (#1972)
1 parent 3a8f01f commit 6f4f8cf

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

apps/sim/executor/execution/block-executor.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,15 @@ export class BlockExecutor {
565565
if (responseFormat) {
566566
try {
567567
const parsed = JSON.parse(fullContent.trim())
568-
Object.assign(executionOutput, parsed)
568+
569+
streamingExec.execution.output = {
570+
...parsed,
571+
tokens: executionOutput.tokens,
572+
toolCalls: executionOutput.toolCalls,
573+
providerTiming: executionOutput.providerTiming,
574+
cost: executionOutput.cost,
575+
model: executionOutput.model,
576+
}
569577
return
570578
} catch (error) {
571579
logger.warn('Failed to parse streamed content for response format', { blockId, error })

0 commit comments

Comments
 (0)