diff --git a/packages/core/lib/v3/agent/utils/validateExperimentalFeatures.ts b/packages/core/lib/v3/agent/utils/validateExperimentalFeatures.ts index 04d816e81..22d34a5cf 100644 --- a/packages/core/lib/v3/agent/utils/validateExperimentalFeatures.ts +++ b/packages/core/lib/v3/agent/utils/validateExperimentalFeatures.ts @@ -13,8 +13,6 @@ export interface AgentValidationOptions { executeOptions?: | (Partial & { callbacks?: unknown }) | null; - /** Whether this is streaming mode (can be derived from agentConfig.stream) */ - isStreaming?: boolean; } /** @@ -24,7 +22,7 @@ export interface AgentValidationOptions { * - Invalid argument errors for CUA (streaming, abort signal, message continuation, excludeTools, output schema are not supported) * - Experimental feature checks for integrations and tools (both CUA and non-CUA) * - Experimental feature checks for hybrid mode (requires experimental: true) - * - Experimental feature checks for non-CUA only (callbacks, signal, messages, streaming, excludeTools, output schema) + * - Experimental feature checks for non-CUA only (callbacks, signal, messages, excludeTools, output schema) * * Throws StagehandInvalidArgumentError for invalid/unsupported configurations. * Throws ExperimentalNotConfiguredError if experimental features are used without experimental mode. @@ -32,7 +30,7 @@ export interface AgentValidationOptions { export function validateExperimentalFeatures( options: AgentValidationOptions, ): void { - const { isExperimental, agentConfig, executeOptions, isStreaming } = options; + const { isExperimental, agentConfig, executeOptions } = options; // Check if CUA mode is enabled (via mode: "cua" or deprecated cua: true) const isCuaMode = @@ -83,12 +81,6 @@ export function validateExperimentalFeatures( if (hasIntegrations || hasTools) { features.push("MCP integrations and custom tools"); } - - // Check streaming mode (either explicit or derived from config) - only for non-CUA - if (!isCuaMode && (isStreaming || agentConfig?.stream)) { - features.push("streaming"); - } - // Check execute options features - only for non-CUA if (executeOptions && !isCuaMode) { if (executeOptions.callbacks) { diff --git a/packages/core/lib/v3/tests/agent-callbacks.spec.ts b/packages/core/lib/v3/tests/agent-callbacks.spec.ts index 833c46db5..2b17903c5 100644 --- a/packages/core/lib/v3/tests/agent-callbacks.spec.ts +++ b/packages/core/lib/v3/tests/agent-callbacks.spec.ts @@ -10,7 +10,7 @@ test.describe("Stagehand agent callbacks behavior", () => { test.beforeEach(async () => { v3 = new V3({ ...v3TestConfig, - experimental: true, // Required for callbacks and streaming + experimental: true, // Required for callbacks }); await v3.init(); }); diff --git a/packages/core/lib/v3/tests/agent-experimental-validation.spec.ts b/packages/core/lib/v3/tests/agent-experimental-validation.spec.ts index 9fb861265..67b67b76a 100644 --- a/packages/core/lib/v3/tests/agent-experimental-validation.spec.ts +++ b/packages/core/lib/v3/tests/agent-experimental-validation.spec.ts @@ -129,20 +129,6 @@ test.describe("Stagehand agent experimental feature validation", () => { } }); - test("throws ExperimentalNotConfiguredError for streaming mode", async () => { - try { - const agent = v3.agent({ - stream: true, - model: "anthropic/claude-sonnet-4-20250514", - }); - await agent.execute("test instruction"); - throw new Error("Expected error to be thrown"); - } catch (error) { - expect(error).toBeInstanceOf(ExperimentalNotConfiguredError); - expect((error as Error).message).toContain("streaming"); - } - }); - test("throws ExperimentalNotConfiguredError for callbacks", async () => { const agent = v3.agent({ model: "anthropic/claude-sonnet-4-20250514", diff --git a/packages/core/lib/v3/tests/agent-streaming.spec.ts b/packages/core/lib/v3/tests/agent-streaming.spec.ts index 175ea79d5..2fa50c72e 100644 --- a/packages/core/lib/v3/tests/agent-streaming.spec.ts +++ b/packages/core/lib/v3/tests/agent-streaming.spec.ts @@ -9,7 +9,7 @@ test.describe("Stagehand agent streaming behavior", () => { test.beforeEach(async () => { v3 = new V3({ ...v3TestConfig, - experimental: true, // Required for streaming + experimental: true, }); await v3.init(); }); diff --git a/packages/core/lib/v3/v3.ts b/packages/core/lib/v3/v3.ts index 10f644c36..5e7efdb22 100644 --- a/packages/core/lib/v3/v3.ts +++ b/packages/core/lib/v3/v3.ts @@ -1932,7 +1932,6 @@ export class V3 { typeof instructionOrOptions === "object" ? instructionOrOptions : null, - isStreaming, }); SessionFileLogger.logAgentTaskStarted({ invocation: "Agent.execute",