@ai-sdk/google
Advanced tools
+1
-1
| { | ||
| "name": "@ai-sdk/google", | ||
| "version": "4.0.45", | ||
| "version": "4.0.46", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -1191,5 +1191,3 @@ import type { | ||
| }): Pick<GoogleThinkingConfig, 'thinkingLevel'> | undefined { | ||
| const minimumThinkingLevel = /(^|\/)gemini-3\.7-flash$/i.test(modelId) | ||
| ? 'low' | ||
| : 'minimal'; | ||
| const minimumThinkingLevel = getMinimumThinkingLevelForGemini3Model(modelId); | ||
@@ -1220,2 +1218,27 @@ if (reasoning === 'none') { | ||
| function getMinimumThinkingLevelForGemini3Model( | ||
| modelId: string, | ||
| ): 'minimal' | 'low' { | ||
| const modelName = modelId.split('/').at(-1)?.toLowerCase(); | ||
| if (modelName === 'gemini-flash-latest') { | ||
| return 'low'; | ||
| } | ||
| const versionMatch = /^gemini-(\d+)\.(\d+)-flash(?:$|-(?!lite(?:-|$)))/.exec( | ||
| modelName ?? '', | ||
| ); | ||
| if (versionMatch == null) { | ||
| return 'minimal'; | ||
| } | ||
| const majorVersion = Number(versionMatch[1]); | ||
| const minorVersion = Number(versionMatch[2]); | ||
| return majorVersion > 3 || (majorVersion === 3 && minorVersion >= 7) | ||
| ? 'low' | ||
| : 'minimal'; | ||
| } | ||
| function resolveGemini25ThinkingConfig({ | ||
@@ -1222,0 +1245,0 @@ reasoning, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
2124049
0.17%26956
0.18%