sunerpy

Bedrock Gateway Rust — AI skill for Claude Code

AI community

OpenAI-compatible HTTP gateway for Amazon Bedrock in one Rust binary: Chat Completions, Responses, Completions and Embeddings, with prompt caching and reasoning for Claude, GPT and Nova.

How to install Bedrock Gateway Rust

This entry records only its repository, not the path inside it, so there is no exact command to give. Open sunerpy/bedrock-gateway-rust and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Bedrock Gateway Rust does

OpenAI-compatible HTTP gateway for Amazon Bedrock in one Rust binary: Chat Completions, Responses, Completions and Embeddings, with prompt caching and reasoning for Claude, GPT and Nova.

Alternatives in AI

  • Xerj — Local-first search engine and MCP server for AI agents 12.5k ★
  • My Free Code — Open-source multi-provider AI gateway for Claude Code and other coding agents, with model routing, streaming 633 ★
  • Octocode — Structural code intelligence for AI agents — semantic search, knowledge graphs, and a built-in MCP server in o 464 ★

README

bedrock-gateway-rust

[![CI](https://github.com/sunerpy/bedrock-gateway-rust/actions/workflows/ci.yml/badge.svg)](https://github.com/sunerpy/bedrock-gateway-rust/actions/workflows/ci.yml) [![Docker Pulls](https://img.shields.io/docker/pulls/sunerpy/bedrock-gateway-rust)](https://hub.docker.com/r/sunerpy/bedrock-gateway-rust) [![License: MIT-0](https://img.shields.io/badge/License-MIT--0-yellow.svg)](LICENSE)

**An OpenAI-compatible HTTP gateway for Amazon Bedrock: Chat Completions, Responses, Completions and Embeddings from one Rust binary.**

🌐 Website: [firlab.app/bedrock-gateway](https://firlab.app/bedrock-gateway/) · 📖 [中文文档 / Chinese README](docs/readme/README_CN.md)

Point any OpenAI SDK, tool, or agent at this gateway and it routes requests to AWS Bedrock without a single line of client-side changes. The runtime is **axum + tokio + aws-sdk-bedrockruntime** — fully async, no GC pauses, no Python dependency. It replaces an earlier Python/FastAPI implementation while preserving wire-exact OpenAI API compatibility.


Highlights

  • 100% Rust — single statically-linked binary, distroless Docker image (~12 MB compressed), no GC, low memory footprint, high concurrency under load.
  • Wire-exact OpenAI compatibility — existing OpenAI SDKs, clients, and agents connect with zero code changes. No invented top-level fields; Bedrock-only features go through the standard extra_body mechanism.
  • OpenAI Responses API — full support for POST /api/v1/responses, including streaming. Required by codex (wire_api = "responses"). Stateless; store and previous_response_id are accepted and silently ignored.
  • Legacy text completions — POST /api/v1/completions for editors like Zed edit-prediction; reuses the Converse path and returns the text_completion shape (stream + non-stream).
  • Automatic prompt caching — cache-point injection is on by default. The gateway places cache points across tools, system prompt, and messages automatically (up