Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: make auto-mode work e2e (#9771)
cthomasccea05feb198
diff --git a/letta/agents/letta_agent_v3.py b/letta/agents/letta_agent_v3.pyindex baa159275..c92f452ae 100644--- a/letta/agents/letta_agent_v3.py+++ b/letta/agents/letta_agent_v3.py@@ -959,6 +959,9 @@ class LettaAgentV3(LettaAgentV2):put_inner_thoughts_first=True,actor=self.actor,)+ # Update the adapter to use the resolved client and config+ llm_adapter.llm_client = active_llm_client+ llm_adapter.llm_config = active_llm_configelse:active_llm_config = self.agent_state.llm_configactive_llm_client = self.llm_clientdiff --git a/letta/server/server.py b/letta/server/server.pyindex 23e2bf62e..f769f40bd 100644--- a/letta/server/server.py+++ b/letta/server/server.py@@ -1254,6 +1254,7 @@ class SyncServer(object):context_window=model.max_context_window or 180000,handle=model.handle,provider_name="letta",+ provider_category=ProviderCategory.base,max_tokens=8192,)llm_models.append(llm_config)diff --git a/letta/services/provider_manager.py b/letta/services/provider_manager.pyindex 2c8359488..5c245bc8a 100644--- a/letta/services/provider_manager.py+++ b/letta/services/provider_manager.py@@ -937,7 +937,7 @@ class ProviderManager:from letta.settings import model_settings- if model_settings.auto_mode_enabled and (model_type is None or model_type == "llm"):+ if model_settings.auto_mode_enabled and not provider_id and (model_type is None or model_type == "llm"):for handle in AUTO_MODE_HANDLES:# Generate deterministic 8-char hex ID from handlehandle_hash = hashlib.sha256(handle.encode()).hexdigest()[:8]