feat: revert model_settings (#6089)

This commit is contained in:
Sarah Wooders
2025-11-10 16:39:01 -08:00
committed by Caren Thomas
parent bbffadc245
commit ddc87418f4
9 changed files with 235 additions and 263 deletions

View File

@@ -6,5 +6,5 @@
"model_wrapper": null,
"put_inner_thoughts_in_kwargs": true,
"enable_reasoner": true,
"max_reasoning_tokens": 1000
"max_reasoning_tokens": 20000
}

View File

@@ -1250,7 +1250,7 @@ async def test_agent_state_schema_unchanged(server: SyncServer):
from letta.schemas.group import Group
from letta.schemas.llm_config import LLMConfig
from letta.schemas.memory import Memory
from letta.schemas.model import ModelSettings
from letta.schemas.model import EmbeddingModelSettings, ModelSettings
from letta.schemas.response_format import ResponseFormatUnion
from letta.schemas.source import Source
from letta.schemas.tool import Tool
@@ -1271,10 +1271,9 @@ async def test_agent_state_schema_unchanged(server: SyncServer):
"agent_type": AgentType,
# LLM information
"llm_config": LLMConfig,
"model": str,
"embedding": str,
"model": ModelSettings,
"embedding": EmbeddingModelSettings,
"embedding_config": EmbeddingConfig,
"model_settings": ModelSettings,
"response_format": (ResponseFormatUnion, type(None)),
# State fields
"description": (str, type(None)),

View File

@@ -5,9 +5,11 @@ AGENTS_CREATE_PARAMS = [
"caren_agent",
{"name": "caren", "model": "openai/gpt-4o-mini", "embedding": "openai/text-embedding-3-small"},
{
# Verify model_settings is populated with config values
# Note: The 'model' field itself is separate from model_settings
"model_settings": {"max_output_tokens": 4096, "parallel_tool_calls": False}
# Verify model field contains the model name and settings
# Note: we override 'model' here since the input is a string but the output is a ModelSettings object
"model": {"model": "gpt-4o-mini", "max_output_tokens": 4096, "parallel_tool_calls": False},
# Note: we override 'embedding' here since it's currently not populated in AgentState (remains None)
"embedding": None,
},
None,
),
@@ -18,8 +20,8 @@ AGENTS_MODIFY_PARAMS = [
"caren_agent",
{"name": "caren_updated"},
{
# After modifying just the name, model_settings should still be present
"model_settings": {"max_output_tokens": 4096, "parallel_tool_calls": False}
# After modifying just the name, model field should still be present and unchanged
"model": {"model": "gpt-4o-mini", "max_output_tokens": 4096, "parallel_tool_calls": False}
},
None,
),