Python: Remove unused AG-UI orchestration helpers and flatten subpackage - #7426
Open
moonbox3 wants to merge 3 commits into
Open
Python: Remove unused AG-UI orchestration helpers and flatten subpackage#7426moonbox3 wants to merge 3 commits into
moonbox3 wants to merge 3 commits into
Conversation
The _orchestration/_helpers module had no production callers; its only importer was its own test file. It also carried a stale fork of the live metadata sanitization in _agent_run.py: the dead copy truncated oversized values, behavior the live copy deliberately replaced with drop-plus-warning because truncation can produce invalid JSON. Move _tooling.py and _predictive_state.py to the package root and remove the now-empty _orchestration subpackage. Public exports are unchanged.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR cleans up the Python AG-UI integration package by removing an unused orchestration helpers module (and its tests) and flattening the package structure by moving the remaining orchestration modules to the package root. This reduces dead/duplicated code and eliminates the _orchestration path segment while keeping runtime behavior and public exports unchanged.
Changes:
- Deleted
agent_framework_ag_ui._orchestration._helpersand its dedicated test file (test_helpers.py). - Flattened the internal module layout by moving
_tooling.pyand_predictive_state.pytoagent_framework_ag_ui/and removing the_orchestration/subpackage. - Updated production and test import sites to the new module paths.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| python/packages/ag-ui/tests/ag_ui/test_tooling.py | Updates tooling imports to agent_framework_ag_ui._tooling. |
| python/packages/ag-ui/tests/ag_ui/test_run.py | Updates predictive state import to agent_framework_ag_ui._predictive_state. |
| python/packages/ag-ui/tests/ag_ui/test_run_common.py | Updates predictive state import to agent_framework_ag_ui._predictive_state. |
| python/packages/ag-ui/tests/ag_ui/test_predictive_state.py | Updates predictive state import to agent_framework_ag_ui._predictive_state. |
| python/packages/ag-ui/tests/ag_ui/test_helpers.py | Removes tests for the deleted dead helpers module. |
| python/packages/ag-ui/agent_framework_ag_ui/_tooling.py | Adds tooling helper module at package root (flattened layout). |
| python/packages/ag-ui/agent_framework_ag_ui/_run_common.py | Updates internal import to the flattened predictive state module. |
| python/packages/ag-ui/agent_framework_ag_ui/_predictive_state.py | Updates relative import after flattening (._utils). |
| python/packages/ag-ui/agent_framework_ag_ui/_agent_run.py | Updates imports to flattened predictive state/tooling modules. |
| python/packages/ag-ui/agent_framework_ag_ui/_orchestration/_helpers.py | Deletes unused orchestration helpers implementation. |
| python/packages/ag-ui/agent_framework_ag_ui/_orchestration/init.py | Removes now-unneeded subpackage initializer (subpackage removed). |
Contributor
Python Test Coverage Report •
Python Unit Test Overview
|
|||||||||||||||||||||||||||||||||||||||||||||
eavanvalkenburg
approved these changes
Jul 30, 2026
moonbox3
enabled auto-merge
July 30, 2026 09:41
Contributor
Author
|
@westey-m super simple one if you're able to take a look. Thanks! |
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.
Motivation & Context
The
agent_framework_ag_ui._orchestration._helpersmodule has no production callers. Its only importer anywhere in the repo is its own test file. It also carries a stale fork of the live metadata sanitization in_agent_run.py: the dead copy truncates oversized metadata values to 512 chars, while the live copy deliberately drops the key with a warning because truncation can produce invalid JSON. Keeping the dead copy around means 751 lines of code and tests certifying behavior nothing runs, and a divergent implementation waiting to mislead someone.Description & Review Guide
_orchestration/_helpers.py(247 lines, zero production callers) and its test filetest_helpers.py(504 lines)._tooling.pyand_predictive_state.pyfrom_orchestration/to the package root and remove the now-empty subpackage; the subpackage's__init__.pywas empty, so it provided a path segment and nothing else.from .._utilstofrom ._utils).Impact: none at runtime. Public exports are unchanged (
__all__is identical before and after, andtest_public_exports.pypasses), theagent_framework.ag_uifacade resolves as before, and the wheel builds cleanly with no_orchestrationremnants. All 890 ag-ui tests pass; ruff and pyright are clean; the 3 pre-existing mypy errors are identical on main.Review focus: confirm the deleted helpers have no callers you know of outside the repo, and that the flattened module locations look right.
Related Issue
Internal cleanup, no linked issue.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.