Commit 484f054
committed
disable tool server initialization if no tool in request
Summary:
First part of fixing #25697
we can first fix this error
```
RuntimeError: Attempted to exit cancel scope in a different task than it was entered in
```
by not initializing the tool servers if the request doesn't need tools.
Test Plan:
- non stream request with tools still gets tools
- stream without tools no longer outputs the error
- stream with tools still works (but it still outputs the error)
Differential Revision: D83387320
Signed-off-by: Andrew Xia <[email protected]>1 parent 4778b42 commit 484f054
1 file changed
+19
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
445 | 458 | | |
446 | 459 | | |
447 | 460 | | |
| |||
458 | 471 | | |
459 | 472 | | |
460 | 473 | | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
| 474 | + | |
| 475 | + | |
467 | 476 | | |
468 | 477 | | |
469 | 478 | | |
| |||
1647 | 1656 | | |
1648 | 1657 | | |
1649 | 1658 | | |
1650 | | - | |
1651 | | - | |
1652 | | - | |
1653 | | - | |
1654 | | - | |
1655 | | - | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
1656 | 1663 | | |
1657 | 1664 | | |
1658 | 1665 | | |
| |||
0 commit comments