feat: bring back model_settings and remove validation again (#6104)

This commit is contained in:
Sarah Wooders
2025-11-11 14:49:15 -08:00
committed by Caren Thomas
parent bd5f684346
commit 6eeb3c90bb
9 changed files with 298 additions and 270 deletions

View File

@@ -285,7 +285,9 @@ class Agent(SqlalchemyBase, OrganizationMixin, ProjectMixin, TemplateEntityMixin
if resolver:
state[field_name] = resolver()
state["model"] = self.llm_config._to_model() if self.llm_config else None
state["model"] = self.llm_config.handle if self.llm_config else None
state["model_settings"] = self.llm_config._to_model_settings() if self.llm_config else None
state["embedding"] = self.embedding_config.handle if self.embedding_config else None
return self.__pydantic_model__(**state)
@@ -425,6 +427,8 @@ class Agent(SqlalchemyBase, OrganizationMixin, ProjectMixin, TemplateEntityMixin
state["managed_group"] = multi_agent_group
state["tool_exec_environment_variables"] = tool_exec_environment_variables
state["secrets"] = tool_exec_environment_variables
state["model"] = self.llm_config._to_model() if self.llm_config else None
state["model"] = self.llm_config.handle if self.llm_config else None
state["model_settings"] = self.llm_config._to_model_settings() if self.llm_config else None
state["embedding"] = self.embedding_config.handle if self.embedding_config else None
return self.__pydantic_model__(**state)