fix: dropped generation-prompt text in JinjaTemplateChatWrapper - #635
fix: dropped generation-prompt text in JinjaTemplateChatWrapper#635JoshuaWise wants to merge 1 commit into
Conversation
|
Thanks for the PR! |
| ) | ||
| ], | ||
| ...( | ||
| noPrefixTrigger != null |
There was a problem hiding this comment.
We need to make sure that we don't force-open a thought segment on every render, we should only do it when the model response is empty because we're just starting to generate it.
The rendering also happens after function calls are done (when the results are being put in the context), after context shifts, and some other edge cases, so we shouldn't break those
|
Feel free to close this in favor of #636 |
|
I just realized, my fix here doesn't actually work for what it's intended to solve. I'm trying to get Qwen3.6-27B-Fable-Fusion working, and although the tests pass, it's not working in practice. Your PR #636 seems to be the more robust fix. Closing this. |
Description of change
JinjaTemplateChatWrapperwas discarding text in the template's generation prompt that comes after the assistant role header. Any static text the template emits between the role header and the model's content -- most importantly a pre-filled reasoning tag like<think>was silently dropped. This PR fixes that behavior, enabling many templates that rely on pre-filling a<think>tag to force the model into reasoning mode, or<think></think>to suppress it.Fixes #634
Pull-Request Checklist
masterbranchnpm run formatto apply eslint formattingnpm run testpasses with this changeFixes #0000