ZhiYi-R/moon-bridge
Moon Bridge 是一个用 Go 编写的协议转换与模型路由代理。对外暴露 OpenAI Responses API(/v1/responses),对内支持 Anthropic Messages、Google Gemini(GenAI)、OpenAI Chat Completions 等多种上游协议。客户端指定不同模型别名时,自动将请求路由到对应上游 Provider 并在协议间自动转换。
What it solves
Moon Bridge is a protocol conversion and model routing proxy designed to unify different AI model APIs. It allows users to interact with various providers (such as Anthropic, Google Gemini, and OpenAI) using a single, standardized interface (the OpenAI Responses API), eliminating the need to configure multiple different API formats for every tool or application.
How it works
The project acts as a middleware that translates requests from the OpenAI Responses API format into the specific protocols required by upstream providers like Anthropic Messages or Google Gemini. It uses a routing system where model aliases are mapped to specific upstream providers and model names. It also supports three operational modes: Transform for full protocol conversion, and CaptureAnthropic or CaptureResponse for transparent forwarding.
Who it’s for
It is primarily for developers and users of AI tools (such as Codex CLI or Claude Code) who want to use a variety of different LLM providers through a single API endpoint without changing their client-side configuration for each provider.
Highlights
- Protocol Translation: Converts OpenAI Responses requests to Anthropic, Gemini, and OpenAI formats.
- Model Routing: Maps model aliases to specific upstream providers via configuration.
- Plugin System: Provides
CorePluginHooksfor request preprocessing, response post-processing, and stream interception. - Web Search Integration: Supports automatic or injected web search via Tavily and Firecrawl.
- Prompt Caching: Offers explicit, automatic, and hybrid caching modes.
- Management Tools: Includes an embedded Web Console and a management API for hot-reloading configurations.
Related
- Project
- Project
- Project
- Project
- Project