Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions templates/typescript/gemini-cua/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ async function runStagehandTask(invocationId?: string): Promise<SearchQueryOutpu
const stagehand = new Stagehand({
env: "LOCAL",
verbose: 1,
domSettleTimeoutMs: 30_000,
modelName: "gpt-4o",
modelClientOptions: {
apiKey: OPENAI_API_KEY
},
domSettleTimeout: 30_000,
model: "openai/gpt-4.1",
Copy link

Choose a reason for hiding this comment

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

Wrong model specified: gpt-4.1 instead of gpt-4o

The model is set to "openai/gpt-4.1" but the PR description explicitly shows the intended value as "openai/gpt-4o". The original code used modelName: "gpt-4o", and the existing comment on line 18 still references "Stagehand's GPT-4o model". This appears to be an unintentional change that could result in different behavior, pricing, and capabilities than intended.

Fix in Cursor Fix in Web

apiKey: OPENAI_API_KEY,
localBrowserLaunchOptions: {
cdpUrl: kernelBrowser.cdp_ws_url
}
Expand All @@ -64,7 +62,7 @@ async function runStagehandTask(invocationId?: string): Promise<SearchQueryOutpu
// Your Stagehand implementation here
/////////////////////////////////////
try {
const page = stagehand.page;
const page = stagehand.context.pages()[0];

const agent = stagehand.agent({
provider: "google",
Expand Down
6 changes: 3 additions & 3 deletions templates/typescript/gemini-cua/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"typescript": "^5"
},
"dependencies": {
"@browserbasehq/stagehand": "^2.5.2",
"@onkernel/sdk": "^0.15.0",
"zod": "^3.25.67"
"@browserbasehq/stagehand": "^3.0.1",
"@onkernel/sdk": "^0.18.0",
"zod": "=3.25.67"
}
}