fix(adk): langgraph graph nodes look up tools by the wrong names and always fail - #41
fix(adk): langgraph graph nodes look up tools by the wrong names and always fail#41yakimoto wants to merge 1 commit into
Conversation
…always fail
createStreamMonitorNode and createClipNode searched for "monitor_stream" and "create_clip", but AgentToolkit names every tool with a wave_ prefix. Neither lookup could succeed, so both nodes returned { error: "<name> tool not found" } on every invocation and never made a network call.
This is live in the published package: grepping @wave-av/adk@1.0.14 from the npm registry finds both "monitor_stream tool not found" and "create_clip tool not found" in dist/index.cjs.
Adds regression tests that assert the ABSENCE of that error. Verified they are not vacuous: reintroducing the old names fails both (2 failed | 8 passed), restoring the fix passes 10/10. A shape-only test misses this entirely, which is how it shipped.
The sibling livekit adapter already used the correct wave_monitor_stream, which is why this stayed isolated to langgraph.
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_1da30505-9aac-4965-8361-7a759d2dafea) |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 53 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
createStreamMonitorNodeandcreateClipNodelook up their tool by name — with the wrong names.AgentToolkit.getTools()prefixes every tool withwave_, so neither lookup can succeed. Both nodes fall into theirif (!tool)branch on every invocation, return an error object, and never make a network call. Anyone wiringcreateStreamMonitorNodeinto a LangGraphStateGraphgets a node that silently does nothing.This is live on npm
Not theoretical — it's in the published artifact today:
Regression tests, proven non-vacuous
The existing
adapters.test.tsonly asserts the shape ofcreateLangGraphTools— nothing invoked the two graph-node factories, which is exactly why this shipped. The new tests assert the absence of thetool not founderror.I verified they actually catch it rather than passing for free:
Verification
The sibling LiveKit adapter already used the correct
wave_monitor_stream, which is why this stayed isolated to the LangGraph adapter.Related — please read, it's bigger than this PR
While tracing this I found that
@wave-av/adkexists in three places and this repo is the one that actually publishes:wave-av/sdks→sdk-typescript/packages/adkpublish-npm.yml, matches the npm artifactwave-av/wave-surfer-connect→packages/adkwave-av/adk(standalone repo)publish.yml, but is 12 versions behindThe standalone
wave-av/adkrepo is a stale fork: single-entry build, noERROR-CODES.md, and its.wave/repo.jsondescribes a package that is not the one on npm — it declares the 6 subpath exports asplanned/"not built", when this repo builds and ships all six. I opened wave-av/adk#59 against that fork before realising it doesn't publish; this PR is the one that fixes what users install. Filing the fork problem separately.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Low Risk
Small naming fix in the LangGraph adapter with targeted regression tests; no auth or data-model changes.
Overview
Fixes LangGraph graph nodes that never ran WAVE tools because
createStreamMonitorNodeandcreateClipNodelooked upmonitor_streamandcreate_clipwhileAgentToolkitregisterswave_monitor_streamandwave_create_clip. Every invocation hit the “tool not found” branch and skipped the handler.The adapter now uses the prefixed names and aligns error strings with those lookups. Regression tests invoke both node factories and assert
erroris absent and expected state fields are set—replacing shape-only coverage that let the bug ship in@wave-av/adk@1.0.14.Reviewed by Cursor Bugbot for commit 76fc70e. Configure here.
Summary by cubic
Fixes a live bug in
@wave-av/adkwhere LangGraph nodes failed to resolve their tools and always returned “tool not found.” Nodes now find the correctwave_-prefixed tools and execute as expected.createStreamMonitorNodenow looks upwave_monitor_stream(wasmonitor_stream).createClipNodenow looks upwave_create_clip(wascreate_clip).Written for commit 76fc70e. Summary will update on new commits.