feat: add optional project_id field to Bedrock and Bedrock Mantle key configs - #5134
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughSummary by CodeRabbit
WalkthroughBedrock and Bedrock Mantle key configurations now support optional project IDs across UI fields, validation schemas, TypeScript types, defaults, and secret-variable schemas. Vertex single-region guidance was also reworded. ChangesBedrock project ID configuration
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant SecretVarInput
participant ProviderFormSchema
participant BedrockKeyConfig
SecretVarInput->>ProviderFormSchema: Submit optional project_id
ProviderFormSchema->>BedrockKeyConfig: Validate project_id
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
907213d to
fa238f8
Compare
2592af4 to
e4118c0
Compare
project_id field to Bedrock and Bedrock Mantle key configs
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (4): Last reviewed commit: "feat: project id support for UI" | Re-trigger Greptile |
e4118c0 to
774393b
Compare
ee94c89 to
fbb2a4f
Compare
774393b to
41b7be7
Compare
Merge activity
|
The base branch was changed.
0db5afe to
de2fc56
Compare
de2fc56 to
4c1b66a
Compare
…ey configs (#5134) ## Summary Adds an optional `project_id` field to both `BedrockKeyConfig` and `BedrockMantleKeyConfig`, allowing users to scope Bedrock Mantle-routed models (OpenAI-family / Gemma) to a specific project via the `OpenAI-Project` / `anthropic-workspace-id` header. When left empty, the account's default project is used. ## Changes - Added `project_id` as an optional `SecretVar` field to `BedrockKeyConfig` and `BedrockMantleKeyConfig` types and their corresponding defaults. - Extended the Zod validation schemas (`bedrockKeyConfigSchema`, `bedrockMantleKeyConfigSchema`, `BedrockKeyConfigSchema`, `BedrockMantleKeyConfigSchema`) to include the optional `project_id` field. - Added UI form fields for `project_id` in both the Bedrock and Bedrock Mantle provider configuration sections, accepting a project ID or an environment variable reference (e.g., `proj_xxxxxxxx` or `env.BEDROCK_PROJECT_ID`). ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [x] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test 1. Navigate to the Bedrock or Bedrock Mantle provider configuration in the workspace settings. 2. Verify the new **Mantle Project ID (Optional)** / **Project ID (Optional)** field appears in the form. 3. Enter a project ID (e.g., `proj_xxxxxxxx`) or an environment variable reference (e.g., `env.BEDROCK_PROJECT_ID`) and save. 4. Confirm the value is persisted and sent correctly when routing requests to Mantle-backed models. ```sh cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` ## Screenshots/Recordings _Add before/after screenshots of the Bedrock and Bedrock Mantle provider configuration forms showing the new Project ID field._ ## Breaking changes - [x] No ## Related issues ## Security considerations The `project_id` field is handled as a `SecretVar`, consistent with other sensitive Bedrock configuration values, supporting both inline values and environment variable references. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable

Summary
Adds an optional
project_idfield to bothBedrockKeyConfigandBedrockMantleKeyConfig, allowing users to scope Bedrock Mantle-routed models (OpenAI-family / Gemma) to a specific project via theOpenAI-Project/anthropic-workspace-idheader. When left empty, the account's default project is used.Changes
project_idas an optionalSecretVarfield toBedrockKeyConfigandBedrockMantleKeyConfigtypes and their corresponding defaults.bedrockKeyConfigSchema,bedrockMantleKeyConfigSchema,BedrockKeyConfigSchema,BedrockMantleKeyConfigSchema) to include the optionalproject_idfield.project_idin both the Bedrock and Bedrock Mantle provider configuration sections, accepting a project ID or an environment variable reference (e.g.,proj_xxxxxxxxorenv.BEDROCK_PROJECT_ID).Type of change
Affected areas
How to test
proj_xxxxxxxx) or an environment variable reference (e.g.,env.BEDROCK_PROJECT_ID) and save.Screenshots/Recordings
Add before/after screenshots of the Bedrock and Bedrock Mantle provider configuration forms showing the new Project ID field.
Breaking changes
Related issues
Security considerations
The
project_idfield is handled as aSecretVar, consistent with other sensitive Bedrock configuration values, supporting both inline values and environment variable references.Checklist
docs/contributing/README.mdand followed the guidelines