Sign In

@ai-sdk/google

Package Overview
Dependencies
Maintainers
3
Versions
626
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/google - npm Package Compare versions

Comparing version
4.0.45
to
4.0.46
+1
-1
package.json
{
"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