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: respect enable_reasoner setting from .af imports instead of falling back to model defaults (#9163)

amysguan69cad47e6a7b
diff --git a/letta/services/agent_manager.py b/letta/services/agent_manager.py
index c8c656a8b..56b6a62f2 100644
--- a/letta/services/agent_manager.py
+++ b/letta/services/agent_manager.py
@@ -357,7 +357,11 @@ class AgentManager:
)
agent_create.llm_config = LLMConfig.apply_reasoning_setting_to_config(
agent_create.llm_config,
- agent_create.reasoning if agent_create.reasoning is not None else default_reasoning,
+ agent_create.reasoning
+ if agent_create.reasoning is not None
+ else (
+ agent_create.llm_config.enable_reasoner if agent_create.llm_config.enable_reasoner is not None else default_reasoning
+ ),
agent_create.agent_type,
)
else: