feat: SGLANG_COMPAT — chat_template_kwargs.enable_thinking=false при -no-think (llama.cpp/sglang)
Build LLM Proxy / Build and push (release) Successful in 21s

This commit is contained in:
2026-08-21 02:53:52 +03:00
parent f45ed0d11c
commit 350ef663c0
@@ -155,6 +155,12 @@ internal fun patchBody(raw: String, excluded: List<String>, thinking: List<Strin
if (root["reasoning"] == null) {
root["reasoning"] = JsonObject(mapOf("enabled" to JsonPrimitive(false)))
}
// SGLANG_COMPAT: Qwen3.8 глушится только через chat_template_kwargs.enable_thinking=false
if (System.getenv("SGLANG_COMPAT") == "true") {
val ctk = root["chat_template_kwargs"]?.jsonObject?.toMutableMap() ?: mutableMapOf()
ctk["enable_thinking"] = JsonPrimitive(false)
root["chat_template_kwargs"] = JsonObject(ctk)
}
}
val provider = root["provider"]?.jsonObject?.toMutableMap() ?: mutableMapOf()