Skip to content

Commit 6a1d03b

Browse files
committed
add model object format warning
1 parent 7e4b43e commit 6a1d03b

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

packages/docs/v3/configuration/models.mdx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@ Understand web pages, plan actions, and interact with complex interfaces with Go
1010

1111
## Configuration Setup
1212

13+
<Callout icon="exclamation-triangle" color="#DC3545" iconType="solid">
14+
Automatic environment variable loading is currently not working. While we work on fixing this, please use model object format:
15+
```typescript
16+
const stagehand = new Stagehand({
17+
env: "BROWSERBASE",
18+
model: {
19+
model: "google/gemini-2.5-flash",
20+
apiKey: process.env.GOOGLE_GENERATIVE_AI_API_KEY,
21+
}
22+
});
23+
```
24+
</Callout>
25+
1326
### Quick Start
1427

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

470483
### Agent Models (with CUA Support)
471484

485+
<Callout icon="exclamation-triangle" color="#DC3545" iconType="solid">
486+
Automatic environment variable loading is currently not working. While we work on fixing this, please use model object format:
487+
```typescript
488+
const agent = stagehand.agent({
489+
cua: true,
490+
model: {
491+
model: "google/gemini-2.5-computer-use-preview-10-2025",
492+
apiKey: process.env.GOOGLE_GENERATIVE_AI_API_KEY,
493+
},
494+
// ... other agent options
495+
});
496+
```
497+
</Callout>
498+
472499
**Default**
473500

474501
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:

0 commit comments

Comments
 (0)