This repo has been archived in favour of https://github.com/DefangLabs/openai-access-gateway
A proxy server that converts OpenAI API requests to AWS Bedrock requests, allowing you to use OpenAI-compatible clients with AWS Bedrock. The Defang Bedrock Sidecar is deployed alongside Defang services, and presents an OpenAI-compatible interface for AWS Bedrock.
- Navigate to the Bedrock Model Access dashboard
- Click the "Modify model access" button
- Select the models you would like to use with Bedrock
- Click the "Next" button at the bottom of the page
- Click the "Submit" button
services:
app:
build:
context: .
dockerfile: Dockerfile
# Add this tag to set up integration with bedrock when deploying to aws
x-defang-llm: trueDEBUG: if set (to anything) will show debug logsMODEL_NAME_MAP: a JSON encoded map of model names to Bedrock model IDsPORT: the TCP port to listed on for HTTP API requests
- Intercepts OpenAI API requests
- Converts OpenAI chat completion requests to AWS Bedrock format
- Converts AWS Bedrock responses back to OpenAI format
- Supports basic chat completion functionality
- Currently only supports basic chat completion functionality
- Token counting is not implemented
See our Contributing document.