Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .changeset/late-parks-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@browserbasehq/stagehand": patch
---

Add warning when incorrect models are used with agents hybrid mode
12 changes: 12 additions & 0 deletions packages/core/lib/v3/handlers/v3AgentHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,18 @@ export class V3AgentHandler {
},
});

if (
this.mode === "hybrid" &&
!baseModel.modelId.includes("gemini-3-flash") &&
!baseModel.modelId.includes("claude")
) {
this.logger({
category: "agent",
message: `Warning: "${baseModel.modelId}" may not perform well in hybrid mode. See recommended models: https://docs.stagehand.dev/v3/basics/agent#hybrid-mode`,
level: 0,
});
}

return {
options,
maxSteps,
Expand Down
1 change: 0 additions & 1 deletion packages/docs/v3/basics/agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ Both DOM and CUA modes have their strengths and weaknesses. Hybrid mode combines

Other models may not reliably produce accurate coordinates for clicking and typing.

**Our recommendation:** `google/gemini-3-flash-preview` for the best balance of reliability, speed, and cost.
</Warning>

<Note>Hybrid mode requires `experimental: true` in your Stagehand constructor.</Note>
Expand Down
Loading