13 lines
519 B
JavaScript
13 lines
519 B
JavaScript
// Conservative allowlist for models supporting the boolean think API.
|
|
// Unknown models remain usable for normal chat.
|
|
const reasoningFamilies = new Set(["qwen3", "deepseek-r1", "deepseek-v3.1"]);
|
|
|
|
export function getModelFamily(model) {
|
|
const id = typeof model === "string" ? model : model?.model || model?.name || model?.id || "";
|
|
return String(id).trim().toLowerCase().split("/").at(-1).split(":")[0];
|
|
}
|
|
|
|
export function supportsReasoning(model) {
|
|
return reasoningFamilies.has(getModelFamily(model));
|
|
}
|