Add the Gemini 2.5 Pro Preview model (#1822)

This commit is contained in:
Peter Goldstein
2025-04-07 05:08:40 -04:00
committed by GitHub
parent 2410527e64
commit 0d852d6fdc
3 changed files with 8 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@llamaindex/google": patch
---
Add the Gemini 2.5 Pro Preview model
+2
View File
@@ -61,6 +61,7 @@ export const GEMINI_MODEL_INFO_MAP: Record<GEMINI_MODEL, GeminiModelInfo> = {
[GEMINI_MODEL.GEMINI_2_0_FLASH_LITE]: { contextWindow: 10 ** 6 },
[GEMINI_MODEL.GEMINI_2_0_FLASH_THINKING_EXP]: { contextWindow: 32768 },
[GEMINI_MODEL.GEMINI_2_0_PRO_EXPERIMENTAL]: { contextWindow: 2 * 10 ** 6 },
[GEMINI_MODEL.GEMINI_2_5_PRO_PREVIEW]: { contextWindow: 10 ** 6 },
};
export const SUPPORT_TOOL_CALL_MODELS: GEMINI_MODEL[] = [
@@ -77,6 +78,7 @@ export const SUPPORT_TOOL_CALL_MODELS: GEMINI_MODEL[] = [
GEMINI_MODEL.GEMINI_2_0_FLASH_EXPERIMENTAL,
GEMINI_MODEL.GEMINI_2_0_FLASH,
GEMINI_MODEL.GEMINI_2_0_PRO_EXPERIMENTAL,
GEMINI_MODEL.GEMINI_2_5_PRO_PREVIEW,
];
export const DEFAULT_GEMINI_PARAMS = {
+1
View File
@@ -73,6 +73,7 @@ export enum GEMINI_MODEL {
GEMINI_2_0_FLASH_LITE_PREVIEW = "gemini-2.0-flash-lite-preview-02-05",
GEMINI_2_0_FLASH_THINKING_EXP = "gemini-2.0-flash-thinking-exp-01-21",
GEMINI_2_0_PRO_EXPERIMENTAL = "gemini-2.0-pro-exp-02-05",
GEMINI_2_5_PRO_PREVIEW = "gemini-2.5-pro-preview-03-25",
}
export interface GeminiModelInfo {