[AI GATEWAY] Add AWS Bedrock multi-provider support#2643
Open
Aakashwije wants to merge 1 commit into
Open
Conversation
Aakashwije
requested review from
AnuGayan,
Arshardh,
CrowleyRajapakse,
HeshanSudarshana,
HiranyaKavishani,
Krishanx92,
PasanT9,
RakhithaRR,
Tharsanan1,
Thushani-Jayasekera,
VirajSalaka,
ashera96,
chamilaadhi,
dushaniw,
hisanhunais,
lasanthaS,
malinthaprasan,
pubudu538,
renuka-fernando,
senthuran16,
tgtshanika,
tharikaGitHub,
tharindu1st and
thivindu
as code owners
July 13, 2026 15:00
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Aakashwije
force-pushed
the
feat/aws-bedrock-provider-mpr
branch
from
July 13, 2026 15:06
e48ad21 to
22de075
Compare
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.
Purpose
AWS Bedrock support is required so AI Gateway users can invoke Bedrock models using Amazon Bedrock API keys and expose them through OpenAI-compatible LLM proxies.
This change addresses the following issues:
pathParam./bedrockwere embedded in named upstream URLs. Named upstream URLs are host-only, so the context was dropped and multi-provider requests returned HTTP 404.Related issue: N/A — no issue link was provided.
Goals
Authorization: Bearer <key>.Approach
Added Bedrock authentication metadata to the platform provider template.
Replaced the unsupported lookbehind regex with the following RE2-compatible capture-group expression:
Added
pathParamanalytics extraction using a cached compiled regular expression.Passed the request path through buffered and streaming analytics extraction.
Updated LLM proxy transformation so named additional-provider upstreams:
upstreamDefinitions[].basePath.Added unit tests covering Bedrock model/token analytics and additional-provider base-path preservation.
Added sample YAML configurations for:
No UI changes are included, so no screenshot or animated GIF is required.
User stories
x-providerrouting header.Documentation
N/A — no published product-documentation pages are changed.
The PR includes the following configuration samples:
gateway/examples/bedrock-provider.yamlgateway/examples/bedrock-openai-proxy.yamlAutomation tests
Unit tests
The following tests were executed successfully:
Coverage was added for:
A numerical coverage percentage was not collected.
Integration tests
No new automated integration-test feature was added in this PR.
Manual E2E testing was completed against real provider accounts:
x-provider: bedrock.data: [DONE].Models tested:
us.amazon.nova-lite-v1:0claude-sonnet-4-5-20250929Security checks
The committed sample files contain placeholders only. Real AWS, Anthropic, gateway loopback, and consumer API keys were not committed.
Samples
Native Bedrock provider
File:
Demonstrates:
/model/{model}/converseand streaming access.OpenAI-to-Bedrock proxy
File:
Demonstrates:
/chat/completionsendpoint.Related PRs
wso2/api-platform:multi-provider-routingTest environment
rancher-desktop1.2.0-M2-SNAPSHOTgo1.26.5 darwin/amd64us.amazon.nova-lite-v1:0claude-sonnet-4-5-20250929curl,jq, and Docker Compose