-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Chromie/fix can you export the aisdk tool #1491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chromie/fix can you export the aisdk tool #1491
Conversation
Add test to verify the Tool type from AI SDK is properly re-exported from Stagehand. This allows users to import Tool from @browserbasehq/stagehand instead of ai-sdk directly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Re-export the Tool type from the 'ai' package so users can import it directly from @browserbasehq/stagehand rather than having to install and import from ai-sdk separately. This follows the same pattern used for ModelMessage and other AI SDK types. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 181bc31 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 3 files
Greptile SummaryRe-exports the
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Consumer as Stagehand Consumer
participant Stagehand as @browserbasehq/stagehand
participant AISDK as ai (AI SDK)
Note over Consumer,AISDK: Before this PR
Consumer->>AISDK: import { Tool } from "ai"
Consumer->>Stagehand: import { AgentConfig } from "@browserbasehq/stagehand"
Consumer->>Consumer: Define custom tools using Tool type
Note over Consumer: Required direct dependency on "ai" package
Note over Consumer,AISDK: After this PR
Consumer->>Stagehand: import { Tool, AgentConfig } from "@browserbasehq/stagehand"
Stagehand->>AISDK: Re-exports Tool type
Consumer->>Consumer: Define custom tools using Tool type
Note over Consumer: No direct dependency on "ai" package needed
|
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
why
what changed
test plan
Summary by cubic
Exported the Tool type and tool function in the public API so users can import them from @browserbasehq/stagehand and define custom tools. Added tests to verify both exports match the upstream package.
Written for commit 181bc31. Summary will update on new commits.