Skip to content

feat: suppress SSE events for internal graph nodes - #222

Merged
sauagarwa merged 1 commit into
rh-ai-quickstart:mainfrom
ganeshmurthy:pr-204-1
Jul 15, 2026
Merged

feat: suppress SSE events for internal graph nodes#222
sauagarwa merged 1 commit into
rh-ai-quickstart:mainfrom
ganeshmurthy:pr-204-1

Conversation

@ganeshmurthy

Copy link
Copy Markdown
Collaborator

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)

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)
@sauagarwa
sauagarwa merged commit d249b66 into rh-ai-quickstart:main Jul 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants