Why this matters
The Milestone-40 consuming-app recipe — pip install gaia-agent-email 'amd-gaia[api]', then gaia api — crashes at server startup with core at main, before serving a single request: ModuleNotFoundError: No module named 'keyring'. Released 0.20.1 masks the bug (its server never imports the email wheel's router), so the moment the next core release ships, the partner path goes from "works but heuristic" to "won't start". This must land before the v0.21.0 release tag.
Found during real-world verification of the partner share path (#1602 follow-up) on a Linux machine with a Radeon dGPU: a cold venv with the wheel + core@main failed exactly this way; after hand-installing keyring, LLM triage worked end-to-end against local Lemonade (Gemma-4-E4B on GPU, planted facts echoed).
Root cause
openai_server.py on main auto-mounts the email wheel's REST router whenever gaia_agent_email is importable. That router's import chain reaches a module-level import keyring:
gaia.api.openai_server → gaia_agent_email.api_routes → summarize_tools
→ gmail_backend → gaia.connectors.api → flow → store (src/gaia/connectors/store.py:38)
But keyring is declared only in the ui and dev extras (setup.py:133, setup.py:194) — not in core install_requires and not in [api]. So the documented [api] install is missing a package its own startup path imports.
Repro
python3 -m venv venv && . venv/bin/activate
pip install 'amd-gaia[api] @ git+https://github.com/amd/gaia@main' gaia-agent-email
gaia api
# → ModuleNotFoundError: No module named 'keyring' (from gaia/connectors/store.py:38)
Fix options
- Add
keyring>=24.0.0,<26.0.0 to the api extra — one line, matches how [ui] carries it. Smallest correct fix.
- Add it to core
install_requires — heavier (pulls SecretStorage/cryptography/jeepney on Linux) but makes a bare install robust.
- Make the import lazy in
gaia/connectors/store.py — triage-only deployments (no Gmail OAuth) then don't need OAuth deps at all. Nicer layering, but changes import semantics and needs a loud, actionable error at first real use.
Acceptance criteria
Related
#1602 (verification that surfaced this), #1590 (the LLM triage REST router), #1597 (partner integration guide), #915 (keyring for OAuth token storage), #1179 (distribution)
Why this matters
The Milestone-40 consuming-app recipe —
pip install gaia-agent-email 'amd-gaia[api]', thengaia api— crashes at server startup with core atmain, before serving a single request:ModuleNotFoundError: No module named 'keyring'. Released 0.20.1 masks the bug (its server never imports the email wheel's router), so the moment the next core release ships, the partner path goes from "works but heuristic" to "won't start". This must land before the v0.21.0 release tag.Found during real-world verification of the partner share path (#1602 follow-up) on a Linux machine with a Radeon dGPU: a cold venv with the wheel + core@main failed exactly this way; after hand-installing
keyring, LLM triage worked end-to-end against local Lemonade (Gemma-4-E4B on GPU, planted facts echoed).Root cause
openai_server.pyonmainauto-mounts the email wheel's REST router whenevergaia_agent_emailis importable. That router's import chain reaches a module-levelimport keyring:But
keyringis declared only in theuianddevextras (setup.py:133,setup.py:194) — not in coreinstall_requiresand not in[api]. So the documented[api]install is missing a package its own startup path imports.Repro
Fix options
keyring>=24.0.0,<26.0.0to theapiextra — one line, matches how[ui]carries it. Smallest correct fix.install_requires— heavier (pulls SecretStorage/cryptography/jeepney on Linux) but makes a bare install robust.gaia/connectors/store.py— triage-only deployments (no Gmail OAuth) then don't need OAuth deps at all. Nicer layering, but changes import semantics and needs a loud, actionable error at first real use.Acceptance criteria
amd-gaia[api]at the fixed ref →gaia apistarts andPOST /v1/email/triageserves LLM triage with zero manual package installs.mainbefore the v0.21.0 release tag is cut.Related
#1602 (verification that surfaced this), #1590 (the LLM triage REST router), #1597 (partner integration guide), #915 (keyring for OAuth token storage), #1179 (distribution)