Skip to content

Commit 3d4fbcf

Browse files
committed
fix(signal): Pass through signal to model call
1 parent 09ca400 commit 3d4fbcf

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/plain-clowns-sleep.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@openai/agents-core': patch
3+
---
4+
5+
Pass through signal to model call

packages/agents-core/src/run.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ export class Runner extends RunHooks<any, AgentOutputType<unknown>> {
377377
this.config.tracingDisabled,
378378
this.config.traceIncludeSensitiveData,
379379
),
380+
signal: options.signal,
380381
});
381382
state._modelResponses.push(state._lastTurnResponse);
382383
state._context.usage.add(state._lastTurnResponse.usage);
@@ -724,6 +725,7 @@ export class Runner extends RunHooks<any, AgentOutputType<unknown>> {
724725
this.config.tracingDisabled,
725726
this.config.traceIncludeSensitiveData,
726727
),
728+
signal: options.signal,
727729
})) {
728730
if (event.type === 'response_done') {
729731
const parsed = StreamEventResponseCompleted.parse(event);

0 commit comments

Comments
 (0)