Skip to content

fix(agents): allow bedrock in agent form provider enum#2415

Merged
birdayz merged 1 commit intomasterfrom
jb/fix-bedrock-provider-zod-enum
Apr 22, 2026
Merged

fix(agents): allow bedrock in agent form provider enum#2415
birdayz merged 1 commit intomasterfrom
jb/fix-bedrock-provider-zod-enum

Conversation

@birdayz
Copy link
Copy Markdown
Contributor

@birdayz birdayz commented Apr 22, 2026

What

Add 'bedrock' to the Zod enum for the agent form's provider field.

Why

34be39e added Bedrock to the provider TS unions, to LLM_PROVIDER_TYPE_TO_FORM_ID, and to the aigw dropdown pipeline, but missed the Zod schema. Selecting a Bedrock provider from the aigw dropdown set provider: 'bedrock' and the form blew up with:

Invalid enum value. Expected 'openai' | 'anthropic' | 'google' | 'openaiCompatible', received 'bedrock'

Implementation details

One-line widen of the enum in frontend/src/components/pages/agents/create/schemas.ts.

Bedrock-specific field validation (region, credentials) is intentionally not added. In aigw mode that config lives on the gateway provider, not on the agent form. The non-gateway path doesn't render Bedrock fields yet anyway.

References

Introduced by 34be39e (feat(agents): add Bedrock provider to AIAgent proto).

34be39e added Bedrock to the provider TS unions and the aigw provider
type mapping but missed the Zod enum in the create/edit schema.
Selecting a Bedrock provider in the aigw dropdown set provider='bedrock',
which failed validation with "Invalid enum value. Expected 'openai' |
'anthropic' | 'google' | 'openaiCompatible', received 'bedrock'".

Widen the enum to include 'bedrock'. Bedrock-specific field validation
(region, credentials) is not required here because in aigw mode that
config lives on the gateway provider, not on the agent.
@birdayz birdayz enabled auto-merge (squash) April 22, 2026 16:21
@birdayz birdayz merged commit 75a7559 into master Apr 22, 2026
17 checks passed
@birdayz birdayz deleted the jb/fix-bedrock-provider-zod-enum branch April 22, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants