Conversation
Contributor
Package TarballHow to installnpm install https://github.com/aws/agentcore-cli/releases/download/pr-836-tarball/aws-agentcore-0.8.0.tgz |
02721fb to
efca79b
Compare
The LangGraph translator generates LangchainInstrumentor().instrument() in imported agents' main.py, but pyproject-generator.ts did not include opentelemetry-instrumentation-langchain in LANGGRAPH_DEPS. This causes imported LangGraph agents to crash at runtime with ModuleNotFoundError.
efca79b to
09e318a
Compare
avi-alpert
approved these changes
Apr 14, 2026
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.
Summary
Two related fixes for
opentelemetry-instrumentation-langchaindependency management:Import flow bug (ModuleNotFoundError):
LangGraphTranslatorgeneratesLangchainInstrumentor().instrument()in imported agents'main.py, butpyproject-generator.tsnever declared the dependency inLANGGRAPH_DEPS. WhensetupPythonProject()runsuv install, the package is missing, and the imported agent crashes at runtime withModuleNotFoundError: No module named 'opentelemetry.instrumentation.langchain'.Template version pin: feat: add auto-instrumentation to langchain agent template #835 added
opentelemetry-instrumentation-langchainto both LangChain templatepyproject.tomlfiles without a version constraint. Every other third-party dep in these files uses>= X.Y.Z. This pins it to>= 0.59.0for consistency.Files changed
src/cli/operations/agent/import/pyproject-generator.ts— addopentelemetry-instrumentation-langchain>=0.59.0toLANGGRAPH_DEPSsrc/cli/operations/agent/import/__tests__/translator.test.ts— add assertion that the dependency is present in generated LangGraph pyprojectsrc/assets/python/a2a/langchain_langgraph/base/pyproject.toml— pin>= 0.59.0src/assets/python/http/langchain_langgraph/base/pyproject.toml— pin>= 0.59.0src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap— updated snapshotsRelated Issue
Pre-existing bug in the import flow, discovered during review of #835.
Type of Change
Test plan
npx vitest run src/cli/operations/agent/import/__tests__/translator.test.ts— all 10 tests pass (including new assertion)npx vitest run src/assets/__tests__/assets.snapshot.test.ts— all 90 snapshot tests passnpm run build— compiles cleanly