I was just testing and found that the browserbase and stagehand doesn't work on Cloudflare worker?
Error: ws does not work in the browser. Browser clients must use the native WebSocket object.
Note: I am not connecting the CF Brower rendering, I just wanted to connect the paid browser base browser sessions.
const stagehand = new Stagehand({
env: "BROWSERBASE",
apiKey: this.env.BROWSERBASE_API_KEY,
projectId: this.env.BROWSERBASE_PROJECT_ID,
model: {
modelName: "google/gemini-2.5-flash",
apiKey: this.env.GEMINI_API_KEY,
},
});
"@browserbasehq/stagehand": "^3.0.8",
I was just testing and found that the
browserbaseand stagehand doesn't work on Cloudflare worker?Error: ws does not work in the browser. Browser clients must use the native WebSocket object.
Note: I am not connecting the CF Brower rendering, I just wanted to connect the paid browser base browser sessions.
"@browserbasehq/stagehand": "^3.0.8",