@@ -92,19 +92,25 @@ export async function initializeBrowser(): Promise<BrowserSession> {
92
92
simulateNetworkDisconnect ( 'browser initialization' ) ;
93
93
94
94
const config : ConstructorParams = {
95
- verbose : 1 ,
95
+ verbose : 0 ,
96
96
domSettleTimeoutMs : 8000 ,
97
97
env : "BROWSERBASE" ,
98
98
apiKey : process . env . BROWSERBASE_API_KEY ,
99
+ modelName : "openai/gpt-4o" ,
100
+ modelClientOptions : {
101
+ apiKey : process . env . OPENAI_API_KEY ,
102
+ } ,
99
103
browserbaseSessionCreateParams : {
100
- proxies : true ,
104
+ // Only available in paid plans
105
+ // proxies: true,
101
106
projectId : process . env . BROWSERBASE_PROJECT_ID ! ,
102
107
browserSettings : {
103
108
viewport : {
104
109
width : 1024 ,
105
110
height : 768
106
111
} ,
107
- advancedStealth : true
112
+ // Only available on Scale Plans
113
+ // advancedStealth: true
108
114
}
109
115
} ,
110
116
} ;
@@ -172,9 +178,9 @@ export async function navigateToSearchPage(session: BrowserSession): Promise<voi
172
178
173
179
stagehand = await reconnectToSession ( session ) ;
174
180
175
- console . log ( `[${ session . attemptId } ] Navigating to Google ...` ) ;
176
- await stagehand . page . goto ( 'https://www.google .com' ) ;
177
- console . log ( `[${ session . attemptId } ] Successfully navigated to Google ` ) ;
181
+ console . log ( `[${ session . attemptId } ] Navigating to Brave ...` ) ;
182
+ await stagehand . page . goto ( 'https://search.brave .com/ ' ) ;
183
+ console . log ( `[${ session . attemptId } ] Successfully navigated to Brave ` ) ;
178
184
179
185
} catch ( error : any ) {
180
186
console . error ( `[${ session . attemptId } ] Navigation failed:` , error . message ) ;
0 commit comments