From e7aa90def8bbf055e0305eeceb9f7d39f55a3cb1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 17:38:59 +0000 Subject: [PATCH 1/3] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b1b40bd..d8e68da 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 8 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-089c8670f1d7c2e9fa8e5c97010db7c24b8f162eb7cfe76ffa41d70fa46efe2f.yml openapi_spec_hash: 7a226aee8f3f2ab16febbe6bb35e1657 -config_hash: 242651c4871c2869ba3c2e3d337505b9 +config_hash: 75b561cd2ba925e4f2a62ec2f1d13738 From dd558cca501859f0fc80eb2725c7718015160d85 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 17:44:17 +0000 Subject: [PATCH 2/3] feat: add auto-bedrock support based on bedrock/provider.model-name --- .stats.yml | 4 +-- .../SessionExecuteParams/AgentConfig.php | 30 +++++++++++++++++-- .../SessionExecuteParams/AgentConfig/Mode.php | 17 +++++++++++ tests/Services/SessionsTest.php | 1 + 4 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 src/Sessions/SessionExecuteParams/AgentConfig/Mode.php diff --git a/.stats.yml b/.stats.yml index d8e68da..f3c17f9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 8 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-089c8670f1d7c2e9fa8e5c97010db7c24b8f162eb7cfe76ffa41d70fa46efe2f.yml -openapi_spec_hash: 7a226aee8f3f2ab16febbe6bb35e1657 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-43e6dd4ce19381de488d296e9036fea15bfea9a6f946cf8ccf4e02aecc8fb765.yml +openapi_spec_hash: f736e7a8acea0d73e1031c86ea803246 config_hash: 75b561cd2ba925e4f2a62ec2f1d13738 diff --git a/src/Sessions/SessionExecuteParams/AgentConfig.php b/src/Sessions/SessionExecuteParams/AgentConfig.php index 38d28df..9d3e9ab 100644 --- a/src/Sessions/SessionExecuteParams/AgentConfig.php +++ b/src/Sessions/SessionExecuteParams/AgentConfig.php @@ -8,6 +8,7 @@ use Stagehand\Core\Concerns\SdkModel; use Stagehand\Core\Contracts\BaseModel; use Stagehand\Sessions\ModelConfig; +use Stagehand\Sessions\SessionExecuteParams\AgentConfig\Mode; use Stagehand\Sessions\SessionExecuteParams\AgentConfig\Provider; /** @@ -16,6 +17,7 @@ * * @phpstan-type AgentConfigShape = array{ * cua?: bool|null, + * mode?: null|Mode|value-of, * model?: ModelShape|null, * provider?: null|Provider|value-of, * systemPrompt?: string|null, @@ -27,11 +29,19 @@ final class AgentConfig implements BaseModel use SdkModel; /** - * Enable Computer Use Agent mode. + * Deprecated. Use mode: 'cua' instead. If both are provided, mode takes precedence. */ #[Optional] public ?bool $cua; + /** + * Tool mode for the agent (dom, hybrid, cua). If set, overrides cua. + * + * @var value-of|null $mode + */ + #[Optional(enum: Mode::class)] + public ?string $mode; + /** * Model configuration object or model name string (e.g., 'openai/gpt-5-nano'). * @@ -64,11 +74,13 @@ public function __construct() * * You must use named parameters to construct any parameters with a default value. * + * @param Mode|value-of|null $mode * @param ModelShape|null $model * @param Provider|value-of|null $provider */ public static function with( ?bool $cua = null, + Mode|string|null $mode = null, string|ModelConfig|array|null $model = null, Provider|string|null $provider = null, ?string $systemPrompt = null, @@ -76,6 +88,7 @@ public static function with( $self = new self; null !== $cua && $self['cua'] = $cua; + null !== $mode && $self['mode'] = $mode; null !== $model && $self['model'] = $model; null !== $provider && $self['provider'] = $provider; null !== $systemPrompt && $self['systemPrompt'] = $systemPrompt; @@ -84,7 +97,7 @@ public static function with( } /** - * Enable Computer Use Agent mode. + * Deprecated. Use mode: 'cua' instead. If both are provided, mode takes precedence. */ public function withCua(bool $cua): self { @@ -94,6 +107,19 @@ public function withCua(bool $cua): self return $self; } + /** + * Tool mode for the agent (dom, hybrid, cua). If set, overrides cua. + * + * @param Mode|value-of $mode + */ + public function withMode(Mode|string $mode): self + { + $self = clone $this; + $self['mode'] = $mode; + + return $self; + } + /** * Model configuration object or model name string (e.g., 'openai/gpt-5-nano'). * diff --git a/src/Sessions/SessionExecuteParams/AgentConfig/Mode.php b/src/Sessions/SessionExecuteParams/AgentConfig/Mode.php new file mode 100644 index 0000000..703579e --- /dev/null +++ b/src/Sessions/SessionExecuteParams/AgentConfig/Mode.php @@ -0,0 +1,17 @@ + true, + 'mode' => 'cua', 'model' => [ 'modelName' => 'openai/gpt-5-nano', 'apiKey' => 'sk-some-openai-api-key', From 019ee00828df669dc4bf64b388b47686e3b7feae Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 17:44:33 +0000 Subject: [PATCH 3/3] release: 3.9.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ src/Version.php | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 078b9e2..9127b1b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.8.0" + ".": "3.9.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 105f63a..a98006b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.9.0 (2026-01-27) + +Full Changelog: [v3.8.0...v3.9.0](https://github.com/browserbase/stagehand-php/compare/v3.8.0...v3.9.0) + +### Features + +* add auto-bedrock support based on bedrock/provider.model-name ([dd558cc](https://github.com/browserbase/stagehand-php/commit/dd558cca501859f0fc80eb2725c7718015160d85)) + ## 3.8.0 (2026-01-27) Full Changelog: [v3.7.0...v3.8.0](https://github.com/browserbase/stagehand-php/compare/v3.7.0...v3.8.0) diff --git a/src/Version.php b/src/Version.php index cc39443..ca11ce6 100644 --- a/src/Version.php +++ b/src/Version.php @@ -5,5 +5,5 @@ namespace Stagehand; // x-release-please-start-version -const VERSION = '3.8.0'; +const VERSION = '3.9.0'; // x-release-please-end