strip :THINKING in e2ee_round_trip, drop per-model defaults - #2
Conversation
|
I believe this does not handle the |
|
Also doesn't seem to normalize if kwargs.thinking ~= nil and kwargs.enable_thinking == nil then
kwargs.enable_thinking = kwargs.thinking
end
if kwargs.enable_thinking ~= nil and kwargs.thinking == nil then
kwargs.thinking = kwargs.enable_thinking
end |
There shouldn't be any downside to sending both There's too many model specific exceptions in regards to defaults. If there's a specific APP or something where this is needed, please let me know. |
This could be added to match chutes-api. |
|
@sirouk add it like this If If If If If |
While there aren't any downsides to the current implementation, I still believe it would be good practice to normalize these two kwargs so that sending one of them to the endpoint sends the other as well. I understand that there are many models with specific exceptions, but most models seem to use either |
|
Supersedes #1.
Root path of all requests is e2ee_round_trip, so that's where the
:THINKING handling lives. Strip the suffix from model, set
thinking/enable_thinking in chat_template_kwargs, re-encode the body.
Discovery never sees :THINKING, and claude_handler / responses_handler
inherit the behavior for free.
Per-model defaults (GLM-4.7 / Kimi-K2.5 / DeepSeek-V3.2-Speciale on,
MiMo-V2-Flash off) are not duplicated here. Users can set
chat_template_kwargs directly in the request body to override; it's
not the proxy's job to replicate every edge case from the chutes-api
router.
Credit to Snow for reporting the original bug and opening #1, and
to Ben for the review that straightened this out.