New Jeremy 2.5 Pro
| @@ -2098,8 +2098,8 @@ | |||
| 2098 | <div class="toggle-description justifyLeft marginBot5" data-source="claude" data-i18n="Allocates a portion of the response length for thinking (min: 1024 tokens, low: 10%, medium: 25%, high: 50%, max: 95%), but minimum 1024 tokens. Auto does not request thinking."> | 2098 | <div class="toggle-description justifyLeft marginBot5" data-source="claude" data-i18n="Allocates a portion of the response length for thinking (min: 1024 tokens, low: 10%, medium: 25%, high: 50%, max: 95%), but minimum 1024 tokens. Auto does not request thinking."> |
| 2099 | Allocates a portion of the response length for thinking (min: 1024 tokens, low: 10%, medium: 25%, high: 50%, max: 95%), but minimum 1024 tokens. Auto does not request thinking. | 2099 | Allocates a portion of the response length for thinking (min: 1024 tokens, low: 10%, medium: 25%, high: 50%, max: 95%), but minimum 1024 tokens. Auto does not request thinking. |
| 2100 | </div> | 2100 | </div> |
| 2101 | <div class="toggle-description justifyLeft marginBot5" data-source="makersuite,vertexai" data-i18n="Allocates a portion of the response length for thinking (min: 0 tokens, low: 10%, medium: 25%, high: 50%, max: 24576 tokens). Auto lets the model decide."> | 2101 | <div class="toggle-description justifyLeft marginBot5" data-source="makersuite,vertexai" data-i18n="Allocates a portion of the response length for thinking (Flash 2.5/Pro 2.5) (min: 0/128 tokens, low: 10%, medium: 25%, high: 50%, max: 24576/32768 tokens). Auto lets the model decide."> |
| 2102 | Allocates a portion of the response length for thinking (min: 0 tokens, low: 10%, medium: 25%, high: 50%, max: 24576 tokens). Auto lets the model decide. | 2102 | Allocates a portion of the response length for thinking (Flash 2.5/Pro 2.5) (min: 0/128 tokens, low: 10%, medium: 25%, high: 50%, max: 24576/32768 tokens). Auto lets the model decide. |
| 2103 | </div> | 2103 | </div> |
| 2104 | </div> | 2104 | </div> |
| 2105 | </div> | 2105 | </div> |
| @@ -3190,6 +3190,7 @@ | |||
| 3190 | <h4 data-i18n="Google Model">Google Model</h4> | 3190 | <h4 data-i18n="Google Model">Google Model</h4> |
| 3191 | <select id="model_google_select"> | 3191 | <select id="model_google_select"> |
| 3192 | <optgroup label="Gemini 2.5"> | 3192 | <optgroup label="Gemini 2.5"> |
| 3193 | <option value="gemini-2.5-pro-preview-06-05">gemini-2.5-pro-preview-06-05</option> | ||
| 3193 | <option value="gemini-2.5-pro-preview-05-06">gemini-2.5-pro-preview-05-06</option> | 3194 | <option value="gemini-2.5-pro-preview-05-06">gemini-2.5-pro-preview-05-06</option> |
| 3194 | <option value="gemini-2.5-pro-preview-03-25">gemini-2.5-pro-preview-03-25</option> | 3195 | <option value="gemini-2.5-pro-preview-03-25">gemini-2.5-pro-preview-03-25</option> |
| 3195 | <option value="gemini-2.5-pro-exp-03-25">gemini-2.5-pro-exp-03-25</option> | 3196 | <option value="gemini-2.5-pro-exp-03-25">gemini-2.5-pro-exp-03-25</option> |
| @@ -3336,6 +3337,7 @@ | |||
| 3336 | 3337 | ||
| 3337 | <!-- Full Version Models --> | 3338 | <!-- Full Version Models --> |
| 3338 | <optgroup id="vertexai_full_gemini_25" label="Gemini 2.5" data-mode="full"> | 3339 | <optgroup id="vertexai_full_gemini_25" label="Gemini 2.5" data-mode="full"> |
| 3340 | <option value="gemini-2.5-pro-preview-06-05">gemini-2.5-pro-preview-06-05</option> | ||
| 3339 | <option value="gemini-2.5-pro-preview-05-06">gemini-2.5-pro-preview-05-06</option> | 3341 | <option value="gemini-2.5-pro-preview-05-06">gemini-2.5-pro-preview-05-06</option> |
| 3340 | <option value="gemini-2.5-pro-preview-03-25">gemini-2.5-pro-preview-03-25</option> | 3342 | <option value="gemini-2.5-pro-preview-03-25">gemini-2.5-pro-preview-03-25</option> |
| 3341 | <option value="gemini-2.5-pro-exp-03-25">gemini-2.5-pro-exp-03-25</option> | 3343 | <option value="gemini-2.5-pro-exp-03-25">gemini-2.5-pro-exp-03-25</option> |
| @@ -85,6 +85,7 @@ | |||
| 85 | <option data-type="anthropic" value="claude-3-opus-20240229">claude-3-opus-20240229</option> | 85 | <option data-type="anthropic" value="claude-3-opus-20240229">claude-3-opus-20240229</option> |
| 86 | <option data-type="anthropic" value="claude-3-sonnet-20240229">claude-3-sonnet-20240229</option> | 86 | <option data-type="anthropic" value="claude-3-sonnet-20240229">claude-3-sonnet-20240229</option> |
| 87 | <option data-type="anthropic" value="claude-3-haiku-20240307">claude-3-haiku-20240307</option> | 87 | <option data-type="anthropic" value="claude-3-haiku-20240307">claude-3-haiku-20240307</option> |
| 88 | <option data-type="google" value="gemini-2.5-pro-preview-06-05">gemini-2.5-pro-preview-06-05</option> | ||
| 88 | <option data-type="google" value="gemini-2.5-pro-preview-05-06">gemini-2.5-pro-preview-05-06</option> | 89 | <option data-type="google" value="gemini-2.5-pro-preview-05-06">gemini-2.5-pro-preview-05-06</option> |
| 89 | <option data-type="google" value="gemini-2.5-pro-preview-03-25">gemini-2.5-pro-preview-03-25</option> | 90 | <option data-type="google" value="gemini-2.5-pro-preview-03-25">gemini-2.5-pro-preview-03-25</option> |
| 90 | <option data-type="google" value="gemini-2.5-pro-exp-03-25">gemini-2.5-pro-exp-03-25</option> | 91 | <option data-type="google" value="gemini-2.5-pro-exp-03-25">gemini-2.5-pro-exp-03-25</option> |
| @@ -116,6 +117,7 @@ | |||
| 116 | <option data-type="google" value="gemini-1.5-flash-8b-exp-0827">gemini-1.5-flash-8b-exp-0827</option> | 117 | <option data-type="google" value="gemini-1.5-flash-8b-exp-0827">gemini-1.5-flash-8b-exp-0827</option> |
| 117 | <option data-type="google" value="learnlm-2.0-flash-experimental">learnlm-2.0-flash-experimental</option> | 118 | <option data-type="google" value="learnlm-2.0-flash-experimental">learnlm-2.0-flash-experimental</option> |
| 118 | <option data-type="google" value="learnlm-1.5-pro-experimental">learnlm-1.5-pro-experimental</option> | 119 | <option data-type="google" value="learnlm-1.5-pro-experimental">learnlm-1.5-pro-experimental</option> |
| 120 | <option data-type="vertexai" value="gemini-2.5-pro-preview-06-05">gemini-2.5-pro-preview-06-05</option> | ||
| 119 | <option data-type="vertexai" value="gemini-2.5-pro-preview-05-06">gemini-2.5-pro-preview-05-06</option> | 121 | <option data-type="vertexai" value="gemini-2.5-pro-preview-05-06">gemini-2.5-pro-preview-05-06</option> |
| 120 | <option data-type="vertexai" value="gemini-2.5-pro-preview-03-25">gemini-2.5-pro-preview-03-25</option> | 122 | <option data-type="vertexai" value="gemini-2.5-pro-preview-03-25">gemini-2.5-pro-preview-03-25</option> |
| 121 | <option data-type="vertexai" value="gemini-2.5-flash-preview-05-20">gemini-2.5-flash-preview-05-20</option> | 123 | <option data-type="vertexai" value="gemini-2.5-flash-preview-05-20">gemini-2.5-flash-preview-05-20</option> |
| @@ -414,7 +414,6 @@ async function sendMakerSuiteRequest(request, response) { | |||
| 414 | ]; | 414 | ]; |
| 415 | 415 | ||
| 416 | const isThinkingConfigModel = m => /^gemini-2.5-(flash|pro)/.test(m); | 416 | const isThinkingConfigModel = m => /^gemini-2.5-(flash|pro)/.test(m); |
| 417 | const isThinkingBudgetModel = m => /^gemini-2.5-flash/.test(m); | ||
| 418 | 417 | ||
| 419 | const noSearchModels = [ | 418 | const noSearchModels = [ |
| 420 | 'gemini-2.0-flash-lite', | 419 | 'gemini-2.0-flash-lite', |
| @@ -470,12 +469,10 @@ async function sendMakerSuiteRequest(request, response) { | |||
| 470 | if (isThinkingConfigModel(model)) { | 469 | if (isThinkingConfigModel(model)) { |
| 471 | const thinkingConfig = { includeThoughts: includeReasoning }; | 470 | const thinkingConfig = { includeThoughts: includeReasoning }; |
| 472 | 471 | ||
| 473 | if (isThinkingBudgetModel(model)) { | 472 | const thinkingBudget = calculateGoogleBudgetTokens(generationConfig.maxOutputTokens, reasoningEffort, model); |
| 474 | const thinkingBudget = calculateGoogleBudgetTokens(generationConfig.maxOutputTokens, reasoningEffort); | ||
| 475 | if (Number.isInteger(thinkingBudget)) { | 473 | if (Number.isInteger(thinkingBudget)) { |
| 476 | thinkingConfig.thinkingBudget = thinkingBudget; | 474 | thinkingConfig.thinkingBudget = thinkingBudget; |
| 477 | } | 475 | } |
| 478 | } | ||
| 479 | 476 | ||
| 480 | generationConfig.thinkingConfig = thinkingConfig; | 477 | generationConfig.thinkingConfig = thinkingConfig; |
| 481 | } | 478 | } |
| @@ -992,9 +992,11 @@ export function calculateClaudeBudgetTokens(maxTokens, reasoningEffort, stream) | |||
| 992 | * Calculate the Google budget tokens for a given reasoning effort. | 992 | * Calculate the Google budget tokens for a given reasoning effort. |
| 993 | * @param {number} maxTokens Maximum tokens | 993 | * @param {number} maxTokens Maximum tokens |
| 994 | * @param {string} reasoningEffort Reasoning effort | 994 | * @param {string} reasoningEffort Reasoning effort |
| 995 | * @param {string} model Model name | ||
| 995 | * @returns {number?} Budget tokens | 996 | * @returns {number?} Budget tokens |
| 996 | */ | 997 | */ |
| 997 | export function calculateGoogleBudgetTokens(maxTokens, reasoningEffort) { | 998 | export function calculateGoogleBudgetTokens(maxTokens, reasoningEffort, model) { |
| 999 | function getFlashBudget() { | ||
| 998 | let budgetTokens = 0; | 1000 | let budgetTokens = 0; |
| 999 | 1001 | ||
| 1000 | switch (reasoningEffort) { | 1002 | switch (reasoningEffort) { |
| @@ -1021,3 +1023,42 @@ export function calculateGoogleBudgetTokens(maxTokens, reasoningEffort) { | |||
| 1021 | 1023 | ||
| 1022 | return budgetTokens; | 1024 | return budgetTokens; |
| 1023 | } | 1025 | } |
| 1026 | |||
| 1027 | function getProBudget() { | ||
| 1028 | let budgetTokens = 0; | ||
| 1029 | |||
| 1030 | switch (reasoningEffort) { | ||
| 1031 | case REASONING_EFFORT.auto: | ||
| 1032 | return null; | ||
| 1033 | case REASONING_EFFORT.min: | ||
| 1034 | budgetTokens = 128; | ||
| 1035 | break; | ||
| 1036 | case REASONING_EFFORT.low: | ||
| 1037 | budgetTokens = Math.floor(maxTokens * 0.1); | ||
| 1038 | break; | ||
| 1039 | case REASONING_EFFORT.medium: | ||
| 1040 | budgetTokens = Math.floor(maxTokens * 0.25); | ||
| 1041 | break; | ||
| 1042 | case REASONING_EFFORT.high: | ||
| 1043 | budgetTokens = Math.floor(maxTokens * 0.5); | ||
| 1044 | break; | ||
| 1045 | case REASONING_EFFORT.max: | ||
| 1046 | budgetTokens = maxTokens; | ||
| 1047 | break; | ||
| 1048 | } | ||
| 1049 | |||
| 1050 | budgetTokens = Math.max(Math.min(budgetTokens, 32768), 128); | ||
| 1051 | |||
| 1052 | return budgetTokens; | ||
| 1053 | } | ||
| 1054 | |||
| 1055 | if (model.includes('flash')) { | ||
| 1056 | return getFlashBudget(); | ||
| 1057 | } | ||
| 1058 | |||
| 1059 | if (model.includes('pro')) { | ||
| 1060 | return getProBudget(); | ||
| 1061 | } | ||
| 1062 | |||
| 1063 | return null; | ||
| 1064 | } | ||