Enhance Stagehand with LLMs for optimal performance, cost, and reliability
Provider | Best Models | Strengths | Use Case |
---|---|---|---|
OpenAI | gpt-4.1 , gpt-4.1-mini | High accuracy, reliable | Production, complex sites |
Anthropic | claude-3-7-sonnet-latest | Excellent reasoning | Complex automation tasks |
gemini-2.5-flash , gemini-2.5-pro | Fast, cost-effective | High-volume automation |
provider/model-name
for model specification.
Examples:
openai/gpt-4.1
anthropic/claude-3-7-sonnet-latest
google/gemini-2.5-flash
(Recommended)ai
package and the provider you want to use. For example, to use Amazon Bedrock, you’ll need to install the @ai-sdk/amazon-bedrock
package.
You’ll also need to use the Vercel AI SDK external client as a template to create a client for your model.
Model doesn't support structured outputs
Model does not support structured outputs
Solution:
Use models that support function calling/structured outputs. The minimum requirements are:Authentication errors
Invalid API key
or Unauthorized
Solution:Inconsistent automation results
Slow performance
verbose: 0
to minimize token usageHigh costs
verbose: 0
to reduce logging overhead