Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

fix: initialize model attribute in SimpleGeminiStreamingInterface (#10306)

Cameron09c951437f9b
diff --git a/letta/adapters/simple_llm_stream_adapter.py b/letta/adapters/simple_llm_stream_adapter.py
index af6cf9e61..b826c96c7 100644
--- a/letta/adapters/simple_llm_stream_adapter.py
+++ b/letta/adapters/simple_llm_stream_adapter.py
@@ -129,6 +129,7 @@ class SimpleLLMStreamAdapter(LettaLLMStreamAdapter):
)
elif self.llm_config.model_endpoint_type in [ProviderType.google_ai, ProviderType.google_vertex]:
self.interface = SimpleGeminiStreamingInterface(
+ model=self.llm_config.model,
requires_approval_tools=requires_approval_tools,
run_id=self.run_id,
step_id=step_id,
diff --git a/letta/interfaces/gemini_streaming_interface.py b/letta/interfaces/gemini_streaming_interface.py
index 21c8ddf33..dd725d775 100644
--- a/letta/interfaces/gemini_streaming_interface.py
+++ b/letta/interfaces/gemini_streaming_interface.py
@@ -46,6 +46,7 @@ class SimpleGeminiStreamingInterface:
def __init__(
self,
+ model: str | None = None,
requires_approval_tools: list = [],
run_id: str | None = None,
step_id: str | None = None,
@@ -77,7 +78,7 @@ class SimpleGeminiStreamingInterface:
# Premake IDs for database writes
self.letta_message_id = Message.generate_id()
- # self.model = model
+ self.model = model
# Sadly, Gemini's encrypted reasoning logic forces us to store stream parts in state
self.content_parts: List[ReasoningContent | TextContent | ToolCallContent] = []