Files
letta-server/letta/llm_api/google_constants.py
Kevin Lin bd5b5fa9f3 feat(gemini): add 3.1 pro preview support (#9553)
Add 3.1 model metadata for Google AI and update Gemini tests/examples to use the new handle.

👾 Generated with [Letta Code](https://letta.com)

Co-authored-by: Letta <noreply@letta.com>
2026-02-24 10:55:11 -08:00

25 lines
912 B
Python

GOOGLE_MODEL_TO_CONTEXT_LENGTH = {
"gemini-3-pro-preview": 1048576,
"gemini-3.1-pro-preview": 1048576,
"gemini-3-flash-preview": 1048576,
"gemini-2.5-pro": 1048576,
"gemini-2.5-flash": 1048576,
"gemini-live-2.5-flash": 1048576,
"gemini-2.0-flash-001": 1048576,
"gemini-2.0-flash-lite-001": 1048576,
# The following are either deprecated or discontinued.
"gemini-2.5-pro-exp-03-25": 1048576,
"gemini-2.5-flash-preview-04-17": 1048576,
"gemini-2.0-pro-exp-02-05": 2097152,
"gemini-2.0-flash-lite-preview-02-05": 1048576,
"gemini-2.0-flash-thinking-exp-01-21": 1048576,
"gemini-1.5-flash": 1048576,
"gemini-1.5-pro": 2097152,
"gemini-1.0-pro": 32760,
"gemini-1.0-pro-vision": 16384,
}
GOOGLE_EMBEDING_MODEL_TO_DIM = {"text-embedding-005": 768, "text-multilingual-embedding-002": 768}
GOOGLE_MODEL_FOR_API_KEY_CHECK = "gemini-2.0-flash-lite"