webui : store reasoning_content so it is sent back in subsequent requests#21249
Conversation
|
Apologies, I did not realize the type check failed. |
|
Hey, @aldehir please re-run |
05e0e3a to
a6d6862
Compare
|
@allozaur rebased and rebuilt. |
|
@ServeurpersoCom plz give 2nd approval and let's merge it :) |
|
Isn't this model specific? The Gemma 4 model description says:
Maybe there should be a flag embedded in the model metadata to specify this? |
Good point, but this is already covered. On the server side, the chat template is the source of truth: if a model's template doesn't reference reasoning_content, the field is simply ignored. On the WebUI side, there's already a toggle: "Exclude reasoning from context" that lets the user strip it explicitly. So no extra flag needed. |
|
|
I was not aware of the template stripping the reasoning as necessary, but that actually makes a lot of sense, thank you for explaining! |
…ests (ggml-org#21249) (cherry picked from commit 482192f)
Overview
The
reasoning_contentshould be sent back in the assistant message on subsequent requests. It wasn't being saved in the history and therefore lost.Additional information
For models that support interleaved thinking, it is important to send back the reasoning during agentic loops.
Requirements