ZL

zwldarren/llm-proxy

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

3 stars 0 forks Качество 61 Тренд 24MIT

A self-hostable, multi-provider LLM API gateway with protocol translation, streaming, rate limiting, MCP integration, and a Vue 3 admin dashboard.

Обзор

One gateway for every LLM. Any client protocol in, any provider out — with smart routing, cost control, and a full admin console. LLM Proxy is a self-hostable LLM API gateway. Point your existing OpenAI or Anthropic SDK at it and instantly gain access to every configured provider — with automatic failover, cost-aware routing, per-key budgets, request logging, and an admin dashboard to manage it all without restarts. - — Your app speaks one protocol (OpenAI or Anthropic); the proxy translates bidirectionally to every upstream. Switch providers by changing a model name, not your code. - — Priority-based provider fallback with circuit breakers retries the next provider automatically when one fails or rate-limits. - — Virtual models auto / fast / best classify each request and pick the right real model for cost and quality.

README

Показан фрагмент оригинального README. Открыть оригинал.

LLM Proxy

A self-hosted gateway for LLM APIs. Clients send OpenAI, Anthropic, or Cohere-compatible requests; the proxy forwards each one to a configured provider and translates the response back.

LLM Proxy sits between your application and the model providers you pay for. Point an OpenAI or Anthropic SDK at the proxy, or a Cohere SDK at the rerank endpoint, and the proxy sends the request to whichever upstream serves the requested model. Supported providers include OpenAI, Anthropic, Gemini, OpenRouter, Ollama, vLLM, SGLang, and any OpenAI-compatible endpoint. Fallback, per-key budgets, request logs, and the admin console are built in. Configuration lives in the database and is applied without a restart.

Contents

How it works

Client                     LLM Proxy                                  Upstream
OpenAI / Anthropic /  ──▶  parse to InternalRequest                   provider API
Cohere rerank wire         route: mapping, allowlists, budgets,   ──▶  (built-in
                           retries, fallback, circuit breaker           adapters)
                      ◀──  translate back to the client's protocol

The proxy parses each client request into an internal request model. A protocol serializer handles the client side, and a provider serializer builds the upstream body. A request can arrive as OpenAI Chat Completions and leave as Anthropic Messages, or be forwarded unchanged when both sides use the same protocol.

Why LLM Proxy

  • Clients keep their existing SDK and change only the base URL. Model names are defined in the proxy, so one name can point to any upstream model.
  • Failed requests retry on the same provider and then fall back to the next mapping. A circuit breaker skips providers that keep failing.
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →