Merge 3aa6d0503d into da71eaebd2
This commit is contained in:
commit
287514d5f4
@ -6,21 +6,22 @@
|
|||||||
* Returns true if the provider requires reasoning to be wrapped in tags
|
* Returns true if the provider requires reasoning to be wrapped in tags
|
||||||
* (e.g. <think> and <final>) in the text stream, rather than using native
|
* (e.g. <think> and <final>) in the text stream, rather than using native
|
||||||
* API fields for reasoning/thinking.
|
* API fields for reasoning/thinking.
|
||||||
|
*
|
||||||
|
* NOTE: Only include providers that NATIVELY use <think> and <final> tags.
|
||||||
|
* Standard Gemini 2.0 (google-gemini-cli, google-generative-ai) does NOT use
|
||||||
|
* these tags natively, but Google Antigravity (Gemini 3.0) does.
|
||||||
*/
|
*/
|
||||||
export function isReasoningTagProvider(provider: string | undefined | null): boolean {
|
export function isReasoningTagProvider(provider: string | undefined | null): boolean {
|
||||||
if (!provider) return false;
|
if (!provider) return false;
|
||||||
const normalized = provider.trim().toLowerCase();
|
const normalized = provider.trim().toLowerCase();
|
||||||
|
|
||||||
// Check for exact matches or known prefixes/substrings for reasoning providers
|
// Check for exact matches or known prefixes/substrings for reasoning providers
|
||||||
if (
|
if (normalized === "ollama") {
|
||||||
normalized === "ollama" ||
|
|
||||||
normalized === "google-gemini-cli" ||
|
|
||||||
normalized === "google-generative-ai"
|
|
||||||
) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle google-antigravity and its model variations (e.g. google-antigravity/gemini-3)
|
// Handle google-antigravity and its model variations (e.g. google-antigravity/gemini-3)
|
||||||
|
// This is Gemini 3.0 which DOES use reasoning tags natively.
|
||||||
if (normalized.includes("google-antigravity")) {
|
if (normalized.includes("google-antigravity")) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user