Skip to content

Conversation

@chrisreadsf
Copy link
Member

@chrisreadsf chrisreadsf commented Sep 19, 2025

why

  1. aisdk not yet available through npm package
  2. customLLM provider only works with LanguageModelV1
  3. LiteLLM compatible providers are supported in python

what changed

  1. change docs to install stagehand from git repo
  2. pin versions that use LanguageModelV1

test plan

local test

@changeset-bot
Copy link

changeset-bot bot commented Sep 19, 2025

⚠️ No Changeset found

Latest commit: 6c20f60

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

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR addresses two important issues: the AI SDK not being available through the npm package and the need for specific version pinning for LanguageModelV1 compatibility.

Key Changes:

  • Updated installation instructions to pin ai@4 and provider packages to version 1 for LanguageModelV1 compatibility
  • Added workaround documentation for installing Stagehand from git repository to access AISdkClient
  • Improved clarity around version requirements and compatibility
  • Added temporary @ts-ignore for the AISdkClient import until proper types are available

Confidence score: 4/5

  • This PR is safe to merge with minimal risk
  • The changes are documentation-only updates that provide necessary workarounds for current limitations. The version pinning is appropriate for compatibility, and the git installation workaround is clearly documented as temporary.
  • No files require special attention - this is a straightforward documentation update

1 file reviewed, 1 comment

Edit Code Review Bot Settings | Greptile

Comment on lines +221 to 222
// @ts-ignore
import { AISdkClient } from "@browserbasehq/stagehand";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Using @ts-ignore should be avoided when possible. Consider using a more specific TypeScript suppression or adding proper type declarations.

Suggested change
// @ts-ignore
import { AISdkClient } from "@browserbasehq/stagehand";
// TODO: Remove this when AISdkClient is properly exported with types
import { AISdkClient } from "@browserbasehq/stagehand";

@chrisreadsf chrisreadsf changed the title [docs] add aisdk workaround before npm release + add versions to work with LanguageModelV1 [docs] add aisdk workaround before npm release + add versions to work with LanguageModelV1 + LiteLLM works for python Sep 19, 2025
@chrisreadsf chrisreadsf merged commit 569e444 into main Sep 22, 2025
1 check passed
@chrisreadsf chrisreadsf deleted the chris/sep/aisdk-client-doc branch September 22, 2025 20:41
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.

3 participants