Show HN: ShanHaiGateway – multi-upstream LLM gateway in Go
Category: infrastructure
Tags: llm-gateway, api-proxy, load-balancing, cost-optimization, go
Score: 6.5/10 (Innovation: 6, Technical: 7, Documentation: 7, Utility: 6)
ShanHaiGateway is an OpenAI-compatible gateway that pools multiple LLM upstream providers with weighted round-robin, quota-aware exponential cooling, session affinity for prefix caching, and a sidecar for quota-window probing and auto-eviction. It stands out for its operational semantics derived from real production incidents and its ability to mix free tiers and commercial channels to cut costs dramatically while maintaining stability.
Target audience: backend developers, devops, AI infrastructure engineers
Repository: https://github.com/ffseika0304/shanhai-gateway · Go · MIT · 7 stars
View on Hacker News