[Claimed #1959] docs: simplify model config in BROWSERBASE snippets to use string format#1961
Conversation
|
This mirrored PR has been merged into |
|
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
There was a problem hiding this comment.
No issues found across 3 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant App as User Application
participant SDK as Stagehand SDK
participant BB as Browserbase Platform
participant LLM as LLM Provider (Google/OpenAI/Anthropic)
Note over App,LLM: Model Configuration & Execution Flow
App->>SDK: CHANGED: stagehand.agent({ model: "provider/model" })
Note right of App: No longer requires explicit apiKey object
SDK->>SDK: Parse provider and modelName from string
App->>SDK: agent.act({ task: "..." })
SDK->>BB: Initialize Session / Execute Action
Note right of SDK: Passes model string to Browserbase
BB->>BB: Resolve LLM Credentials
alt NEW: API Key not provided by client
BB->>BB: Use Browserbase Managed API Keys
else API Key provided in config
BB->>BB: Use Client-provided API Key
end
BB->>LLM: Request Inference (model, prompt)
LLM-->>BB: Response (actions/text)
BB-->>SDK: Action result
SDK-->>App: Task completed
When using Browserbase, apiKey is now optional for openai/google/anthropic
providers. Replace model object `{ modelName, apiKey }` with simple string
format `"provider/model"` to reduce friction in docs examples.
Updated files:
- best-practices/caching.mdx (1 instance)
- best-practices/deployments.mdx (1 instance)
- best-practices/deterministic-agent.mdx (4 instances)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
f55ff55 to
cfcd3d4
Compare
# why
# what changed
# test plan
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Update Basics docs to use the simple model string format
("provider/model") in code snippets for `act` and `agent`, replacing the
verbose `{ modelName, apiKey }` form. Aligns these pages with our
best-practices examples; no behavior changes.
<sup>Written for commit 00ff1cc.
Summary will update on new commits. <a
href="https://cubic.dev/pr/browserbase/stagehand/pull/1962">Review in
cubic</a></sup>
<!-- End of auto-generated description by cubic. -->
Co-authored-by: Chromie Bot <chromie@browserbase.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Miguel <36487034+miguelg719@users.noreply.github.com>
Mirrored from external contributor PR #1959 after approval by @miguelg719.
Original author: @chromiebot
Original PR: #1959
Approved source head SHA:
f55ff5558f2454e9f266b7f29ef0b511bd891b9e@chromiebot, please continue any follow-up discussion on this mirrored PR. When the external PR gets new commits, this same internal PR will be marked stale until the latest external commit is approved and refreshed here.
Original description
When using Browserbase, apiKey is now optional for openai/google/anthropic providers. Replace model object
{ modelName, apiKey }with simple string format"provider/model"to reduce friction in docs examples.Updated files:
why
what changed
test plan
Summary by cubic
Switch Browserbase docs snippets to use a single
provider/modelstring for model config, replacing the{ modelName, apiKey }object and omittingapiKeywhere it’s optional for OpenAI, Google, and Anthropic.Updated examples across Basics (
act,agent) and Best Practices (caching,deployments,deterministic-agent), including refreshed Google model IDs likegoogle/gemini-3-flash-previewandgoogle/gemini-2.5-flash.Written for commit 7dc7863. Summary will update on new commits. Review in cubic