mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-11 14:10:15 -07:00
LLMs: Gemini: remove 'medium' thinking level support - too early. Fixes #900
This commit is contained in:
@@ -208,7 +208,8 @@ export const DModelParameterRegistry = {
|
||||
label: 'Thinking Level',
|
||||
type: 'enum' as const,
|
||||
description: 'Controls internal reasoning depth. Replaces thinking_budget for Gemini 3 models. When unset, the model decides dynamically.',
|
||||
values: ['high', 'medium' /* not present at launch */, 'low' /* default when unset */] as const,
|
||||
// Note: 'medium' and 'minimal' will be available when Gemini 3 Flash launches
|
||||
values: ['high', 'low' /* default when unset */] as const,
|
||||
// No initialValue - undefined means 'dynamic', which for Gemini Pro is the same as 'high' (which is the equivalent of 'medium' for OpenAI's effort levels.. somehow)
|
||||
} as const,
|
||||
|
||||
|
||||
@@ -466,6 +466,8 @@ export namespace AixWire_API {
|
||||
vndGeminiMediaResolution: z.enum(['mr_high', 'mr_medium', 'mr_low']).optional(),
|
||||
vndGeminiShowThoughts: z.boolean().optional(),
|
||||
vndGeminiThinkingBudget: z.number().optional(), // old param
|
||||
// 'medium' will be added when Gemini 3 Flash launches
|
||||
// but we have it below, because we used to have it and we don't want to throw on zod
|
||||
vndGeminiThinkingLevel: z.enum(['high', 'medium', 'low']).optional(), // new param
|
||||
vndGeminiUrlContext: z.enum(['auto']).optional(),
|
||||
// Moonshot
|
||||
|
||||
@@ -100,7 +100,8 @@ export function aixToGeminiGenerateContent(model: AixAPI_Model, _chatGenerate: A
|
||||
// [Gemini 3, 2025-11-18] Thinking Level (replaces thinkingBudget for Gemini 3)
|
||||
// CRITICAL: Cannot use both thinkingLevel and thinkingBudget (400 error)
|
||||
if (model.vndGeminiThinkingLevel) {
|
||||
thinkingConfig.thinkingLevel = model.vndGeminiThinkingLevel;
|
||||
// FIXME: remove this cast once the 'medium' level is supported upstream
|
||||
thinkingConfig.thinkingLevel = model.vndGeminiThinkingLevel === 'medium' ? 'high' : model.vndGeminiThinkingLevel;
|
||||
}
|
||||
// [Gemini 2.x] Thinking Budget (0 disables thinking explicitly)
|
||||
else if (model.vndGeminiThinkingBudget !== undefined) {
|
||||
|
||||
@@ -569,12 +569,12 @@ export namespace GeminiWire_API_Generate_Content {
|
||||
/**
|
||||
* [Gemini 3, 2025-11-18] Replaces thinkingBudget for Gemini 3 models.
|
||||
* - 'low': Minimizes latency and cost
|
||||
* - 'medium': Balanced (coming soon, not yet supported)
|
||||
* - 'high': Maximizes reasoning depth (default when set)
|
||||
* - undefined: Dynamic (model decides - which is equivalent to 'high' for now)
|
||||
* Note: 'medium' and 'minimal' will be available when Gemini 3 Flash launches
|
||||
* CRITICAL: Cannot use both thinkingLevel and thinkingBudget (400 error)
|
||||
*/
|
||||
thinkingLevel: z.enum(['low', 'medium', 'high']).optional(),
|
||||
thinkingLevel: z.enum(['low', 'high']).optional(),
|
||||
}).optional(),
|
||||
|
||||
// Image generation configuration
|
||||
|
||||
@@ -111,7 +111,7 @@ const _geminiMediaResolutionOptions = [
|
||||
|
||||
const _geminiThinkingLevelOptions = [
|
||||
{ value: 'high', label: 'High', description: 'Maximum reasoning depth' },
|
||||
{ value: 'medium', label: 'Medium', description: 'Balanced reasoning' },
|
||||
// Note: 'medium' and 'minimal' will be available when Gemini 3 Flash launches
|
||||
{ value: 'low', label: 'Low', description: 'Quick responses (default when unset)' },
|
||||
{ value: _UNSPECIFIED, label: 'Default', description: 'Model decides automatically (default)' },
|
||||
] as const;
|
||||
|
||||
Reference in New Issue
Block a user