Skip to content

Commit 505e8c6

Browse files
authored
[fix]: Add bedrock to provider enum in Zod schemas and OpenAPI spec (#1759)
## Summary - Adds `"bedrock"` to the `provider` enum in `ModelConfigObjectSchema` and `AgentConfigSchema` (Zod schemas in `packages/core/lib/v3/types/public/api.ts`) - Regenerates `packages/server/openapi.v3.yaml` via `pnpm gen:openapi` ## Context Bedrock was added to `AISDK_PROVIDERS` and `LLMProvider` in PRs #1604 and #1617, but the Zod schemas that feed the OpenAPI spec (and ultimately the Stainless-generated SDKs) were never updated. This means the Python/Go/etc. SDK type definitions don't include `"bedrock"` as a valid provider option. Companion PR in bb/core: browserbase/core#7668 ## Test plan - [x] `pnpm gen:openapi` produces updated spec with `bedrock` in all 4 provider enum locations - [ ] Stainless picks up the OpenAPI change and regenerates SDKs with `bedrock` in the `provider` literal type 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Add "bedrock" to provider enums in ModelConfigObjectSchema/AgentConfigSchema and regenerate the OpenAPI spec so SDKs accept it and stay in sync with AISDK_PROVIDERS/LLMProvider. Also update AgentType to include "bedrock" to fix a server build type mismatch, and add a patch changeset to publish and unblock Python/Go SDK type generation. <sup>Written for commit 88e3372. Summary will update on new commits. <a href="https://cubic.dev/pr/browserbase/stagehand/pull/1759">Review in cubic</a></sup> <!-- End of auto-generated description by cubic. -->
1 parent 4633f00 commit 505e8c6

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@browserbasehq/stagehand": patch
3+
"@browserbasehq/stagehand-server": patch
4+
---
5+
6+
Add bedrock to the provider enum in model configuration schemas and regenerate OpenAPI spec.

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,12 @@ export interface AgentStreamExecuteOptions extends AgentExecuteOptionsBase {
418418
*/
419419
callbacks?: AgentStreamCallbacks;
420420
}
421-
export type AgentType = "openai" | "anthropic" | "google" | "microsoft";
421+
export type AgentType =
422+
| "openai"
423+
| "anthropic"
424+
| "google"
425+
| "microsoft"
426+
| "bedrock";
422427

423428
export const AVAILABLE_CUA_MODELS = [
424429
"openai/computer-use-preview",

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const LocalBrowserLaunchOptionsSchema = z
5252
export const ModelConfigObjectSchema = z
5353
.object({
5454
provider: z
55-
.enum(["openai", "anthropic", "google", "microsoft"])
55+
.enum(["openai", "anthropic", "google", "microsoft", "bedrock"])
5656
.optional()
5757
.meta({
5858
description:
@@ -589,7 +589,7 @@ export const ObserveResponseSchema = wrapResponse(
589589
export const AgentConfigSchema = z
590590
.object({
591591
provider: z // cloud accepts provider: at the top level for legacy reasons, in the future we should remove it
592-
.enum(["openai", "anthropic", "google", "microsoft"])
592+
.enum(["openai", "anthropic", "google", "microsoft", "bedrock"])
593593
.optional()
594594
.meta({
595595
description:

packages/server/openapi.v3.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ components:
173173
- anthropic
174174
- google
175175
- microsoft
176+
- bedrock
176177
modelName:
177178
description: Model name string with provider prefix (e.g., 'openai/gpt-5-nano')
178179
example: openai/gpt-5-nano
@@ -652,6 +653,7 @@ components:
652653
- anthropic
653654
- google
654655
- microsoft
656+
- bedrock
655657
model:
656658
description: Model configuration object or model name string (e.g.,
657659
'openai/gpt-5-nano')
@@ -1154,6 +1156,7 @@ components:
11541156
- anthropic
11551157
- google
11561158
- microsoft
1159+
- bedrock
11571160
modelName:
11581161
description: Model name string with provider prefix (e.g., 'openai/gpt-5-nano')
11591162
example: openai/gpt-5-nano
@@ -1546,6 +1549,7 @@ components:
15461549
- anthropic
15471550
- google
15481551
- microsoft
1552+
- bedrock
15491553
model:
15501554
description: Model configuration object or model name string (e.g.,
15511555
'openai/gpt-5-nano')

0 commit comments

Comments
 (0)