show reasoning in frontend and some other stuff

This commit is contained in:
2026-09-21 20:27:05 +02:00
parent fd76a79aaf
commit 2014b3b73f
4 changed files with 381 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
// Conservative allowlist for models supporting the boolean think API.
// Unknown models remain usable for normal chat.
export function supportsReasoning(model) {
const id = String(typeof model === "string" ? model : model?.model || model?.name || "").toLowerCase().split("/").at(-1);
return /^(qwen3|deepseek-r1|deepseek-v3\.1)(:|$)/.test(id);
}