Commit 0c6539d
committed
fix: register OpenResponses runId in chatAbortControllers for chat.abort support
OpenResponses HTTP API tasks (resp_xxx) were not registered in the
Gateway's chatAbortControllers Map, causing chat.abort requests to
silently fail with aborted: false.
This patch:
- Creates an AbortController for each OpenResponses request and
registers it in chatAbortControllers with the responseId as key
- Cleans up the registration on completion, error, client disconnect,
and stream finalization
- Threads chatAbortControllers from server-runtime-state through
server-http to the OpenResponses handler
Fixes #305581 parent 4da4cc9 commit 0c6539d
File tree
3 files changed
+31
-1
lines changed- src/gateway
3 files changed
+31
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
449 | 452 | | |
450 | 453 | | |
451 | 454 | | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
452 | 472 | | |
453 | 473 | | |
454 | 474 | | |
| |||
525 | 545 | | |
526 | 546 | | |
527 | 547 | | |
| 548 | + | |
| 549 | + | |
528 | 550 | | |
529 | 551 | | |
530 | 552 | | |
| |||
603 | 625 | | |
604 | 626 | | |
605 | 627 | | |
| 628 | + | |
606 | 629 | | |
607 | 630 | | |
608 | 631 | | |
| |||
679 | 702 | | |
680 | 703 | | |
681 | 704 | | |
| 705 | + | |
682 | 706 | | |
683 | 707 | | |
684 | 708 | | |
| |||
819 | 843 | | |
820 | 844 | | |
821 | 845 | | |
| 846 | + | |
822 | 847 | | |
823 | 848 | | |
824 | 849 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
463 | 464 | | |
464 | 465 | | |
465 | 466 | | |
| 467 | + | |
466 | 468 | | |
467 | 469 | | |
468 | 470 | | |
| |||
479 | 481 | | |
480 | 482 | | |
481 | 483 | | |
| 484 | + | |
482 | 485 | | |
483 | 486 | | |
484 | 487 | | |
| |||
555 | 558 | | |
556 | 559 | | |
557 | 560 | | |
| 561 | + | |
558 | 562 | | |
559 | 563 | | |
560 | 564 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| 144 | + | |
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
| |||
187 | 189 | | |
188 | 190 | | |
189 | 191 | | |
190 | | - | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| |||
0 commit comments