feat: suppress SSE events for internal graph nodes - #222
Merged
Conversation
Add `internal: true` flag to graph node configs to suppress intermediate output from appearing in user chat. Internal nodes still execute and pass data to downstream nodes, but their SSE events (node_started, response, node_completed) are filtered from the stream. Changes: - Add internal node detection in GraphEngine (explicit flag + auto-detect for nodes referenced only via items_path in mcp_tool_map) - Mark places_list_task as internal in vacation planner template since it only feeds destination_research_task via items_path - Fix node dependency ordering: add explicit depends_on for destination_research, hotel_research, and flight_research tasks - Remove incorrect dependencies from itinerary_options_task (was waiting for hotel/flight when it only needs destination research) - Add unit test test_internal_node_suppressed to verify SSE filtering This prevents raw JSON arrays and intermediate processing results from appearing in the user's chat while preserving the data flow between nodes. Test plan: pytest tests/unit/test_graph_engine.py passes (38 tests)
3 tasks
sauagarwa
approved these changes
Jul 15, 2026
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.
Add
internal: trueflag to graph node configs to suppress intermediate output from appearing in user chat. Internal nodes still execute and pass data to downstream nodes, but their SSE events (node_started, response, node_completed) are filtered from the stream.Changes:
This prevents raw JSON arrays and intermediate processing results from appearing in the user's chat while preserving the data flow between nodes.
Test plan: pytest tests/unit/test_graph_engine.py passes (38 tests)