fix(agents): allow bedrock in agent form provider enum#2415
Merged
Conversation
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.
chapmanc
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 setprovider: 'bedrock'and the form blew up with: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).