Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
chore: enable flash and fix vertex integration (#2003)
Sarah Woodersa4da3c51926c
diff --git a/letta/llm_api/google_constants.py b/letta/llm_api/google_constants.pyindex 5215f69cb..c720a33ac 100644--- a/letta/llm_api/google_constants.py+++ b/letta/llm_api/google_constants.py@@ -1,5 +1,6 @@GOOGLE_MODEL_TO_CONTEXT_LENGTH = {"gemini-2.5-pro-exp-03-25": 1048576,+ "gemini-2.5-flash-preview-04-17": 1048576,"gemini-2.0-flash-001": 1048576,"gemini-2.0-pro-exp-02-05": 2097152,"gemini-2.0-flash-lite-preview-02-05": 1048576,diff --git a/letta/llm_api/google_vertex_client.py b/letta/llm_api/google_vertex_client.pyindex 15e610d43..4edd03b27 100644--- a/letta/llm_api/google_vertex_client.py+++ b/letta/llm_api/google_vertex_client.py@@ -110,12 +110,12 @@ class GoogleVertexClient(GoogleAIClient):for candidate in response.candidates:content = candidate.content- if "role" not in content or not content["role"]:- # This means the response is malformed like MALFORMED_FUNCTION_CALL- # NOTE: must be a ValueError to trigger a retry- raise ValueError(f"Error in response data from LLM: {response_data}")- role = content["role"]- assert role == "model", f"Unknown role in response: {role}"+ # if "role" not in content or not content["role"]:+ # # This means the response is malformed like MALFORMED_FUNCTION_CALL+ # # NOTE: must be a ValueError to trigger a retry+ # raise ValueError(f"Error in response data from LLM: {response_data}")+ # role = content["role"]+ # assert role == "model", f"Unknown role in response: {role}"parts = content.parts