tuna-agent 0.1.149 → 0.1.150
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.
|
@@ -179,9 +179,17 @@ ${rawText}`,
|
|
|
179
179
|
async function geminiGenerate(parts, maxOutputTokens, model = GEMINI_MODEL) {
|
|
180
180
|
if (!GEMINI_KEYS.length)
|
|
181
181
|
return { text: '' };
|
|
182
|
+
const generationConfig = { maxOutputTokens, temperature: 0.4 };
|
|
183
|
+
// Gemini 2.5 Flash is a thinking model: with thinking ON it burns the whole
|
|
184
|
+
// maxOutputTokens budget on internal reasoning and returns EMPTY text. These
|
|
185
|
+
// are extraction/description tasks (no CoT needed) → disable thinking so the
|
|
186
|
+
// budget goes to the actual answer.
|
|
187
|
+
if (model.includes('2.5-flash')) {
|
|
188
|
+
generationConfig.thinkingConfig = { thinkingBudget: 0 };
|
|
189
|
+
}
|
|
182
190
|
const body = JSON.stringify({
|
|
183
191
|
contents: [{ parts }],
|
|
184
|
-
generationConfig
|
|
192
|
+
generationConfig,
|
|
185
193
|
});
|
|
186
194
|
const MAX_ATTEMPTS = 6;
|
|
187
195
|
let keyIdx = 0;
|