Repository navigation
Commit 1d04f1d
Zoo (VP)
test(opencode-go): cover completePrompt max_tokens fallback and trim diff churn
The codecov patch partials were not the streaming header fallbacks
(those arms are all exercised by the metadata-absent createMessage
tests): they were lines 720-722, pre-existing conditionals that became
patch lines because the completePrompt Anthropic restructure
re-indented the untouched params object.
- Send the session header on the Anthropic client's defaultHeaders
instead of a per-request option in completePrompt (per-request
headers still override it with taskId when streaming), so the
completePrompt params block stays byte-identical to main and out of
the diff. The supportsTemperature false arm there is unreachable for
Anthropic-format Go models by design.
- Add a completePrompt test for the includeMaxTokens-on /
modelMaxTokens-unset max_tokens fallback, mirroring the streaming
test of the same name, and assert the defaultHeaders session header.
Patch coverage of opencode-go.ts vs base is now 100% with no untaken
branch arms on added lines.1 parent f76b38a commit 1d04f1d
2 files changed
Lines changed: 40 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
640 | | - | |
| 640 | + | |
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
645 | | - | |
| 645 | + | |
646 | 646 | | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
647 | 651 | | |
648 | | - | |
649 | | - | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
650 | 655 | | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
651 | 669 | | |
652 | 670 | | |
653 | 671 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
| |||
708 | 712 | | |
709 | 713 | | |
710 | 714 | | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
728 | 729 | | |
729 | 730 | | |
730 | 731 | | |
| |||
0 commit comments