Commit ae85d1b
committed
fix: emit tool_call_end events in OpenAI handler when streaming ends
The OpenAiHandler was not emitting tool_call_end events when the API
stream ended with finish_reason === 'tool_calls'. This could cause the
extension to appear stuck waiting for more stream data.
Changes:
- Added tracking of active tool call IDs in createMessage() and handleStreamResponse()
- Emit tool_call_end events when finish_reason === 'tool_calls'
- Added test coverage for both regular and O3 family models
Closes: #10275
Linear: ROO-2691 parent f462eeb commit ae85d1b
2 files changed
+37
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
298 | 302 | | |
299 | 303 | | |
300 | 304 | | |
| |||
855 | 859 | | |
856 | 860 | | |
857 | 861 | | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
858 | 866 | | |
859 | 867 | | |
860 | 868 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| 201 | + | |
200 | 202 | | |
201 | 203 | | |
202 | 204 | | |
| |||
213 | 215 | | |
214 | 216 | | |
215 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
216 | 221 | | |
217 | 222 | | |
218 | 223 | | |
| |||
223 | 228 | | |
224 | 229 | | |
225 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
226 | 240 | | |
227 | 241 | | |
228 | 242 | | |
| |||
443 | 457 | | |
444 | 458 | | |
445 | 459 | | |
| 460 | + | |
| 461 | + | |
446 | 462 | | |
447 | 463 | | |
| 464 | + | |
448 | 465 | | |
449 | 466 | | |
450 | 467 | | |
| |||
457 | 474 | | |
458 | 475 | | |
459 | 476 | | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
460 | 480 | | |
461 | 481 | | |
462 | 482 | | |
| |||
468 | 488 | | |
469 | 489 | | |
470 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
471 | 500 | | |
472 | 501 | | |
473 | 502 | | |
| |||
0 commit comments