feat(vercel): add Stagehand code-mode binding - #92
Draft
shrey150 wants to merge 1 commit into
Draft
Conversation
This was referenced Aug 4, 2026
shrey150
force-pushed
the
shrey/stg-2765-vercel-codemode
branch
3 times, most recently
from
August 4, 2026 22:53
5e9a9ac to
19047f4
Compare
shrey150
force-pushed
the
shrey/stg-2765-vercel-codemode
branch
from
August 4, 2026 23:05
19047f4 to
9e423e1
Compare
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
code_executetool backed by the shared Stagehand executoraipeer and a dedicated./ai-sdkpackage exportStack
This PR is stacked on the framework-neutral code-mode tool. Its diff contains only the Vercel AI SDK binding and example.
Lifecycle
One native tool instance owns one executor for the complete
generateTextcall. The example closes that executor infinally, ensuring its Browserbase browser is released whether generation succeeds or fails. The native binding hosts execution directly instead of launching a local MCP subprocess.E2E Test Matrix
pnpm --filter @browserbasehq/stagehand-codemode run buildfollowed bypnpm --filter stagehand-codemode-ai-sdk-example run smoke./ai-sdkexport and the example reportedVercel AI SDK native tool binding PASS: code_execute.pnpm --filter stagehand-codemode-ai-sdk-example run checkpnpm --filter @browserbasehq/stagehand-codemode run typecheck