feat: Add Claude Opus 4.8 CUA support (#2170)
Summary
- Add
anthropic/claude-opus-4-8to the CUA model whitelist.- Route bare
claude-opus-4-8model names to the Anthropic CUA client.- Treat Claude Opus 4.8 as a Claude 4.6+ adaptive-thinking CUA model and document it in the supported CUA model lists.
Validation
pnpm --filter @browserbasehq/stagehand run typecheckpnpm run test:core -- packages/core/dist/esm/tests/unit/public-api/llm-and-agents.test.js packages/core/dist/esm/tests/unit/anthropic-cua-adaptive-thinking.test.jsNote: the focused test command passed 38 tests, then the test wrapper printed a non-fatal CTRF conversion warning from
glob/minimatchunder Node 22.
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
The AI Browser Automation Framework
Read the Docs
If you're looking for the Python implementation, you can find it here
What is Stagehand?
Stagehand is a browser automation framework used to control web browsers with natural language and code. By combining the power of AI with the precision of code, Stagehand makes web automation flexible, maintainable, and actually reliable.
Why Stagehand?
Most existing browser automation tools either require you to write low-level code in a framework like Selenium, Playwright, or Puppeteer, or use high-level agents that can be unpredictable in production. By letting developers choose what to write in code vs. natural language (and bridging the gap between the two) Stagehand is the natural choice for browser automations in production.
Choose when to write code vs. natural language: use AI when you want to navigate unfamiliar pages, and use code when you know exactly what you want to do.
Go from AI-driven to repeatable workflows: Stagehand lets you preview AI actions before running them, and also helps you easily cache repeatable actions to save time and tokens.
Write once, run forever: Stagehand’s auto-caching combined with self-healing remembers previous actions, runs without LLM inference, and knows when to involve AI whenever the website changes and your automation breaks.
Getting Started
Start with Stagehand with one line of code, or check out our Quickstart Guide for more information:
Example
Here’s how to build a sample browser automation with Stagehand:
Documentation
Visit docs.stagehand.dev to view the full documentation.
Build and Run from Source
Stagehand is best when you have an API key for an LLM provider and Browserbase credentials. To add these to your project, run:
Installing from a branch
You can install and build Stagehand directly from a github branch using gitpkg
In your project’s
package.jsonset:Contributing
At a high level, we’re focused on improving reliability, extensibility, speed, and cost in that order of priority. If you’re interested in contributing, bug fixes and small improvements are the best way to get started. For more involved features, we strongly recommend reaching out to Miguel Gonzalez or Paul Klein in our Discord community before starting to ensure that your contribution aligns with our goals.
Acknowledgements
We’d like to thank the following people for their major contributions to Stagehand:
License
Licensed under the MIT License.
Copyright 2025 Browserbase, Inc.