From a5bac26556441e8fd31dac2e641a24caf8ae7f42 Mon Sep 17 00:00:00 2001 From: jnjpng Date: Tue, 3 Mar 2026 16:26:45 -0800 Subject: [PATCH] fix: add "max" to AnthropicModelSettings effort type (#9754) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: add "max" to AnthropicModelSettings effort type The effort field on AnthropicModelSettings only accepted "low" | "medium" | "high", but the LLMConfig.effort field and the Anthropic API both support "max" for Opus 4.6. This type mismatch caused Pydantic validation to reject conversation updates that set effort to "max" (mapped from xhigh in letta-code). 🐾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code * generate --------- Co-authored-by: Letta Code --- fern/openapi.json | 4 ++-- letta/schemas/model.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fern/openapi.json b/fern/openapi.json index cef851d4..936b8c59 100644 --- a/fern/openapi.json +++ b/fern/openapi.json @@ -28104,14 +28104,14 @@ "anyOf": [ { "type": "string", - "enum": ["low", "medium", "high"] + "enum": ["low", "medium", "high", "max"] }, { "type": "null" } ], "title": "Effort", - "description": "Effort level for Opus 4.5 model (controls token conservation). Not setting this gives similar performance to 'high'." + "description": "Effort level for supported Anthropic models (controls token spending). 'max' is only available on Opus 4.6. Not setting this gives similar performance to 'high'." }, "strict": { "type": "boolean", diff --git a/letta/schemas/model.py b/letta/schemas/model.py index fa1c14cb..621bd4f0 100644 --- a/letta/schemas/model.py +++ b/letta/schemas/model.py @@ -282,10 +282,10 @@ class AnthropicModelSettings(ModelSettings): description="Soft control for how verbose model output should be, used for GPT-5 models.", ) - # Opus 4.5 effort parameter - effort: Optional[Literal["low", "medium", "high"]] = Field( + # Effort parameter for Opus 4.5, Opus 4.6, and Sonnet 4.6 + effort: Optional[Literal["low", "medium", "high", "max"]] = Field( None, - description="Effort level for Opus 4.5 model (controls token conservation). Not setting this gives similar performance to 'high'.", + description="Effort level for supported Anthropic models (controls token spending). 'max' is only available on Opus 4.6. Not setting this gives similar performance to 'high'.", ) # Anthropic supports strict mode for tool calling - defaults to False