Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions packages/docs/v3/configuration/models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ Understand web pages, plan actions, and interact with complex interfaces with Go

## Configuration Setup

<Callout icon="exclamation-triangle" color="#DC3545" iconType="solid">
Automatic environment variable loading is currently not working. While we work on fixing this, please use model object format:
```typescript
const stagehand = new Stagehand({
env: "BROWSERBASE",
model: {
model: "google/gemini-2.5-flash",
Comment on lines +18 to +19
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: property name should be modelName, not model

Suggested change
model: {
model: "google/gemini-2.5-flash",
modelName: "google/gemini-2.5-flash",
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/docs/v3/configuration/models.mdx
Line: 18:19

Comment:
**syntax:** property name should be `modelName`, not `model`

```suggestion
    modelName: "google/gemini-2.5-flash",
```

How can I resolve this? If you propose a fix, please make it concise.

apiKey: process.env.GOOGLE_GENERATIVE_AI_API_KEY,
}
});
```
</Callout>

### Quick Start

<Tip>
Expand Down Expand Up @@ -469,6 +482,20 @@ Different models excel at different tasks. Consider speed, accuracy, and cost fo

### Agent Models (with CUA Support)

<Callout icon="exclamation-triangle" color="#DC3545" iconType="solid">
Automatic environment variable loading is currently not working. While we work on fixing this, please use model object format:
```typescript
const agent = stagehand.agent({
cua: true,
model: {
model: "google/gemini-2.5-computer-use-preview-10-2025",
Comment on lines +490 to +491
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: property name should be modelName, not model

Suggested change
model: {
model: "google/gemini-2.5-computer-use-preview-10-2025",
modelName: "google/gemini-2.5-computer-use-preview-10-2025",
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/docs/v3/configuration/models.mdx
Line: 490:491

Comment:
**syntax:** property name should be `modelName`, not `model`

```suggestion
    modelName: "google/gemini-2.5-computer-use-preview-10-2025",
```

How can I resolve this? If you propose a fix, please make it concise.

apiKey: process.env.GOOGLE_GENERATIVE_AI_API_KEY,
},
// ... other agent options
});
```
</Callout>

**Default**

The Stagehand agent by default uses the same model passed to Stagehand. All models ([first class](/v3/configuration/models#first-class-models) and [custom](/v3/configuration/models#custom-models)) are supported. Here's an example with Gemini:
Expand Down