@kenkaiiii/gg-ai 5.104.0 → 5.105.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4361,8 +4361,8 @@ function toGeminiToolConfig(choice, tools) {
|
|
|
4361
4361
|
if (choice === "required") return { functionCallingConfig: { mode: "ANY" } };
|
|
4362
4362
|
return { functionCallingConfig: { mode: "ANY", allowedFunctionNames: [choice.name] } };
|
|
4363
4363
|
}
|
|
4364
|
-
function
|
|
4365
|
-
return /^gemini-3(?:\.|-|$)/.test(model);
|
|
4364
|
+
function usesThinkingLevel(model) {
|
|
4365
|
+
return /^gemini-(?:[3-9]|[1-9]\d)(?:\.|-|$)/.test(model);
|
|
4366
4366
|
}
|
|
4367
4367
|
function toGemini3ThinkingLevel(level) {
|
|
4368
4368
|
switch (level) {
|
|
@@ -4392,7 +4392,7 @@ function toThinkingBudget(level) {
|
|
|
4392
4392
|
}
|
|
4393
4393
|
function toThinkingConfig(model, level) {
|
|
4394
4394
|
if (!level) return void 0;
|
|
4395
|
-
if (
|
|
4395
|
+
if (usesThinkingLevel(model)) {
|
|
4396
4396
|
return {
|
|
4397
4397
|
includeThoughts: true,
|
|
4398
4398
|
thinkingLevel: toGemini3ThinkingLevel(level)
|