feat: SGLANG_COMPAT — chat_template_kwargs.enable_thinking=false при -no-think (llama.cpp/sglang)
Build LLM Proxy / Build and push (release) Successful in 21s
Build LLM Proxy / Build and push (release) Successful in 21s
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user