fix: enable_thinking not sent in streaming path

Two bugs:
1. run_stream() never merged per-model/server config (think_budget,
   temperature, etc.) into the request — unlike run_inner(). Now both
   paths apply the same config merge.
2. to_wire() was missing the enable_thinking bool conversion line
   (lost in a prior revert). Restored: think_budget=0 → enable_thinking=false.
This commit is contained in:
infosave2007
2026-07-23 16:34:49 +03:00
parent 22110ac524
commit 850a54acdf
2 changed files with 33 additions and 1 deletions
+2
View File
@@ -51,6 +51,8 @@ impl OpenAiProvider {
if let Some(tb) = req.params.think_budget {
body["think_budget"] = tb.into();
body["reasoning_effort"] = tb.into();
// cortiq serve uses enable_thinking (bool): 0 = off, >0 = on
body["enable_thinking"] = (tb > 0).into();
}
if !req.tools.is_empty() {
body["tools"] = serde_json::Value::Array(req.tools.clone());