Skip to content

Commit e0e22e0

Browse files
authored
move hybrid mode behind experimental (#1433)
# why put hybrid mode behind experimental flag # what changed added experimental to jsdoc & experimental feature validation # test plan <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Moved hybrid mode behind the experimental flag to prevent accidental use. Using mode: 'hybrid' now requires experimental: true; otherwise validation will fail. - **Migration** - If you use mode: 'hybrid', set experimental: true in the Stagehand constructor. <sup>Written for commit ae648ab. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
1 parent 05f5580 commit e0e22e0

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.changeset/curly-webs-fetch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@browserbasehq/stagehand": patch
3+
---
4+
5+
Put hybrid mode behind experimental

packages/core/lib/v3/agent/utils/validateExperimentalFeatures.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export interface AgentValidationOptions {
2323
* This utility consolidates all validation checks for both CUA and non-CUA agent paths:
2424
* - Invalid argument errors for CUA (streaming, abort signal, message continuation are not supported)
2525
* - Experimental feature checks for integrations and tools (both CUA and non-CUA)
26+
* - Experimental feature checks for hybrid mode (requires experimental: true)
2627
* - Experimental feature checks for non-CUA only (callbacks, signal, messages, streaming)
2728
*
2829
* Throws StagehandInvalidArgumentError for invalid/unsupported configurations.
@@ -67,6 +68,9 @@ export function validateExperimentalFeatures(
6768
if (hasIntegrations || hasTools) {
6869
features.push("MCP integrations and custom tools");
6970
}
71+
if (agentConfig?.mode === "hybrid") {
72+
features.push("hybrid mode");
73+
}
7074

7175
// Check streaming mode (either explicit or derived from config) - only for non-CUA
7276
if (!agentConfig?.cua && (isStreaming || agentConfig?.stream)) {

packages/core/lib/v3/types/public/agent.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ export type AgentConfig = {
442442
* - 'dom' (default): Uses DOM-based tools (act, fillForm) for structured interactions
443443
* - 'hybrid': Uses coordinate-based tools (click, type, dragAndDrop, clickAndHold, fillFormVision)
444444
* for visual/screenshot-based interactions
445+
* @experimental hybrid mode requires `experimental: true` in Stagehand constructor
445446
*/
446447
mode?: AgentToolMode;
447448
};

0 commit comments

Comments
 (0)