Repository navigation
fix: validate ComponentTool custom parameters - #13211
Conversation
|
@D1822787566 is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @D1822787566, thanks a lot for your contribution! 🙏 We noticed that the Contributor License Agreement (CLA) check ( To get your PR reviewed, please sign the CLA via the link in the |
|
Thanks for signing the CLA, @D1822787566! 🎉 This PR is now ready for review again and the reviewer has been re-assigned. |
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||
|
Hey @D1822787566 pinging to ask if you have time to work on this. |
Related Issues
Proposed Changes
ComponentToolskips invocation arguments that are not component inputs and logs the skipped names, preventing a lateKeyErrorfor extra custom-schema properties or arguments added by an LLM. Construction also warns about unknown properties in a customparametersschema.Custom schemas must cover mandatory component inputs unless they are supplied through
inputs_from_stateor injected asState. Missing inputs raise aValueErrorduring construction. This also covers anAgentToolcustom schema that omitsmessageswithout supplying it throughinputs_from_state.How did you test it?
hatch -e test run pytest test/tools/test_tool.py test/tools/test_component_tool.py test/tools/test_agent_tool.py -q --tb=short -o log_cli=falsehatch run test:types test/tools/test_component_tool.py test/tools/test_agent_tool.pyhatch run ruff check test/tools/test_component_tool.py test/tools/test_agent_tool.pyhatch run ruff format --check test/tools/test_component_tool.py test/tools/test_agent_tool.pygit diff --checkpassed.Notes for the reviewer
The follow-up separates sync and async tests into their respective classes and documents the AgentTool messages check in the release note. Two AgentTool tests verify both missing messages and messages provided through state. The follow-up changes tests and the release note only.
This PR was generated with an AI assistant.
Checklist