A2UI icon indicating copy to clipboard operation
A2UI copied to clipboard

a2ui-agent-sdk 0.2.4: import fails with NameError: name 'models' is not defined (send_a2ui_to_client_toolset.py:281)

Open sunholo-voight-kampff opened this issue 1 month ago • 3 comments

Summary

a2ui-agent-sdk==0.2.4 (PyPI) fails at import:

$ python -I -c "import a2ui.adk.send_a2ui_to_client_toolset"
...
NameError: name 'models' is not defined

a2ui/adk/send_a2ui_to_client_toolset.py in the 0.2.4 wheel annotates llm_request: models.LlmRequest (line 281, in _SendA2uiJsonToClientTool.process_llm_request). The module only imports from google.adk.models import LlmRequest, and there is no from __future__ import annotations, so the class body raises when the module is imported.

It reproduces with google-adk 1.31.1, 1.39.1 and 2.12.0, and with google-genai 1.73 and 2.31. 0.2.1 is fine.

Why it matters

ag-ui-adk 0.8.0 and 0.9.0 require a2ui-agent-sdk>=0.2.4,<0.3.0. 0.2.4 is the only release in that range, so every app on ag-ui-adk ≥0.8 that imports the ADK toolset breaks.

It looks fixed on main: python/a2ui_adk/src/a2ui/adk/send_a2ui_to_client_toolset.py uses LlmRequest directly. But that fix isn't in any release a 0.2.x-capped consumer can install: a2ui-agent-sdk 0.9.0 no longer ships a2ui.adk, and a2ui-adk isn't on PyPI.

Ask

Either of these would unblock consumers:

  • a 0.2.5 patch release of a2ui-agent-sdk with the one-line annotation fix;
  • or publish the split a2ui-adk package, so downstream (ag-ui-adk) can move to it.

Found while upgrading a production ADK app (AG-UI stack to ag-ui-adk 0.9). Happy to test a release candidate.

sunholo-voight-kampff avatar Oct 17 '26 08:10 sunholo-voight-kampff

Downstream impact (ag-ui-adk cap): https://github.com/ag-ui-protocol/ag-ui/issues/3089

sunholo-voight-kampff avatar Oct 17 '26 08:10 sunholo-voight-kampff

Hi @sunholo-voight-kampff, thank you for reporting this issue. The split a2ui-adk package is now published on PyPI. Could you please check and let me know if you are still facing this issue?

hirematha avatar Oct 20 '26 14:10 hirematha

Closing as completed. Fixed on main in a2ui-adk by #3299 (commit fa8346d92) and published to PyPI.

🤖 Agent-generated

gspencergoog avatar Nov 02 '26 23:11 gspencergoog