Skip to content

fix(adk): langgraph graph nodes look up tools by the wrong names and always fail - #41

Open
yakimoto wants to merge 1 commit into
mainfrom
fix/langgraph-tool-names
Open

fix(adk): langgraph graph nodes look up tools by the wrong names and always fail#41
yakimoto wants to merge 1 commit into
mainfrom
fix/langgraph-tool-names

Conversation

@yakimoto

@yakimoto yakimoto commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

createStreamMonitorNode and createClipNode look up their tool by name — with the wrong names.

const monitorTool = tools.find((t) => t.name === 'monitor_stream');   // real name: wave_monitor_stream
const clipTool    = tools.find((t) => t.name === 'create_clip');      // real name: wave_create_clip

AgentToolkit.getTools() prefixes every tool with wave_, so neither lookup can succeed. Both nodes fall into their if (!tool) branch on every invocation, return an error object, and never make a network call. Anyone wiring createStreamMonitorNode into a LangGraph StateGraph gets a node that silently does nothing.

This is live on npm

Not theoretical — it's in the published artifact today:

$ curl -sL <@wave-av/adk@1.0.14 tarball> | tar xz
$ grep -o "monitor_stream tool not found\|create_clip tool not found" package/dist/index.cjs | sort -u
create_clip tool not found
monitor_stream tool not found

Regression tests, proven non-vacuous

The existing adapters.test.ts only asserts the shape of createLangGraphTools — nothing invoked the two graph-node factories, which is exactly why this shipped. The new tests assert the absence of the tool not found error.

I verified they actually catch it rather than passing for free:

# old names reintroduced
 × createStreamMonitorNode finds wave_monitor_stream
 × createClipNode finds wave_create_clip
 Tests  2 failed | 8 passed (10)

# fix restored
 Tests  10 passed (10)

Verification

tsc --noEmit                # clean (the one pre-existing @wave-av/kernel resolution error
                            #  goes away once the workspace sibling is built)
vitest run                  # 27 passed | 2 skipped, 0 failed
vitest run adapters.test.ts # 10 passed

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/adk exists in three places and this repo is the one that actually publishes:

Location Version Publishes?
wave-av/sdkssdk-typescript/packages/adk 1.0.14 yes — publish-npm.yml, matches the npm artifact
wave-av/wave-surfer-connectpackages/adk 1.0.14 the pre-carve origin
wave-av/adk (standalone repo) 1.0.2 has a publish.yml, but is 12 versions behind

The standalone wave-av/adk repo is a stale fork: single-entry build, no ERROR-CODES.md, and its .wave/repo.json describes a package that is not the one on npm — it declares the 6 subpath exports as planned/"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.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with 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 createStreamMonitorNode and createClipNode looked up monitor_stream and create_clip while AgentToolkit registers wave_monitor_stream and wave_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 error is 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/adk where LangGraph nodes failed to resolve their tools and always returned “tool not found.” Nodes now find the correct wave_-prefixed tools and execute as expected.

  • Bug Fixes
    • createStreamMonitorNode now looks up wave_monitor_stream (was monitor_stream).
    • createClipNode now looks up wave_create_clip (was create_clip).
    • Added regression tests to assert tools resolve and the “tool not found” error does not appear.

Written for commit 76fc70e. Summary will update on new commits.

Review in cubic

…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.
@changeset-bot

changeset-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 76fc70e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cursor

cursor Bot commented Jul 27, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 565d60ad-470c-4f75-9539-e798caa6257b

📥 Commits

Reviewing files that changed from the base of the PR and between 9eb128a and 76fc70e.

📒 Files selected for processing (2)
  • sdk-typescript/packages/adk/src/__tests__/adapters.test.ts
  • sdk-typescript/packages/adk/src/adapters/langgraph.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/langgraph-tool-names
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/langgraph-tool-names

Comment @coderabbitai help to get the list of available commands.

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.

1 participant