fix(langgraph): graph nodes look up tools by the wrong names and always fail - #59
fix(langgraph): graph nodes look up tools by the wrong names and always fail#59yakimoto wants to merge 1 commit into
Conversation
createStreamMonitorNode and createClipNode searched for "monitor_stream" and "create_clip", but AgentToolkit names them "wave_monitor_stream" and "wave_create_clip". Neither node could ever find its tool, so both returned { error: "<name> tool not found" } on every invocation and never made a network call.
Proven against the built package before the fix:
createStreamMonitorNode({}) -> {"error":"monitor_stream tool not found"}
createClipNode({}) -> {"error":"create_clip tool not found"}
and after, the handler is reached (it now rejects a non-uuid streamId in zod).
The sibling livekit adapter already used the correct wave_monitor_stream, which is why this was 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_dd148f74-26d7-4203-93e3-a0975080425d) |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 44 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 (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
|
Hold on merging this — it is correct, but it fixes a repo that does not publish. While tracing where LangGraph is actually used, I found
The published tarball contains The bug is genuinely live on npm — The fix that actually reaches users is wave-av/sdks#41, which carries the same four-line change plus regression tests that I verified are non-vacuous (reintroducing the old names fails 2/10; the fix passes 10/10). This repo's test suite cannot run at all — see #60 — so no equivalent test is possible here. The fork problem is filed as wave-av/sdks#42. Whether this PR merges or closes depends on which repo becomes the home:
Leaving it open pending that call rather than merging something that would read as "fixed" while npm stays broken. |
createStreamMonitorNodeandcreateClipNodelook up their tool by name — but with the wrong names.AgentToolkit.getTools()names every tool with awave_prefix, so neither lookup can ever 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.Proven against the built package on
main:After the fix the handler is actually reached — it now rejects the non-uuid
streamIdin zod, which is the tool running rather than the lookup failing:The sibling LiveKit adapter already used the correct
wave_monitor_stream, which is why this stayed isolated to the LangGraph adapter.Why this shipped
src/__tests__/adapters.test.tsasserts the shape ofcreateLangGraphTools, but nothing exercises the two graph-node factories. It would not have caught this either way: those tests do not run —vitestis absent frompackage-lock.json, there is notestscript, andtsconfig.jsonexcludes the test directory. Filed separately.Verification
Four-line change, no API surface change. Independent of #58 — either can merge first.
CI is hard-down org-wide on Actions billing (wave-av/wave-rig#174), so checks cannot run here.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Low Risk
Small string fixes in adapter internals; restores intended behavior with no security or data-model impact.
Overview
Fixes broken LangGraph graph nodes that never invoked WAVE tools because
createStreamMonitorNodeandcreateClipNodesearched formonitor_streamandcreate_clipwhileAgentToolkit.getTools()registerswave_monitor_streamandwave_create_clip.Both nodes now resolve the correct tool names (matching the LiveKit adapter) and run their handlers instead of returning
{ error: '… tool not found' }on every call. Error strings in the not-found branches are updated to the prefixed names. No public API or signature changes.Reviewed by Cursor Bugbot for commit 63bf260. Configure here.
Summary by cubic
Fix LangGraph nodes to use the correct
wave_-prefixed tool names so they find their tools and run handlers instead of returning errors.createStreamMonitorNodenow looks upwave_monitor_stream;createClipNodenow looks upwave_create_clip.Written for commit 63bf260. Summary will update on new commits.