[Claimed #1959] docs: simplify model config in BROWSERBASE snippets to use string format
Mirrored from external contributor PR #1959 after approval by @miguelg719.
Original author: @chromiebot
Original PR: https://github.com/browserbase/stagehand/pull/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:
- best-practices/caching.mdx (1 instance)
- best-practices/deployments.mdx (1 instance)
- best-practices/deterministic-agent.mdx (4 instances)
why
what changed
test plan
Summary by cubic
Switch Browserbase docs snippets to use a single provider/model string for model config, replacing the { modelName, apiKey } object and omitting apiKey where 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 like google/gemini-3-flash-preview and google/gemini-2.5-flash.