Skip to content

Commit 902ef50

Browse files
shrey150claude
andauthored
docs: remove Browserbase project ID references (browserbase#1958)
## Summary - Remove all `BROWSERBASE_PROJECT_ID` / `projectId` references from v3 docs, SDK docs, integration guides, migration guides, and CLI README (30 files) - Only `BROWSERBASE_API_KEY` is required — `projectId` is optional in all code control paths (conditionally included via spread patterns, never validated as required) - Preserves unrelated GCP project ID references in `models.mdx` ## Test plan - [ ] Verify docs site builds without errors - [ ] Spot-check code examples still make sense without projectId - [ ] Confirm no broken references or formatting issues 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Removed all `BROWSERBASE_PROJECT_ID`/`projectId` references across v3 docs so setup only requires `BROWSERBASE_API_KEY`. Also updated Anthropic model references to `anthropic/claude-sonnet-4-6` across examples and guides. - **Migration** - Remove `BROWSERBASE_PROJECT_ID` from env files, deployment configs, session params, and env var lists; keep `BROWSERBASE_API_KEY` only. - Existing code passing `projectId` still works; it’s optional and not required. - Unrelated GCP project ID mentions remain unchanged. - **Refactors** - Replaced all `anthropic/claude-sonnet-4-20250514` references with `anthropic/claude-sonnet-4-6` across v3 docs (agent examples, warnings, best practices). - Simplified MCP config by removing the `CardGroup` wrapper around a single card. <sup>Written for commit 7a1688d. Summary will update on new commits. <a href="https://cubic.dev/pr/browserbase/stagehand/pull/1958">Review in cubic</a></sup> <!-- End of auto-generated description by cubic. --> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ba70cda commit 902ef50

34 files changed

Lines changed: 55 additions & 127 deletions

packages/cli/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ browse status
239239
|----------|-------------|
240240
| `BROWSE_SESSION` | Default session name (alternative to `--session`) |
241241
| `BROWSERBASE_API_KEY` | Browserbase API key (required for `browse env remote`) |
242-
| `BROWSERBASE_PROJECT_ID` | Browserbase project ID (optional, passed through if set) |
243242

244243
## Element References
245244

packages/docs/v3/basics/agent.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ await agent.execute({
101101
const agent = stagehand.agent({
102102
mode: "cua",
103103
model: {
104-
modelName: "anthropic/claude-sonnet-4-20250514",
104+
modelName: "anthropic/claude-sonnet-4-6",
105105
apiKey: process.env.ANTHROPIC_API_KEY
106106
},
107107
systemPrompt: "You are a helpful assistant...",
@@ -138,7 +138,7 @@ Both DOM and CUA modes have their strengths and weaknesses. Hybrid mode combines
138138
<Warning>
139139
**Model Requirements:** Hybrid mode requires models that can reliably perform coordinate-based actions from screenshots. The following models are recommended:
140140
- **Google:** `google/gemini-3-flash-preview`
141-
- **Anthropic:** `anthropic/claude-sonnet-4-20250514`, `anthropic/claude-sonnet-4-5-20250929`, `anthropic/claude-haiku-4-5-20251001`
141+
- **Anthropic:** `anthropic/claude-sonnet-4-6`, `anthropic/claude-sonnet-4-5-20250929`, `anthropic/claude-haiku-4-5-20251001`
142142

143143
Other models may not reliably produce accurate coordinates for clicking and typing.
144144

@@ -289,7 +289,7 @@ import { z } from "zod";
289289

290290
const agent = stagehand.agent({
291291
mode: "cua",
292-
model: "anthropic/claude-sonnet-4-20250514",
292+
model: "anthropic/claude-sonnet-4-6",
293293
tools: {
294294
searchDatabase: tool({
295295
description: 'Search for records in the database',

packages/docs/v3/best-practices/agent-fallbacks.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ try {
3333
console.log("Agent fallback triggered");
3434

3535
const agent = stagehand.agent({
36-
model: "anthropic/claude-sonnet-4-20250514",
36+
model: "anthropic/claude-sonnet-4-6",
3737
systemPrompt: "You are a helpful assistant that can use a web browser.",
3838
});
3939

packages/docs/v3/best-practices/computer-use.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ const stagehand = new Stagehand({
5555
model: "google/gemini-2.5-flash",
5656

5757
browserbaseSessionCreateParams: {
58-
projectId: process.env.BROWSERBASE_PROJECT_ID!,
5958
browserSettings: {
6059
blockAds: true,
6160
viewport: {
@@ -134,7 +133,7 @@ await page.goto("https://www.google.com/");
134133
const agent = stagehand.agent({
135134
mode: "cua",
136135
model: {
137-
modelName: "anthropic/claude-sonnet-4-20250514",
136+
modelName: "anthropic/claude-sonnet-4-6",
138137
apiKey: process.env.ANTHROPIC_API_KEY
139138
},
140139
systemPrompt: "You are a helpful assistant...",
@@ -175,7 +174,7 @@ const agent = stagehand.agent({
175174
```typescript
176175
const agent = stagehand.agent({
177176
mode: "cua",
178-
model: "anthropic/claude-sonnet-4-20250514",
177+
model: "anthropic/claude-sonnet-4-6",
179178
// ANTHROPIC_API_KEY is auto-loaded - set in your .env
180179
});
181180
```

packages/docs/v3/best-practices/deployments.mdx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,13 @@ export default async function handler(req: VercelRequest, res: VercelResponse):
6565
const stagehand = new Stagehand({
6666
env: "BROWSERBASE",
6767
apiKey: process.env.BROWSERBASE_API_KEY!,
68-
projectId: process.env.BROWSERBASE_PROJECT_ID!,
6968
disablePino: true,
7069
model: {
7170
modelName: "google/gemini-2.5-flash",
7271
apiKey: process.env.GOOGLE_API_KEY!,
7372
},
7473
// optional session params
7574
browserbaseSessionCreateParams: {
76-
projectId: process.env.BROWSERBASE_PROJECT_ID!,
7775
region: "us-west-2",
7876
browserSettings: {
7977
blockAds: true,
@@ -169,7 +167,6 @@ Do not commit `.env` in production. Add variables via Vercel CLI:
169167

170168
```bash
171169
vercel env add BROWSERBASE_API_KEY
172-
vercel env add BROWSERBASE_PROJECT_ID
173170
# (and your model key if needed)
174171
vercel env add GOOGLE_API_KEY
175172
```

packages/docs/v3/best-practices/deterministic-agent.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ async function executeWithFallback() {
324324
await page.goto("https://example.com");
325325

326326
const agent = stagehand.agent({
327-
model: "anthropic/claude-sonnet-4-20250514"
327+
model: "anthropic/claude-sonnet-4-6"
328328
});
329329

330330
try {

packages/docs/v3/configuration/browser.mdx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,11 @@ Before getting started, set up the required environment variables:
7878
<CodeGroup>
7979
```bash .env
8080
BROWSERBASE_API_KEY=your_api_key_here
81-
BROWSERBASE_PROJECT_ID=your_project_id_here
8281
```
8382
</CodeGroup>
8483

8584
<Tip>
86-
Get your API key and Project ID from the [Browserbase Dashboard](https://browserbase.com/overview)
85+
Get your API key from the [Browserbase Dashboard](https://browserbase.com/overview)
8786
</Tip>
8887

8988
### Using Stagehand with Browserbase
@@ -110,9 +109,8 @@ import { Stagehand } from "@browserbasehq/stagehand";
110109

111110
const stagehand = new Stagehand({
112111
env: "BROWSERBASE",
113-
// Optional: API Key and Project ID will be pulled directly from your environment
112+
// Optional: API Key will be pulled directly from your environment
114113
apiKey: process.env.BROWSERBASE_API_KEY,
115-
projectId: process.env.BROWSERBASE_PROJECT_ID,
116114
browserbaseSessionCreateParams: {
117115
proxies: true,
118116
region: "us-west-2",
@@ -132,9 +130,7 @@ console.log("Session ID:", stagehand.sessionId);
132130
const stagehand = new Stagehand({
133131
env: "BROWSERBASE",
134132
apiKey: process.env.BROWSERBASE_API_KEY,
135-
projectId: process.env.BROWSERBASE_PROJECT_ID,
136133
browserbaseSessionCreateParams: {
137-
projectId: process.env.BROWSERBASE_PROJECT_ID!,
138134
proxies: true,
139135
region: "us-west-2",
140136
timeout: 3600, // 1 hour session timeout
@@ -170,7 +166,6 @@ const bb = new Browserbase({
170166
});
171167

172168
const session = await bb.sessions.create({
173-
projectId: process.env.BROWSERBASE_PROJECT_ID!,
174169
// Add configuration options here
175170
});
176171
```
@@ -399,7 +394,7 @@ Setting `domSettleTimeout` too low may cause actions to fail on elements that ar
399394

400395
<AccordionGroup>
401396
<Accordion title="Browserbase Authentication Errors">
402-
- Verify your `BROWSERBASE_API_KEY` and `BROWSERBASE_PROJECT_ID` are set correctly
397+
- Verify your `BROWSERBASE_API_KEY` is set correctly
403398
- Check that your API key has the necessary permissions
404399
- Ensure your Browserbase account has sufficient credits
405400
</Accordion>

packages/docs/v3/first-steps/ai-rules.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ For more advanced scenarios using computer-use models:
293293
```typescript
294294
const agent = stagehand.agent({
295295
mode: "cua", // Enable Computer Use Agent mode
296-
model: "anthropic/claude-sonnet-4-20250514",
296+
model: "anthropic/claude-sonnet-4-6",
297297
// or "google/gemini-2.5-computer-use-preview-10-2025"
298298
systemPrompt: `You are a helpful assistant that can use a web browser.
299299
Do not ask follow up questions, the user will trust your judgement.`,

packages/docs/v3/first-steps/installation.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ Set environment variables (or a `.env` via your framework):
4949
```bash Bash
5050
OPENAI_API_KEY=your_api_key
5151
BROWSERBASE_API_KEY=your_api_key
52-
BROWSERBASE_PROJECT_ID=your_project_id
5352
```
5453
</CodeGroup>
5554

packages/docs/v3/first-steps/quickstart.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ main().catch((err) => {
8787
</CodeGroup>
8888

8989
<Tip>
90-
To use, set provider keys in `.env` (e.g., `OPENAI_API_KEY`). For cloud browsers, add `BROWSERBASE_API_KEY` and `BROWSERBASE_PROJECT_ID`.
90+
To use, set provider keys in `.env` (e.g., `OPENAI_API_KEY`). For cloud browsers, add `BROWSERBASE_API_KEY`.
9191
</Tip>
9292

9393
## Next steps

0 commit comments

Comments
 (0)