Skip to content

docs: simplify model config in BROWSERBASE snippets to use string format#1959

Closed
chromiebot wants to merge 1 commit into
browserbase:mainfrom
chromiebot:chromie/docs-simplify-model-config-browserbase
Closed

docs: simplify model config in BROWSERBASE snippets to use string format#1959
chromiebot wants to merge 1 commit into
browserbase:mainfrom
chromiebot:chromie/docs-simplify-model-config-browserbase

Conversation

@chromiebot
Copy link
Copy Markdown
Contributor

@chromiebot chromiebot commented Apr 6, 2026

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

Simplified Browserbase examples to use a single "provider/model" string instead of a { modelName, apiKey } object. Since apiKey is now optional for OpenAI, Google, and Anthropic on Browserbase, the docs are easier to copy and use.

Written for commit f55ff55. Summary will update on new commits. Review in cubic

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>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 6, 2026

⚠️ No Changeset found

Latest commit: f55ff55

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 6, 2026

This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run.
Approving the latest commit mirrors it into an internal PR owned by the approver.
If new commits are pushed later, the internal PR stays open but is marked stale until someone approves the latest external commit and refreshes it.

@github-actions github-actions Bot added external-contributor Tracks PRs mirrored from external contributor forks. external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. labels Apr 6, 2026
@github-actions github-actions Bot added external-contributor:mirrored An internal mirrored PR currently exists for this external contributor PR. and removed external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. labels Apr 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 6, 2026

This PR was approved by @miguelg719 and mirrored to #1961. All further discussion should happen on that PR.

@github-actions github-actions Bot closed this Apr 6, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 User as Developer Code
    participant SDK as Stagehand SDK
    participant BB as Browserbase Infrastructure
    participant LLM as LLM Provider (Google/OpenAI/Anthropic)

    Note over User,LLM: Runtime Model Initialization Flow

    User->>SDK: stagehand.agent({ model: "provider/model" })
    Note right of User: CHANGED: Model defined as simple string<br/>instead of { modelName, apiKey } object

    SDK->>BB: Initialize session with model identifier
    
    Note over BB: NEW: Browserbase resolves LLM API key<br/>internally for supported providers

    BB->>LLM: Forward request with internal credentials
    LLM-->>BB: LLM Response (Inference/Action)
    
    BB-->>SDK: Return execution results
    SDK-->>User: Agent response
Loading

chromiebot pushed a commit to chromiebot/stagehand that referenced this pull request Apr 6, 2026
Update act.mdx and agent.mdx in the basics section to use the
simplified model string format ("provider/model") instead of the
verbose object format ({ modelName, apiKey }), matching the changes
already applied to best-practices in PR browserbase#1959.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
miguelg719 added a commit that referenced this pull request Apr 6, 2026
…o use string format (#1961)

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:
- best-practices/caching.mdx (1 instance)
- best-practices/deployments.mdx (1 instance)
- best-practices/deterministic-agent.mdx (4 instances)

# why

# what changed

# test plan

<!-- This is an auto-generated description by cubic. -->
---
## 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`.

<sup>Written for commit 7dc7863.
Summary will update on new commits. <a
href="https://cubic.dev/pr/browserbase/stagehand/pull/1961">Review in
cubic</a></sup>

<!-- End of auto-generated description by cubic. -->

<!-- external-contributor-pr:owned source-pr=1959
source-sha=f55ff5558f2454e9f266b7f29ef0b511bd891b9e claimer=miguelg719
-->

---------

Co-authored-by: Chromie Bot <chromie@browserbase.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Chromie <miguel@browserbase.com>
Co-authored-by: Miguel <36487034+miguelg719@users.noreply.github.com>
@github-actions github-actions Bot added external-contributor:completed The mirrored PR has been merged and the external contributor flow is complete. and removed external-contributor:mirrored An internal mirrored PR currently exists for this external contributor PR. labels Apr 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 6, 2026

The mirrored PR #1961 has been merged into main. This original external contributor PR will stay closed as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor:completed The mirrored PR has been merged and the external contributor flow is complete. external-contributor Tracks PRs mirrored from external contributor forks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants