feat: add effort dropdown for claude 4.5 opus (backend) (#6351)
* feat: add effort support (backend) * fix test_agent_state_schema_unchanged --------- Co-authored-by: Ari Webb <ari@letta.com>
This commit is contained in:
@@ -441,6 +441,9 @@ class LLMConfig(BaseModel):
|
||||
config.put_inner_thoughts_in_kwargs = False
|
||||
if 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 = False
|
||||
if 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 summary
|
||||
config.put_inner_thoughts_in_kwargs = True
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user