Conversation
BROWSERBASE_BASE_URL (cloud, sessions and functions) and BROWSERBASE_API_BASE_URL (functions only) are read by the CLI but were missing from the Configuration table, so a user could not tell which endpoint browse would talk to. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run. |
What
Two rows in the
## Configurationenv-var table ofpackages/cli/README.md.Why
The table reads as the list of variables
browsehonors, and it omits two that the CLI does read. Both change which Browserbase deployment the CLI talks to, so a user who does not know they are set — or who sets one expecting nothing to happen — silently hits a different endpoint.Where they are read on
main:packages/cli/src/lib/cloud/api.ts:72—return args.baseUrl ?? process.env.BROWSERBASE_BASE_URL;, which feedscreateBrowserbaseClientandresolveApiBaseUrlpackages/cli/src/lib/functions/shared.ts:31-34—args.baseUrl || process.env.BROWSERBASE_BASE_URL || process.env.BROWSERBASE_API_BASE_URL || defaultFunctionsBaseUrlChecked in the published artifact too, not only in the source —
npm pack browse@0.9.6:So the shipped CLI honors them and the shipped README documents neither.
The precedence in the rows follows the code: the
--base-urlflag wins over both, andBROWSERBASE_API_BASE_URLis only consulted bybrowse functions, afterBROWSERBASE_BASE_URL.One thing worth a maintainer's eye:
packages/docs/v4/first-steps/installation.mdx:56tells users to pass URLs explicitly "rather than settingBROWSERBASE_BASE_URL". That text scopes itself to the SDKs, and the CLI is a separate surface — but if the intent is that the CLI should not read the variable either, then the fix is in the code rather than in this table, and I am happy to close this.Docs only; no code, no behaviour change.
🤖 Generated with Claude Code
Summary by cubic
Documents two base-URL env vars the CLI already reads but did not list, so users can now tell which Browserbase endpoint
browsewill talk to.BROWSERBASE_BASE_URLandBROWSERBASE_API_BASE_URLrows to the Configuration table.--base-urlwins over both, andBROWSERBASE_API_BASE_URLonly applies tobrowse functions, afterBROWSERBASE_BASE_URL.Written for commit 346b803. Summary will update on new commits.