Which self-hosted AI gateway/proxy tool fits this effort's needs? #10
Notifications
Due Date
No due date set.
Blocks
#11 Reference cloud model/pricing for the shadow-cost estimate
haylan/LLM-Server
#12 How should per-workload API keys/accounts be provisioned, rotated, and documented?
haylan/LLM-Server
#14 Author the docker-compose service for the chosen proxy
haylan/LLM-Server
Reference: haylan/LLM-Server#10
Reference in New Issue
Block a user
Part of #9
Question
Which self-hosted AI gateway/proxy tool should front llama.cpp for this effort? It needs, at minimum:
Compare candidates (LiteLLM proxy is a plausible leading option per #9's Notes, but confirm rather than assume) against alternatives (e.g. Portkey, Helicone, a lighter custom option) and recommend one, with the reasoning and any gaps/risks (e.g. interaction with Lazytainer's idle-stop, compatibility with llama.cpp's Anthropic Messages shim).
Recommendation: LiteLLM proxy (MIT-licensed, BerriAI/litellm).
It's the only self-hostable candidate meeting all hard requirements out of the box: virtual keys with per-key/per-team spend (
/key/generate,/key/info), a self-hosted Admin UI spend dashboard included in the free build, config-driven custom per-token pricing (model_info.input_cost_per_token/output_cost_per_token— feeds #11 directly), a unified/v1/messagesendpoint that translates Anthropic-format calls to an OpenAI-format backend (so it fronts both Open WebUI and Anthropic-format coding CLIs against llama.cpp), a documented 2-service docker-compose deploy (gateway + Postgres, Redis optional), and an arbitrary-providermodel_listso more backends are a config edit later.Alternatives checked and rejected:
Risks/gaps carried forward (see doc for detail): LiteLLM's background health-checks could keep Lazytainer's idle-suspend from ever triggering (verify/tune in #14); two plausible wirings exist for llama.cpp's native /v1/messages shim vs. LiteLLM's own translation (pick in #14/#15); LiteLLM's priority/queueing scheduler is real but beta with at least one declined bug report, and its stronger reserved-capacity variant is enterprise-gated — treat as a starting point for #16 to validate hands-on, not a solved problem.
Full findings + sources: docs/research/proxy-tool-choice.md on branch research/proxy-tool-choice