Skip to main content

Overview

Bifrost provides a Bedrock-compatible endpoint for the Converse and Invoke APIs via protocol adaptation. The integration handles request transformation, response normalization, and error mapping between AWS Bedrock’s API specification and Bifrost’s internal processing pipeline. This integration enables you to utilize Bifrost’s features like governance, load balancing, semantic caching, multi-provider support, and more, all while preserving your existing Bedrock SDK-based architecture. Endpoint: /bedrock

Setup

Provider/Model Usage Examples

Because Bedrock itself is a multi-provider platform, you can use any Bedrock-supported model ID and still route through Bifrost. Bifrost will handle governance, observability, and other cross-cutting concerns.

Adding Custom Headers

Pass custom headers required by Bifrost plugins (like governance, telemetry, etc.) using boto3’s event system:
Note: Use register_first to ensure headers are added before request signing. The event name format is before-sign.<service-name>.<operation-name>. You need to register for each API operation you plan to use (Converse, ConverseStream, InvokeModel, etc.).

Streaming Examples

Converse Stream

Use converse_stream for chat-based streaming with a unified interface across models.

Invoke Stream

Use invoke_model_with_response_stream for model-specific streaming payloads.

Supported Features

The Bedrock integration currently supports:
  • Converse API (/bedrock/model/{modelId}/converse) for text/chat-style workloads
  • Invoke API (/bedrock/model/{modelId}/invoke) for model-specific text completion workloads
  • Streaming via converse_stream and invoke_model_with_response_stream
  • Tools via toolConfig, toolUse, and toolResult inside Converse requests
  • Image and multimodal responses where supported by the underlying Bedrock model
  • All Bifrost core features that apply to these flows (governance, load balancing, semantic cache, observability, etc.)

Next Steps