[Claimed #1960] chore: update examples
Merged
GI
8mo ago+100+100+012345678901234567890123456789-557-557-012345678901234567890123456789
Mirrored from external contributor PR #1960 after approval by @miguelg719.
Original author: @chromiebot
Original PR: https://github.com/browserbase/stagehand/pull/1960
Approved source head SHA: b013423199f609fc744a7f23127511929a1ec0fc
@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
why
Examples were quite stale
what changed
Overhaul of examples/ and minor cleanups
test plan
Summary by cubic
Standardizes non-CUA examples to use model strings with built-in API key resolution. Updates the MCP demo to the current agent API, replaces deprecated OpenAI model names, and removes dead eval/client code to reduce boilerplate.
- Refactors
- Switched examples to model strings (e.g.,
openai/gpt-5) without inline API keys whenenv: "BROWSERBASE"; kept a LOCAL override inparameterize-api-key.tsusinggpt-4.1-mini. - Updated
mcp.tsto current agent API:connectToMCPServer,mode: "hybrid", modelanthropic/claude-sonnet-4-6, and asystemPrompt. - Replaced deprecated OpenAI models in custom-client examples:
gpt-4o→gpt-4.1,gpt-4o-mini→gpt-4.1-mini; replacedV3withStagehandinv3-example.tsandv3-agent.ts, and fixed imports to../lib/v3/*. - Removed dead code (examples
external_clients/*, evalsllm_clientsand category,examples/CHANGELOG.md,examples/tsconfig.json) and added a patch changeset.
- Switched examples to model strings (e.g.,