feat: add bedrock_mantle provider with SigV4 key config, DB migration, and UI support - #4737
Conversation
|
|
6358bdc to
24d4d45
Compare
a62dba4 to
436c314
Compare
|
Warning Review limit reached
More reviews will be available in 8 minutes and 46 seconds. Learn how PR review limits work. To continue reviewing without waiting, enable usage-based billing in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (19)
📝 WalkthroughWalkthroughBedrock Mantle support is added across transport schemas, configstore persistence, provider-key handling, and the provider settings UI. ChangesBedrock Mantle provider support
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
ui/app/workspace/providers/views/modelProviderKeysTableView.tsx (1)
234-241: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winInclude the other Mantle secret-ref fields in this warning heuristic.
The new Mantle form also allows
access_key,secret_key,session_token,role_arn,external_id, andsession_nameto come from env/vault refs, but this check only looks atregionandkey.value. Unresolved refs in those other fields will still show as a hard failure instead of the warning state.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ui/app/workspace/providers/views/modelProviderKeysTableView.tsx` around lines 234 - 241, The warning heuristic in modelProviderKeysTableView’s hasSecretVarConfig check only considers bedrock_mantle_key_config.region and key.value, so add the other Mantle ref-capable fields to the same non-plain_text detection. Update the condition to inspect bedrock_mantle_key_config.access_key, secret_key, session_token, role_arn, external_id, and session_name alongside the existing region/value checks so unresolved env/vault refs in Mantle show the warning state instead of a hard failure.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@framework/configstore/migrations.go`:
- Around line 1114-1144: The migrationAddBedrockMantleKeyColumns change
currently only defines Migrate, so add an explicit rollback contract in the
migrator entry. Either implement Rollback to best-effort drop the
bedrock_mantle_* columns added to tables.TableKey, or mark this migration as
intentionally non-rollbackable if cleanup is not feasible. Keep the change
localized to migrationAddBedrockMantleKeyColumns and the migrator.New
definition.
In `@framework/configstore/tables/key.go`:
- Around line 288-341: BedrockMantle credentials are being copied into
persistence in BeforeSave without going through the existing
encryption/decryption flow, so they can be saved in plaintext while the row is
still marked encrypted. Update the Bedrock Mantle handling in the key save/load
path by extending the encrypt.IsEnabled() branch and the AfterFind decrypt
branch to include BedrockMantleAccessKey, BedrockMantleSecretKey,
BedrockMantleSessionToken, BedrockMantleRegion, BedrockMantleRoleARN,
BedrockMantleExternalID, and BedrockMantleRoleSessionName, keeping the encrypt
status in sync with the actual field state.
In `@ui/app/workspace/providers/fragments/apiKeysFormFragment.tsx`:
- Around line 131-148: The Mantle auth detection in apiKeysFormFragment’s
useEffect only runs on mount-like changes, so it misses updates after
ProviderKeyForm calls form.reset(...). Update the detection effect to also react
to the loaded form values or reset state, and ensure setBedrockMantleAuthType
and form.setValue("key.bedrock_mantle_key_config._auth_type", ...) run again
when existing Mantle credentials are repopulated so the correct api_key/explicit
view is shown instead of staying on the default iam_role state.
In `@ui/lib/schemas/providerForm.ts`:
- Around line 153-166: Update the Bedrock Mantle credential refinement in
providerForm’s schema so `session_token` alone does not pass validation; the
current `refine` on `access_key`/`secret_key` treats empty keys as valid even
when `session_token` is filled. Adjust the logic to require all three fields to
be empty for IAM auth, or require both `access_key` and `secret_key` to be
present regardless of `session_token`, and keep the existing error path/message
tied to the Bedrock Mantle config check.
In `@ui/lib/types/schemas.ts`:
- Around line 211-223: Update the Bedrock Mantle credential validation in the
schema refine so explicit auth cannot pass with both keys empty. Use the
existing `_auth_type` captured in the schema and adjust the refine on the
Bedrock Mantle config to require `access_key` and `secret_key` when `_auth_type`
is `"explicit"`, while keeping the current optional behavior only for the
non-explicit flow. Make the fix in the same validation block that currently
checks `isSecretVarSet(data.access_key)` and `isSecretVarSet(data.secret_key)`,
so `providerKeyForm` cannot save an explicit-auth config with only `region`.
---
Outside diff comments:
In `@ui/app/workspace/providers/views/modelProviderKeysTableView.tsx`:
- Around line 234-241: The warning heuristic in modelProviderKeysTableView’s
hasSecretVarConfig check only considers bedrock_mantle_key_config.region and
key.value, so add the other Mantle ref-capable fields to the same non-plain_text
detection. Update the condition to inspect bedrock_mantle_key_config.access_key,
secret_key, session_token, role_arn, external_id, and session_name alongside the
existing region/value checks so unresolved env/vault refs in Mantle show the
warning state instead of a hard failure.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a822cfa4-4d54-417a-a87d-df4f77b06a8e
📒 Files selected for processing (19)
core/bifrost.goframework/configstore/clientconfig.goframework/configstore/migrations.goframework/configstore/tables/key.gotransports/bifrost-http/handlers/provider_keys.gotransports/bifrost-http/integrations/anthropic.gotransports/bifrost-http/lib/config.gotransports/config.schema.jsonui/app/workspace/providers/dialogs/providerConfigSheet.tsxui/app/workspace/providers/fragments/apiKeysFormFragment.tsxui/app/workspace/providers/fragments/betaHeadersFormFragment.tsxui/app/workspace/providers/views/modelProviderKeysTableView.tsxui/app/workspace/providers/views/providerKeyForm.tsxui/lib/constants/config.tsui/lib/constants/icons.tsxui/lib/constants/logs.tsui/lib/schemas/providerForm.tsui/lib/types/config.tsui/lib/types/schemas.ts
24d4d45 to
d914e21
Compare
436c314 to
d48556a
Compare
d914e21 to
4eb1c31
Compare
d48556a to
753eda2
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ui/app/workspace/providers/fragments/apiKeysFormFragment.tsx (1)
1075-1122: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
data-testidparity with the Bedrock section is incomplete.The Bedrock branch attaches
data-testidto its assume-role inputs (apikey-bedrock-role-arn-input,apikey-bedrock-external-id-input,apikey-bedrock-session-name-input) at Lines 882/900/918, but the equivalent Mantle inputs here (role_arn,external_id,session_name) have none. The Mantle tabs and API-key input already follow the convention, so this leaves the assume-role fields unselectable for E2E tests.Per a prior maintainer preference, you may prefer to batch
data-testidadditions (with matchingtests/e2e/updates) into a dedicated PR rather than add them here — your call, but flagging the asymmetry for consistency.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ui/app/workspace/providers/fragments/apiKeysFormFragment.tsx` around lines 1075 - 1122, The Mantle assume-role fields in apiKeysFormFragment are missing the same data-testid parity used by the Bedrock inputs, leaving `role_arn`, `external_id`, and `session_name` hard to target in E2E tests. Update the `FormField` renders for `bedrock_mantle_key_config.role_arn`, `bedrock_mantle_key_config.external_id`, and `bedrock_mantle_key_config.session_name` to include matching test ids consistent with the existing API key and Bedrock naming pattern, and keep the `SecretVarInput` usage unchanged. If you’re batching test selector changes separately, make sure these Mantle selectors are tracked alongside any related `tests/e2e/` updates.Source: Learnings
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@ui/app/workspace/providers/fragments/apiKeysFormFragment.tsx`:
- Around line 1075-1122: The Mantle assume-role fields in apiKeysFormFragment
are missing the same data-testid parity used by the Bedrock inputs, leaving
`role_arn`, `external_id`, and `session_name` hard to target in E2E tests.
Update the `FormField` renders for `bedrock_mantle_key_config.role_arn`,
`bedrock_mantle_key_config.external_id`, and
`bedrock_mantle_key_config.session_name` to include matching test ids consistent
with the existing API key and Bedrock naming pattern, and keep the
`SecretVarInput` usage unchanged. If you’re batching test selector changes
separately, make sure these Mantle selectors are tracked alongside any related
`tests/e2e/` updates.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 916462a0-c618-46dd-949d-619601ec77a3
📒 Files selected for processing (19)
core/bifrost.goframework/configstore/clientconfig.goframework/configstore/migrations.goframework/configstore/tables/key.gotransports/bifrost-http/handlers/provider_keys.gotransports/bifrost-http/integrations/anthropic.gotransports/bifrost-http/lib/config.gotransports/config.schema.jsonui/app/workspace/providers/dialogs/providerConfigSheet.tsxui/app/workspace/providers/fragments/apiKeysFormFragment.tsxui/app/workspace/providers/fragments/betaHeadersFormFragment.tsxui/app/workspace/providers/views/modelProviderKeysTableView.tsxui/app/workspace/providers/views/providerKeyForm.tsxui/lib/constants/config.tsui/lib/constants/icons.tsxui/lib/constants/logs.tsui/lib/schemas/providerForm.tsui/lib/types/config.tsui/lib/types/schemas.ts
✅ Files skipped from review due to trivial changes (1)
- ui/lib/constants/config.ts
🚧 Files skipped from review as they are similar to previous changes (16)
- transports/bifrost-http/integrations/anthropic.go
- ui/app/workspace/providers/dialogs/providerConfigSheet.tsx
- ui/lib/constants/icons.tsx
- ui/app/workspace/providers/views/modelProviderKeysTableView.tsx
- transports/bifrost-http/handlers/provider_keys.go
- core/bifrost.go
- ui/app/workspace/providers/views/providerKeyForm.tsx
- ui/app/workspace/providers/fragments/betaHeadersFormFragment.tsx
- ui/lib/types/config.ts
- framework/configstore/clientconfig.go
- ui/lib/schemas/providerForm.ts
- transports/bifrost-http/lib/config.go
- framework/configstore/migrations.go
- transports/config.schema.json
- ui/lib/types/schemas.ts
- framework/configstore/tables/key.go
753eda2 to
f493060
Compare
4eb1c31 to
dc61459
Compare
Merge activity
|
dc61459 to
6b56b4d
Compare
f493060 to
9004cc8
Compare
The base branch was changed.
9004cc8 to
b5555cb
Compare
…on, and UI support (#4737) ## Summary Adds `bedrock_mantle` as a first-class provider, enabling Bifrost to route requests to AWS Bedrock through a Mantle proxy endpoint. The provider supports the same SigV4 credential options as the existing Bedrock provider (inherited IAM role, explicit access/secret key, session token, AssumeRole) as well as a Bearer API key authentication mode. ## Changes - Added `BedrockMantle` to the Anthropic passthrough allowlist in `clearAnthropicPassthroughForNonNativeProvider` so raw request bodies are preserved when routing through Bedrock Mantle. - Added `BedrockMantleKeyConfig` redaction logic in `clientconfig.go`, mirroring the existing Bedrock redaction pattern. - Added a new `migrationAddBedrockMantleKeyColumns` database migration that introduces seven `bedrock_mantle_*` SigV4 credential columns to the `config_keys` table. - Extended `TableKey` with the seven Bedrock Mantle credential fields, along with `BeforeSave` serialization and `AfterFind` reconstruction hooks. - Updated `mergeUpdatedKey` in the HTTP handler to correctly restore redacted Bedrock Mantle credential fields during key updates. - Fixed `isClaudeModel` in the Anthropic integration to recognize `bedrock_mantle` (previously incorrectly matched `bedrock`) as a provider that can serve Claude models. - Included `BedrockMantleKeyConfig` in the key hash inputs used by `mergeProviderKeys` and `reconcileProviderKeys` for config file/DB reconciliation. - Added Bedrock Mantle credential redaction to `GetAllKeys`. - Extended `config.schema.json` with `bedrock_mantle_key` and `provider_with_bedrock_mantle_config` definitions and registered `bedrock_mantle` as a valid provider name throughout the schema. - Added UI support: provider icon (reusing the Bedrock SVG mark with a distinct gradient ID), model placeholder text, `isKeyRequiredByProvider` entry, label, form schema (`BedrockMantleKeyConfigSchema`), type definitions (`BedrockMantleKeyConfig`, `DefaultBedrockMantleKeyConfig`), and a full authentication method tab UI (IAM Role / Explicit Credentials / API Key) matching the Bedrock provider UX. - Added `bedrock_mantle` to the Anthropic beta-headers provider family and the provider config sheet's Anthropic family list. - Stripped the internal `_auth_type` field from `bedrock_mantle_key_config` before submitting the form payload. ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [x] Transports (HTTP) - [x] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test ```sh # Core/Transports go version go test ./... # UI cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` Configure a `bedrock_mantle` provider in `config.json` or via the UI with one of the three auth methods: - **IAM Role (Inherited):** set only `region`; leave access/secret key empty. - **Explicit Credentials:** set `access_key`, `secret_key`, and `region`; optionally set `session_token`, `role_arn`, `external_id`, and `session_name`. - **API Key:** set `region` and provide a Bearer token as the key `value`. Send a request targeting a Claude model through the `bedrock_mantle` provider and verify the response is returned correctly and that credentials are redacted in the UI and API responses. ## Screenshots/Recordings _Add before/after screenshots of the new Bedrock Mantle provider form and icon in the UI._ ## Breaking changes - [ ] Yes - [x] No ## Related issues _Link related issues and discussions._ ## Security considerations - All seven Bedrock Mantle credential fields (`access_key`, `secret_key`, `session_token`, `region`, `role_arn`, `external_id`, `role_session_name`) are stored as `SecretVar` and are redacted in API responses and the UI, consistent with the existing Bedrock provider handling. - The `_auth_type` discriminator field is stripped from the payload before it is persisted or transmitted. ## 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
…on, and UI support (maximhq#4737) ## Summary Adds `bedrock_mantle` as a first-class provider, enabling Bifrost to route requests to AWS Bedrock through a Mantle proxy endpoint. The provider supports the same SigV4 credential options as the existing Bedrock provider (inherited IAM role, explicit access/secret key, session token, AssumeRole) as well as a Bearer API key authentication mode. ## Changes - Added `BedrockMantle` to the Anthropic passthrough allowlist in `clearAnthropicPassthroughForNonNativeProvider` so raw request bodies are preserved when routing through Bedrock Mantle. - Added `BedrockMantleKeyConfig` redaction logic in `clientconfig.go`, mirroring the existing Bedrock redaction pattern. - Added a new `migrationAddBedrockMantleKeyColumns` database migration that introduces seven `bedrock_mantle_*` SigV4 credential columns to the `config_keys` table. - Extended `TableKey` with the seven Bedrock Mantle credential fields, along with `BeforeSave` serialization and `AfterFind` reconstruction hooks. - Updated `mergeUpdatedKey` in the HTTP handler to correctly restore redacted Bedrock Mantle credential fields during key updates. - Fixed `isClaudeModel` in the Anthropic integration to recognize `bedrock_mantle` (previously incorrectly matched `bedrock`) as a provider that can serve Claude models. - Included `BedrockMantleKeyConfig` in the key hash inputs used by `mergeProviderKeys` and `reconcileProviderKeys` for config file/DB reconciliation. - Added Bedrock Mantle credential redaction to `GetAllKeys`. - Extended `config.schema.json` with `bedrock_mantle_key` and `provider_with_bedrock_mantle_config` definitions and registered `bedrock_mantle` as a valid provider name throughout the schema. - Added UI support: provider icon (reusing the Bedrock SVG mark with a distinct gradient ID), model placeholder text, `isKeyRequiredByProvider` entry, label, form schema (`BedrockMantleKeyConfigSchema`), type definitions (`BedrockMantleKeyConfig`, `DefaultBedrockMantleKeyConfig`), and a full authentication method tab UI (IAM Role / Explicit Credentials / API Key) matching the Bedrock provider UX. - Added `bedrock_mantle` to the Anthropic beta-headers provider family and the provider config sheet's Anthropic family list. - Stripped the internal `_auth_type` field from `bedrock_mantle_key_config` before submitting the form payload. ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [x] Transports (HTTP) - [x] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test ```sh # Core/Transports go version go test ./... # UI cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` Configure a `bedrock_mantle` provider in `config.json` or via the UI with one of the three auth methods: - **IAM Role (Inherited):** set only `region`; leave access/secret key empty. - **Explicit Credentials:** set `access_key`, `secret_key`, and `region`; optionally set `session_token`, `role_arn`, `external_id`, and `session_name`. - **API Key:** set `region` and provide a Bearer token as the key `value`. Send a request targeting a Claude model through the `bedrock_mantle` provider and verify the response is returned correctly and that credentials are redacted in the UI and API responses. ## Screenshots/Recordings _Add before/after screenshots of the new Bedrock Mantle provider form and icon in the UI._ ## Breaking changes - [ ] Yes - [x] No ## Related issues _Link related issues and discussions._ ## Security considerations - All seven Bedrock Mantle credential fields (`access_key`, `secret_key`, `session_token`, `region`, `role_arn`, `external_id`, `role_session_name`) are stored as `SecretVar` and are redacted in API responses and the UI, consistent with the existing Bedrock provider handling. - The `_auth_type` discriminator field is stripped from the payload before it is persisted or transmitted. ## 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
…on, and UI support (#4737) Adds `bedrock_mantle` as a first-class provider, enabling Bifrost to route requests to AWS Bedrock through a Mantle proxy endpoint. The provider supports the same SigV4 credential options as the existing Bedrock provider (inherited IAM role, explicit access/secret key, session token, AssumeRole) as well as a Bearer API key authentication mode. - Added `BedrockMantle` to the Anthropic passthrough allowlist in `clearAnthropicPassthroughForNonNativeProvider` so raw request bodies are preserved when routing through Bedrock Mantle. - Added `BedrockMantleKeyConfig` redaction logic in `clientconfig.go`, mirroring the existing Bedrock redaction pattern. - Added a new `migrationAddBedrockMantleKeyColumns` database migration that introduces seven `bedrock_mantle_*` SigV4 credential columns to the `config_keys` table. - Extended `TableKey` with the seven Bedrock Mantle credential fields, along with `BeforeSave` serialization and `AfterFind` reconstruction hooks. - Updated `mergeUpdatedKey` in the HTTP handler to correctly restore redacted Bedrock Mantle credential fields during key updates. - Fixed `isClaudeModel` in the Anthropic integration to recognize `bedrock_mantle` (previously incorrectly matched `bedrock`) as a provider that can serve Claude models. - Included `BedrockMantleKeyConfig` in the key hash inputs used by `mergeProviderKeys` and `reconcileProviderKeys` for config file/DB reconciliation. - Added Bedrock Mantle credential redaction to `GetAllKeys`. - Extended `config.schema.json` with `bedrock_mantle_key` and `provider_with_bedrock_mantle_config` definitions and registered `bedrock_mantle` as a valid provider name throughout the schema. - Added UI support: provider icon (reusing the Bedrock SVG mark with a distinct gradient ID), model placeholder text, `isKeyRequiredByProvider` entry, label, form schema (`BedrockMantleKeyConfigSchema`), type definitions (`BedrockMantleKeyConfig`, `DefaultBedrockMantleKeyConfig`), and a full authentication method tab UI (IAM Role / Explicit Credentials / API Key) matching the Bedrock provider UX. - Added `bedrock_mantle` to the Anthropic beta-headers provider family and the provider config sheet's Anthropic family list. - Stripped the internal `_auth_type` field from `bedrock_mantle_key_config` before submitting the form payload. - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI - [x] Core (Go) - [x] Transports (HTTP) - [x] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ```sh go version go test ./... cd ui pnpm i || npm i pnpm test || npm test pnpm build || npm run build ``` Configure a `bedrock_mantle` provider in `config.json` or via the UI with one of the three auth methods: - **IAM Role (Inherited):** set only `region`; leave access/secret key empty. - **Explicit Credentials:** set `access_key`, `secret_key`, and `region`; optionally set `session_token`, `role_arn`, `external_id`, and `session_name`. - **API Key:** set `region` and provide a Bearer token as the key `value`. Send a request targeting a Claude model through the `bedrock_mantle` provider and verify the response is returned correctly and that credentials are redacted in the UI and API responses. _Add before/after screenshots of the new Bedrock Mantle provider form and icon in the UI._ - [ ] Yes - [x] No _Link related issues and discussions._ - All seven Bedrock Mantle credential fields (`access_key`, `secret_key`, `session_token`, `region`, `role_arn`, `external_id`, `role_session_name`) are stored as `SecretVar` and are redacted in API responses and the UI, consistent with the existing Bedrock provider handling. - The `_auth_type` discriminator field is stripped from the payload before it is persisted or transmitted. - [ ] 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
bedrock_mantleas a first-class provider, enabling Bifrost to route requests to AWS Bedrock through a Mantle proxy endpoint. The provider supports the same SigV4 credential options as the existing Bedrock provider (inherited IAM role, explicit access/secret key, session token, AssumeRole) as well as a Bearer API key authentication mode.Changes
BedrockMantleto the Anthropic passthrough allowlist inclearAnthropicPassthroughForNonNativeProviderso raw request bodies are preserved when routing through Bedrock Mantle.BedrockMantleKeyConfigredaction logic inclientconfig.go, mirroring the existing Bedrock redaction pattern.migrationAddBedrockMantleKeyColumnsdatabase migration that introduces sevenbedrock_mantle_*SigV4 credential columns to theconfig_keystable.TableKeywith the seven Bedrock Mantle credential fields, along withBeforeSaveserialization andAfterFindreconstruction hooks.mergeUpdatedKeyin the HTTP handler to correctly restore redacted Bedrock Mantle credential fields during key updates.isClaudeModelin the Anthropic integration to recognizebedrock_mantle(previously incorrectly matchedbedrock) as a provider that can serve Claude models.BedrockMantleKeyConfigin the key hash inputs used bymergeProviderKeysandreconcileProviderKeysfor config file/DB reconciliation.GetAllKeys.config.schema.jsonwithbedrock_mantle_keyandprovider_with_bedrock_mantle_configdefinitions and registeredbedrock_mantleas a valid provider name throughout the schema.isKeyRequiredByProviderentry, label, form schema (BedrockMantleKeyConfigSchema), type definitions (BedrockMantleKeyConfig,DefaultBedrockMantleKeyConfig), and a full authentication method tab UI (IAM Role / Explicit Credentials / API Key) matching the Bedrock provider UX.bedrock_mantleto the Anthropic beta-headers provider family and the provider config sheet's Anthropic family list._auth_typefield frombedrock_mantle_key_configbefore submitting the form payload.Type of change
Affected areas
How to test
Configure a
bedrock_mantleprovider inconfig.jsonor via the UI with one of the three auth methods:region; leave access/secret key empty.access_key,secret_key, andregion; optionally setsession_token,role_arn,external_id, andsession_name.regionand provide a Bearer token as the keyvalue.Send a request targeting a Claude model through the
bedrock_mantleprovider and verify the response is returned correctly and that credentials are redacted in the UI and API responses.Screenshots/Recordings
Add before/after screenshots of the new Bedrock Mantle provider form and icon in the UI.
Breaking changes
Related issues
Link related issues and discussions.
Security considerations
access_key,secret_key,session_token,region,role_arn,external_id,role_session_name) are stored asSecretVarand are redacted in API responses and the UI, consistent with the existing Bedrock provider handling._auth_typediscriminator field is stripped from the payload before it is persisted or transmitted.Checklist
docs/contributing/README.mdand followed the guidelines