From 81480ba0996725f3aa9734f1ca068e30f22dd66b Mon Sep 17 00:00:00 2001 From: Hanmiao Li <894876246@qq.com> Date: Tue, 26 May 2026 23:30:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20vLLM=20provider=20=E2=80=94=20pass=20thr?= =?UTF-8?q?ough=20reasoning=5Feffort,=20downgrade=20max=20to=20high=20(#21?= =?UTF-8?q?69)=20(#2170)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/tui/src/client.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/crates/tui/src/client.rs b/crates/tui/src/client.rs index 21552a79..025a8344 100644 --- a/crates/tui/src/client.rs +++ b/crates/tui/src/client.rs @@ -937,7 +937,14 @@ pub(super) fn apply_reasoning_effort( body["chat_template_kwargs"] = json!({ "enable_thinking": true, }); - body["reasoning_effort"] = json!("high"); + // vLLM supports low/medium/high natively — pass through the + // user-chosen value instead of hard-coding "high". + let value = match normalized.as_str() { + "low" | "minimal" => "low", + "medium" | "mid" => "medium", + _ => "high", + }; + body["reasoning_effort"] = json!(value); } ApiProvider::Openai | ApiProvider::Atlascloud @@ -967,7 +974,9 @@ pub(super) fn apply_reasoning_effort( body["chat_template_kwargs"] = json!({ "enable_thinking": true, }); - body["reasoning_effort"] = json!("max"); + // vLLM only supports none/low/medium/high — downgrade + // "max" to "high" instead of sending an invalid value. + body["reasoning_effort"] = json!("high"); } ApiProvider::Openai | ApiProvider::Atlascloud