Skip to content

Conversation

@tkattkat
Copy link
Collaborator

@tkattkat tkattkat commented Dec 31, 2025

why

  • fixes an incorrect usage of defining a model in docs
  • adds docs for dragAndDrop, and hover
  • updates return type of click

part of STG-1030
part of STG-1076

what changed

updated docs

test plan


Summary by cubic

Corrected v3 docs to use modelName (not model) in Stagehand model configuration examples for OpenAI and Anthropic, and expanded Page API docs with new methods and updated return types. Addresses STG-1030 and prevents misconfiguration by aligning examples with the current API.

  • New Features
    • Documented hover(), scroll(), and dragAndDrop() with returnXpath behavior and examples.
    • Clarified click() return type (now returns a string) and updated examples.

Written for commit a2fa2c7. Summary will update on new commits.

@changeset-bot
Copy link

changeset-bot bot commented Dec 31, 2025

⚠️ No Changeset found

Latest commit: a2fa2c7

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@cubic-dev-ai cubic-dev-ai bot left a 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 1 file

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 31, 2025

Greptile Summary

This PR fixes a documentation typo in the model configuration examples. When passing an object to the model parameter for custom endpoints, the property name should be modelName (not model). This change aligns the documentation with the actual API implementation in the codebase.

  • Changed model: "openai/gpt-5" to modelName: "openai/gpt-5" in the OpenAI custom endpoint example
  • Changed model: "anthropic/claude-haiku-4-5" to modelName: "anthropic/claude-haiku-4-5" in the Anthropic custom endpoint example

Confidence Score: 5/5

  • This PR is safe to merge - it's a straightforward documentation fix with no code changes.
  • The change is a simple typo fix in documentation that corrects an incorrect property name. I verified against the source code that modelName is the correct property name when using the object form of model configuration.
  • No files require special attention.

Important Files Changed

Filename Overview
packages/docs/v3/configuration/models.mdx Corrects property name from model to modelName in custom endpoint configuration examples for OpenAI and Anthropic - verified against source code.

Sequence Diagram

sequenceDiagram
    participant User as User Code
    participant Stagehand as Stagehand Constructor
    participant Config as resolveModelConfiguration()
    
    User->>Stagehand: new Stagehand({ model: { modelName, apiKey, baseURL } })
    Stagehand->>Config: resolveModelConfiguration(model)
    Config->>Config: Extract modelName property
    Config-->>Stagehand: { modelName, clientOptions }
    Stagehand-->>User: Stagehand instance
Loading

@tkattkat tkattkat changed the title fix typo in docs update docs for new methods & return types Dec 31, 2025
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.

2 participants