[Enhancement] Support tools in LLM Node#60
Merged
psriramsnc merged 30 commits intomainfrom Nov 12, 2025
Merged
Conversation
… scratch/new_model_response
bidyapati-p
previously approved these changes
Nov 11, 2025
bidyapati-p
previously approved these changes
Nov 11, 2025
amitsnow
reviewed
Nov 11, 2025
zephyrzilla
approved these changes
Nov 11, 2025
vipul-mittal
approved these changes
Nov 12, 2025
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.
🚀 Support Tool Calls in LLM Node via New ModelResponse
🧩 Summary
This PR introduces comprehensive support for tool calls in the LLM Node by introducing a new
ModelResponseabstraction. It enables better agent-style evaluation, structured responses, and multi-modal compatibility — all while maintaining backward compatibility and clean integration across components.⚙️ Features Implemented
ModelResponseclass — All custom models now return a standardizedModelResponseobject from thegenerate_responsemethod.json_payloadas a boolean flag and allows custom headers via model config.user,assistant, andtoolroles in conversation state.convert_openai_to_langchain_toolcallutility — Simplifies tool call conversion for chat history injection.🚄 Performance Impact
Tool calls are now captured as part of the
ModelResponseand persisted in state.⚡ No significant performance impact expected.
🧪 How to Test
tasks/examples/llm_node_tool_simulation. Observe if tool_calls in LLM Node are being captured in the output data.graph_post_processin graph_config to run Graph Post processing job. Observe a new processed file with prefic as processor name being stored along with output file.📸 Screenshots
N/A
✅ Checklist
🗒️ Notes
This update lays the foundation for agentic model evaluation and structured response pipelines in the LLM Node, making it easier to benchmark tool-augmented models in complex workflows.