Add gemini-3.1-pro-preview to Google AI Studio and Vertex model lists with thinking support (#5188)
Signed| @@ -3260,6 +3260,9 @@ | ||
| 3260 | 3260 | <div> |
| 3261 | 3261 | <h4 data-i18n="Google Model">Google Model</h4> |
| 3262 | 3262 | <select id="model_google_select"> |
| 3263 | + <optgroup label="Gemini 3.1"> | |
| 3264 | + <option value="gemini-3.1-pro-preview">gemini-3.1-pro-preview</option> | |
| 3265 | + </optgroup> | |
| 3263 | 3266 | <optgroup label="Gemini 3.0"> |
| 3264 | 3267 | <option value="gemini-3-pro-preview">gemini-3-pro-preview</option> |
| 3265 | 3268 | <option value="gemini-3-pro-image-preview">gemini-3-pro-image-preview</option> |
| @@ -3433,6 +3436,9 @@ | ||
| 3433 | 3436 | <h4 data-i18n="Google Model">Google Model</h4> |
| 3434 | 3437 | <select id="model_vertexai_select"> |
| 3435 | 3438 | <!-- data-mode="full" is for models that require a service account --> |
| 3439 | + <optgroup label="Gemini 3.1"> | |
| 3440 | + <option value="gemini-3.1-pro-preview">gemini-3.1-pro-preview</option> | |
| 3441 | + </optgroup> | |
| 3436 | 3442 | <optgroup label="Gemini 3.0"> |
| 3437 | 3443 | <option value="gemini-3-pro-preview">gemini-3-pro-preview</option> |
| 3438 | 3444 | <option value="gemini-3-pro-image-preview">gemini-3-pro-image-preview</option> |
| @@ -5209,7 +5209,7 @@ async function onModelChange() { | ||
| 5209 | 5209 | $('#openai_max_context').attr('max', max_32k); |
| 5210 | 5210 | } else if (value.includes('gemini-3-pro-image')) { |
| 5211 | 5211 | $('#openai_max_context').attr('max', max_64k); |
| 5212 | 5212 | } else if (/gemini-3[.\d]*-(pro|flash)/.test(value) || /gemini-2.5-(pro|flash)/.test(value) || /gemini-2.0-(pro|flash)/.test(value)) { |
| 5213 | 5213 | $('#openai_max_context').attr('max', max_1mil); |
| 5214 | 5214 | } else if (value.includes('gemini-exp') || value.includes('learnlm-2.0-flash') || value.includes('gemini-robotics')) { |
| 5215 | 5215 | $('#openai_max_context').attr('max', max_1mil); |
| @@ -460,7 +460,7 @@ async function sendMakerSuiteRequest(request, response) { | ||
| 460 | 460 | 'gemini-3-pro-image-preview', |
| 461 | 461 | ]; |
| 462 | 462 | |
| 463 | 463 | const isThinkingConfigModel = m => (/^gemini-2.5-(flash|pro)/.test(m) && !/-image(-preview)?$/.test(m)) || (/^gemini-3[.\d]*-(flash|pro)/.test(m)); |
| 464 | 464 | const isImageSizeModel = m => /^gemini-3/.test(m); |
| 465 | 465 | |
| 466 | 466 | const noSearchModels = [ |
| @@ -1270,11 +1270,11 @@ export function calculateGoogleBudgetTokens(maxTokens, reasoningEffort, model) { | ||
| 1270 | 1270 | return null; |
| 1271 | 1271 | } |
| 1272 | 1272 | |
| 1273 | 1273 | if (/gemini-3[.\d]*-pro/.test(model)) { |
| 1274 | 1274 | return getGemini3ProBudget(); |
| 1275 | 1275 | } |
| 1276 | 1276 | |
| 1277 | 1277 | if (/gemini-3[.\d]*-flash/.test(model)) { |
| 1278 | 1278 | return getGemini3FlashBudget(); |
| 1279 | 1279 | } |
| 1280 | 1280 | |