Repository navigation
Remove agent_params from LLM operators so they cannot run tools - #74721
Merged
Merged
Conversation
LLMOperator and the operators built on it pass agent_params straight to pydantic-ai's Agent, so tools, toolsets or capabilities turned a single model call into an agent loop without AgentOperator's tool approval, durable replay or tool logging. Replace agent_params with typed model_settings and output_retries arguments; AgentOperator keeps agent_params.
vatsrahul1001
approved these changes
Oct 14, 2026
This was referenced Oct 14, 2026
Contributor
|
Hi @potiuk, I'd like to independently verify #74721 against common.ai 1.0.0rc1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LLMOperatorand the operators built on it (LLMBranchOperator,LLMSQLQueryOperator,LLMFileAnalysisOperator,LLMSchemaCompareOperator) are documented as one prompt in, one output back, withAgentOperatoras the operator for a tool-call loop. Nothing enforced that.agent_paramswent straight to pydantic-ai'sAgent(...), and both theLLMOperatordocstring andoperators/llm.rstlistedtoolsas something to pass there. On main,LLMOperator(..., agent_params={"tools": [lookup_order]})calls the tool and makes a second model request. That is an agent without whatAgentOperatorgives one: per-tool approval,durablereplay, tool call logging, and connection templating for toolsets.This removes
agent_paramsfrom the LLM operators and their@task.llm*decorators, and adds two typed arguments for what a single call needs:model_settings: pydantic-aiModelSettingssuch astemperatureormax_tokens, templated asagent_paramswas.output_retries: how many times the model is asked again when its output fails validation. It is passed as pydantic-ai's integerretries, so it behaves like the oldagent_params={"retries": n}.Every LLM operator now builds its agent through
LLMOperator._create_agent, which forwards only those two, so no function tool, toolset or capability can be registered.AgentOperatorand@task.agentkeepagent_params.model_settingscannot add your tools, but one provider setting turns on a provider-hosted tool. The generic tool keys (tool_choice,parallel_tool_calls) only choose among tools the agent already has. OpenAI'sopenai_native_toolsenables web search or file search, which OpenAI runs on its side; nothing executes in the task. The docs say this rather than the operator rejecting the key, because a list of rejected provider keys would go stale as providers add settings.This is a Common AI 1.0 change, so there is no deprecation period: passing
agent_paramsto an LLM operator now fails when the Dag is parsed. The changelog andoperators/llm.rstcarry the mapping:agent_params={"model_settings": {...}}model_settings={...}agent_params={"retries": n}output_retries=ntools,toolsets,capabilitiesorspec_fileinagent_paramsAgentOperatoror@task.agent