Skip to content

Commit 2f722e0

Browse files
committed
fix(agent): include model in structured response output
1 parent 476669f commit 2f722e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/sim/executor/handlers/agent/agent-handler.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,19 +1070,20 @@ export class AgentBlockHandler implements BlockHandler {
10701070
private processStandardResponse(result: any): BlockOutput {
10711071
return {
10721072
content: result.content,
1073-
model: result.model,
10741073
...this.createResponseMetadata(result),
10751074
...(result.interactionId && { interactionId: result.interactionId }),
10761075
}
10771076
}
10781077

10791078
private createResponseMetadata(result: {
1079+
model?: string
10801080
tokens?: { input?: number; output?: number; total?: number }
10811081
toolCalls?: Array<any>
10821082
timing?: any
10831083
cost?: any
10841084
}) {
10851085
return {
1086+
model: result.model,
10861087
tokens: result.tokens || {
10871088
input: DEFAULTS.TOKENS.PROMPT,
10881089
output: DEFAULTS.TOKENS.COMPLETION,

0 commit comments

Comments
 (0)