Remove BROWSERBASE_PROJECT_ID requirement (#625)

* Remove BROWSERBASE_PROJECT_ID requirement

The Browserbase API no longer requires a project ID to create sessions —
it is inferred from the API key. Remove the env var requirement from both
the TypeScript daemon and Rust CLI, and update docs accordingly.

* Remove unnecessary Content-Type header since no body is sent
This commit is contained in:
Derek
2026-03-11 22:40:30 -05:00
committed by GitHub
parent 18c3112dbd
commit cc82dd137c
4 changed files with 4 additions and 16 deletions
+3 -8
View File
@@ -914,27 +914,22 @@ export class BrowserManager {
/**
* Connect to Browserbase remote browser via CDP.
* Requires BROWSERBASE_API_KEY and BROWSERBASE_PROJECT_ID environment variables.
* Requires BROWSERBASE_API_KEY environment variable.
*/
private async connectToBrowserbase(): Promise<void> {
const browserbaseApiKey = process.env.BROWSERBASE_API_KEY;
const browserbaseProjectId = process.env.BROWSERBASE_PROJECT_ID;
if (!browserbaseApiKey || !browserbaseProjectId) {
if (!browserbaseApiKey) {
throw new Error(
'BROWSERBASE_API_KEY and BROWSERBASE_PROJECT_ID are required when using browserbase as a provider'
'BROWSERBASE_API_KEY is required when using browserbase as a provider'
);
}
const response = await fetch('https://api.browserbase.com/v1/sessions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-BB-API-Key': browserbaseApiKey,
},
body: JSON.stringify({
projectId: browserbaseProjectId,
}),
});
if (!response.ok) {