fix: enforce final tag gating (#754) (thanks @mcinteerj)
This commit is contained in:
@@ -7,10 +7,12 @@
|
||||
* (e.g. <think> and <final>) in the text stream, rather than using native
|
||||
* API fields for reasoning/thinking.
|
||||
*/
|
||||
export function isReasoningTagProvider(provider: string | undefined | null): boolean {
|
||||
export function isReasoningTagProvider(
|
||||
provider: string | undefined | null,
|
||||
): boolean {
|
||||
if (!provider) return false;
|
||||
const normalized = provider.trim().toLowerCase();
|
||||
|
||||
|
||||
// Check for exact matches or known prefixes/substrings for reasoning providers
|
||||
if (
|
||||
normalized === "ollama" ||
|
||||
@@ -19,7 +21,7 @@ export function isReasoningTagProvider(provider: string | undefined | null): boo
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Handle google-antigravity and its model variations (e.g. google-antigravity/gemini-3)
|
||||
if (normalized.includes("google-antigravity")) {
|
||||
return true;
|
||||
@@ -29,6 +31,6 @@ export function isReasoningTagProvider(provider: string | undefined | null): boo
|
||||
if (normalized.includes("minimax")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user