Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: add effort dropdown for claude 4.5 opus (backend) (#6351)
Ari Webbce2ca8660b36
diff --git a/letta/schemas/llm_config.py b/letta/schemas/llm_config.pyindex 937c3931c..cd9d867f3 100644--- a/letta/schemas/llm_config.py+++ b/letta/schemas/llm_config.py@@ -441,6 +441,9 @@ class LLMConfig(BaseModel):config.put_inner_thoughts_in_kwargs = Falseif config.enable_reasoner and config.max_reasoning_tokens == 0:config.max_reasoning_tokens = 1024+ # Set default effort level for Claude Opus 4.5+ if config.model.startswith("claude-opus-4-5") and config.effort is None:+ config.effort = "medium"return config# Google Gemini 2.5 Pro and Gemini 3: not possible to disable@@ -495,6 +498,9 @@ class LLMConfig(BaseModel):config.put_inner_thoughts_in_kwargs = Falseif config.max_reasoning_tokens == 0:config.max_reasoning_tokens = 1024+ # Set default effort level for Claude Opus 4.5+ if config.model.startswith("claude-opus-4-5") and config.effort is None:+ config.effort = "medium"elif cls.is_google_vertex_reasoning_model(config) or cls.is_google_ai_reasoning_model(config):# Handle as non-reasoner until we support summaryconfig.put_inner_thoughts_in_kwargs = Truediff --git a/letta/schemas/model.py b/letta/schemas/model.pyindex ba2d92b11..2d02e4f70 100644--- a/letta/schemas/model.py+++ b/letta/schemas/model.py@@ -112,6 +112,7 @@ class Model(LLMConfig, ModelBase):enable_reasoner=llm_config.enable_reasoner,reasoning_effort=llm_config.reasoning_effort,max_reasoning_tokens=llm_config.max_reasoning_tokens,+ effort=llm_config.effort,frequency_penalty=llm_config.frequency_penalty,compatibility_type=llm_config.compatibility_type,verbosity=llm_config.verbosity,diff --git a/tests/managers/test_agent_manager.py b/tests/managers/test_agent_manager.pyindex d463673be..6361e4066 100644--- a/tests/managers/test_agent_manager.py+++ b/tests/managers/test_agent_manager.py@@ -1541,6 +1541,7 @@ async def test_agent_state_schema_unchanged(server: SyncServer):"max_tokens","enable_reasoner","reasoning_effort",+ "effort","max_reasoning_tokens","frequency_penalty","compatibility_type",