← Back to Leaderboard
Alooplj

looplj/axonhub

Self-hosted LLM gateway for cross-provider routing, failover, and cost tracking

Engineering Health (Methodology)
A+ · 97/100
Maintenance Activity
● Updated yesterday
Latest Release
v1.0.0-rc.5
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption22/25
Release Cadence20/20
License Clarity20/20
DockerSelf-HostedAPI
Total Stars
★ 5,514
24h Growth
+2
7d Growth
+25
Forks
779

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

looplj/axonhub Star History (2025-09-12 - 2026-12-04) ALL-TIME STAR HISTORY (2025-09 – 2026-12) +5.5k in 448d · avg +12/day 5.8k 2.9k 0 2025-09-12: ★ 12025-10-11: ★ 1312025-11-08: ★ 1912025-12-06: ★ 6632026-01-03: ★ 1,1402026-01-31: ★ 1,4902026-02-28: ★ 1,9962026-03-28: ★ 2,6342026-04-25: ★ 3,2422026-05-23: ★ 3,8212026-06-20: ★ 4,2522026-07-18: ★ 4,6262026-08-15: ★ 4,8892026-09-12: ★ 5,1452026-10-10: ★ 5,3032026-11-07: ★ 5,4202026-12-04: ★ 5,514 ★ 5.5k 2025-09 2026-04 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

AxonHub is a Go gateway in front of upstream inference services, not a model server. Clients send requests to OpenAI-, Anthropic-, or Gemini-compatible endpoints using AxonHub credentials. For supported combinations, the gateway translates the client protocol into the selected upstream format. Provider credentials and model availability are configured on channels, separating the client-facing API from the routing and failover configuration.

The tree separates cmd/, internal/, llm/, and frontend/. The browser dashboard is used to configure providers, models, and client keys and to inspect requests and traces. go.mod includes Ent, gqlgen, Atlas, and coder/websocket, showing dependencies for data access, GraphQL, schema tooling, and WebSocket transport. The tree also includes plugins/, but that alone does not establish a public or stable plugin interface.

Key Capabilities & Differentiators

The text API bridges OpenAI, Anthropic, and Gemini client formats. The provider catalog includes GPT-4o and GPT-5, Claude, Gemini 2.5, DeepSeek-V3.1, GLM-4.5, Kimi K2, Doubao, and OpenRouter. Endpoint coverage extends to image generation, embeddings, reranking, and realtime conversation. Coverage varies by provider and model: Jina AI is listed for embeddings and reranking, while AWS Bedrock and Google Cloud integrations are marked as testing.

Beyond protocol conversion, AxonHub centralizes channel load balancing and automatic failover, thread-level request timelines, role-based access, usage quotas, and data isolation. Its cost breakdown distinguishes input, output, and cached tokens per request. Those controls let operators investigate routing, usage, and spend at the same gateway, but endpoint compatibility is not a promise that every provider-specific parameter, tool call, or streaming behavior translates unchanged.

Trade-offs & Limitations

Compared with calling the OpenAI API directly, AxonHub lets multiple applications keep a common client-facing interface while an operator changes upstream channels, applies quotas, and tracks usage in one place. The trade-off is another network hop and another service to operate: the gateway, its database, and its credential store become infrastructure shared by downstream clients. A single-provider application that relies on provider-native features may be simpler to run against the native API.

Changing the base URL and key can be enough for basic chat, but validate streaming, tool calls, error handling, and failover under real traffic before treating different channels as interchangeable. Self-hosting gives you control over gateway configuration and storage, not over how an external provider processes forwarded requests. Review trace access and retention alongside provider data policies. For redistribution or modified builds, inspect NOTICE, LICENSE, and llm/LICENSE: the project uses both Apache-2.0 and LGPL-3.0.

Hardware & Deployment Guide

The Docker Compose path pairs AxonHub with PostgreSQL and persists the database in a named volume. Set AXONHUB_IMAGE, POSTGRES_IMAGE, and DB_PASSWORD; use immutable image digests for production. The default host bind is loopback. For server.base_path: /axonhub or AXONHUB_SERVER_BASE_PATH=/axonhub, configure the reverse proxy to forward the full path without stripping the prefix. The dashboard is at /axonhub/, the OpenAI-compatible base URL at /axonhub/v1, and the health endpoint at /axonhub/health.

After startup, create an administrator, add and test a provider channel and its models, then issue an AxonHub key for clients. The gateway does not need model VRAM; size it for concurrent traffic and long-lived connections, and size PostgreSQL for request volume and retained traces. Self-hosting the gateway still requires connectivity to the configured upstream endpoints. The v1.0.0-rc.3 through rc.5 releases list desktop builds with automatic updates; evaluate those separately from the Compose server path, and test upgrades and restores before putting a release candidate into production.

Protocol translation: OpenAI-, Anthropic-, and Gemini-compatible text APIs with configurable upstream provider channels.
Routing: Load balancing and automatic failover across configured channels, managed separately from client SDK integration.
Usage governance: RBAC, usage quotas, data isolation, and per-request costs broken down by input, output, and cached tokens.
Observability: Thread-level request timelines for diagnosing errors across related calls.
API coverage: Text generation, image generation, embeddings, reranking, and realtime conversation, with provider-specific coverage.
Self-hosting: Docker Compose pairs the Go gateway with PostgreSQL; explicit image references, a required database password, and a loopback bind establish the default deployment posture.
Best For

Platform teams routing several AI applications or coding tools across supported providers while centralizing access, quotas, traces, and costs.

Skip If

You need offline model inference, or you use a single provider and need its native API behavior without operating another service.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedAPI
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8090/v1",
    api_key="your-axonhub-api-key"
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello, AxonHub!"}]
)

print(response.choices[0].message.content)

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
axonhub ★5.5k+25GoApache-2.0Self-hosted LLM gateway for cross-provider routing, failover, and cost tracking
gpt-load7.2k+6GoMITSelf-hosted Go gateway for routing LLM traffic across providers and credentials
bifrost10.2k+125GoApache-2.0Self-hosted Go gateway for routing and governing multi-provider LLM traffic
freellmapi62k+2.6kTypeScriptMITSelf-hosted LLM gateway for routing across free tiers and custom endpoints

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/looplj/axonhub.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

looplj/axonhub Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about axonhub

How do I route an existing SDK through AxonHub?

For the documented OpenAI SDK path, point the client base URL at the gateway’s /v1 endpoint and use an AxonHub API key. Then select a model configured on an enabled provider channel. The SDK can stay in place, but changing providers still calls for testing the endpoint, request options, and response behavior your application uses.

Does the gateway need a GPU, and what should I size instead?

The documented Docker deployment runs a Go gateway and PostgreSQL, not a model runtime, so it does not require a GPU or model VRAM on the gateway host. Size CPU, RAM, and network capacity against concurrent requests and long-lived connections. Size PostgreSQL storage and I/O against request volume and the amount of trace data you plan to retain. Benchmark using your own traffic mix rather than choosing hardware based on model size.

Can we self-host it commercially, and what compliance checks matter?

Commercial self-hosting is generally possible under Apache-2.0 and LGPL-3.0, but the project uses both licenses. Consult NOTICE, LICENSE, and llm/LICENSE to establish component scope and check the applicable obligations, especially if you modify or redistribute a build. Separately review provider terms and data-handling requirements: running the gateway yourself does not keep prompts on your infrastructure when requests are routed to an external provider.

When is AxonHub a better fit than calling the OpenAI API directly?

Direct OpenAI API integration is simpler when OpenAI is your only provider and native feature coverage matters more than shared routing or observability. Choose AxonHub when several clients or teams need a common endpoint with configurable upstream channels, quotas, failover, traces, and cost visibility. AxonHub does not replace upstream inference or eliminate provider charges.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining looplj/axonhub? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature looplj/axonhub on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare