Skip to content

fix(sdk): lazily load optional gRPC transport - #647

Closed
simonyang08 wants to merge 1 commit into
openagents-org:developfrom
simonyang08:codex/openagents-563
Closed

simonyang08 wants to merge 1 commit into
openagents-org:developfrom
simonyang08:codex/openagents-563

Conversation

@simonyang08

@simonyang08 simonyang08 commented Aug 28, 2026 •

Copy link
Copy Markdown

Summary

  • Keep non-gRPC SDK transports importable without the optional grpcio dependency.
  • Load gRPC exports only when callers explicitly request them.
  • Preserve the existing installation guidance when gRPC is explicitly selected.

This PR addresses the current SDK optional-dependency contract on develop. Issue #563 described an obsolete Docker image path and is not claimed as the active bug basis.

Validation

  • Current develop baseline reproduces an import failure without grpcio.
  • Focused optional-gRPC regression passes after the change.
  • Explicit gRPC import still returns the existing pip install openagents[sdk] guidance.
  • Ruff passes for the changed transport module and regression test.
  • compileall passes for all changed files.

AI disclosure

This change was prepared with OpenAI Codex assistance and reviewed and validated locally by the contributor.

@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

@ppt5928-dot is attempting to deploy a commit to the Raphael's projects Team on Vercel.

A member of the Team first needs to authorize it.

@zomux

zomux commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Closing this draft as part of clearing the queue; it has been sitting in draft state without updates since Sep 2. To be clear, the underlying problem is real and still present on develop: grpcio is only an optional extra in pyproject, yet sdk/openagents/sdk/transports/init.py imports the gRPC transport eagerly, so the non-gRPC transports are unimportable without it. If you'd like to carry this forward, please open a fresh non-draft PR rebased on current develop with the lazy-export approach from this branch (the getattr shim plus the direct .transports.grpc imports in topology.py) and we'll review it promptly. Thanks for the thorough validation notes here.

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