Migrate templates to Model Gateway — remove separate model API keys, bump SDKs#76
Conversation
| @@ -1,7 +1,3 @@ | |||
| # Browserbase credentials - get these from https://www.browserbase.com/settings | |||
| BROWSERBASE_API_KEY=your_browserbase_api_key | |||
| BROWSERBASE_PROJECT_ID=your_browserbase_project_id | |||
There was a problem hiding this comment.
we no longer need project_id right? or is python not the same?
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 548cc58. Configure here.
| " (starts with /dp/ or https://)" | ||
| " Only extract actual product listings, skip sponsored" | ||
| " ads or recommendations." | ||
| ), |
There was a problem hiding this comment.
Prompt newlines lost in string reformatting
Medium Severity
The extract instruction was refactored from a triple-quoted f-string (with newlines between each numbered item) to concatenated string literals, which silently strips all newlines. The old prompt had each extraction field on its own line with a blank line before the "Only extract…" closing note; the new version joins everything into one continuous line. This makes the numbered list significantly harder for the LLM to parse and may reduce extraction quality.
Reviewed by Cursor Bugbot for commit 548cc58. Configure here.
| - Tailor responses to align with job requirements when available | ||
| - Craft thoughtful responses that highlight relevant experience/skills | ||
| - For cover letter or "why interested" fields, reference specific aspects of the job/company | ||
|
|
There was a problem hiding this comment.
Extra blank line added to agent system prompt
Low Severity
A blank line was inserted into AGENT_SYSTEM_PROMPT between the "For cover letter…" and "For location/relocation…" bullet points during reformatting. The original prompt had these as consecutive items in a single bullet list. This changes the actual prompt content sent to the LLM, likely unintentionally since this PR's goal was removing API keys, not modifying prompts.
Reviewed by Cursor Bugbot for commit 548cc58. Configure here.


Why
Model Gateway launches April 2nd, routing LLM requests through Browserbase so users only need their
BROWSERBASE_API_KEY. No more juggling separate OpenAI/Anthropic/Google keys per template.What
model: { modelName, apiKey }objects tomodel: "string"model_api_keyparameter from Stagehand/AsyncStagehand/StagehandConfig constructors, including variable declarations and validation blocks@browserbasehq/stagehand→^3.1.0,stagehand(Python) →>=3.19.0,browserbase(Python) →>=1.7.0.env.examplefiles (~16): Removed model API key entriesNotes
gemini-cua,company-address-finder,business-lookup,microsoft-cua— CUA models are not supported by Model Gateway at launchcerebras-docs-checker(unsupported provider),go/hackernews(Go SDK not in scope)cartesia-form-filling: Removed Stagehandmodel_api_keybut keptGEMINI_API_KEYfor its separategenai.Client(non-Stagehand usage)amazon-global-price-comparison,exa-browserbase,sec-filing-researchwere fixed as part of this PR since the linter runs on all staged.pyfileNote
Medium Risk
Broad, cross-template changes plus SDK version bumps could break example runtimes if any template still relies on removed
model_api_key/project ID wiring or older Stagehand/Browserbase APIs.Overview
Updates templates to use Browserbase Model Gateway so most examples only require
BROWSERBASE_API_KEY, removingMODEL_API_KEY/provider-key setup, validation, and troubleshooting text across Python/TypeScript/Go templates.Refactors Stagehand client initialization accordingly (dropping
model_api_keyand oftenbrowserbase_project_idarguments, and collapsing TSmodelconfig to a routed model string), and bumps dependencies (stagehand>=3.19.0,browserbase>=1.7.0, and TS packages to newer/latest versions). RootREADME.mdadds a Model Gateway section and notes that CUA models remain excluded and still require provider keys.Reviewed by Cursor Bugbot for commit a90a164. Bugbot is set up for automated code reviews on this repo. Configure here.