Commit df658b9
Fix issues found in Copilot review of n parameter support
- Fix TypeError in chat streaming path: create_stream_response_json
was returning model_dump_json() (str) but cache_block_ids injection
subscripted it as a dict; switch to model_dump() + json.dumps()
- Fix stateful GptOssChatParser shared across concurrent asyncio.gather
calls in non-streaming n>1 path; create a fresh instance per choice,
consistent with the streaming path
- Fix tool-call parse exceptions being swallowed and misreported as
"Client disconnected"; re-raise so asyncio.gather propagates them,
wrap gather in try/except to return INTERNAL_SERVER_ERROR
- Add missing test_completion_n_negative_rejected to match the
existing test_chat_n_negative_rejected1 parent c5e86fd commit df658b9
2 files changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
549 | | - | |
| 549 | + | |
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| |||
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
631 | | - | |
| 631 | + | |
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
667 | | - | |
| 667 | + | |
| 668 | + | |
668 | 669 | | |
669 | 670 | | |
670 | 671 | | |
| |||
679 | 680 | | |
680 | 681 | | |
681 | 682 | | |
682 | | - | |
| 683 | + | |
683 | 684 | | |
684 | 685 | | |
685 | 686 | | |
| |||
713 | 714 | | |
714 | 715 | | |
715 | 716 | | |
716 | | - | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
717 | 721 | | |
718 | 722 | | |
719 | 723 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| |||
0 commit comments