finds.dev← search

// the find

astaxie/TokenHub

★ 1,347 · Go · Apache-2.0 · updated Sep 2026

TokenHub gives enterprises a private gateway to unify AI model access and governance, making every request controllable, traceable, and attributable.

TokenHub is a self-hosted Go gateway that sits in front of OpenAI, Anthropic, and 150+ other model providers, adding project-scoped API keys, routing/failover policy, usage attribution, and provider bill reconciliation on top of the usual proxy. It's aimed at platform/infra teams who need to control and cost-attribute AI spend across many internal teams, not an individual developer wanting a quick multi-model client.

Reconciling internal usage logs against actual provider invoices (there are aliyun, oneapi, and newapi billing adapters in the tree) is a genuinely uncommon feature — most gateways stop at routing and skip the 'does our tracked usage match what we got billed' problem. It exposes both OpenAI-compatible endpoints and native Anthropic Messages endpoints, so it can front both ecosystems without client-side shims. There's a built-in migration path from existing LiteLLM/OneAPI/NewAPI deployments, which lowers the switching cost that usually kills gateway migrations. Deployment range is sensible: SQLite plus a native systemd installer for a single box, with an explicit path to PostgreSQL and multi-replica scaling instead of forcing Kubernetes from day one.

The README's 'Why TokenHub' section is pure positioning prose — no request/response example, no config snippet, no latency numbers for the extra routing hop, so you can't tell what integrating actually looks like without cloning the repo. There's real scope creep: on top of gateway/governance, the codebase carries a plugin marketplace with signature verification and trust chains, a custom migration bundle format, and a hand-rolled schema/migration system (checksums, ledger, backfill) instead of a standard tool like goose or atlas — a lot of surface area to audit for something you're trusting with API keys and billing data. The README also embeds sponsor plugs for third-party 'cheap Claude Code / GPT relay' resellers, which is an odd thing to platform in a tool pitched as enterprise governance infrastructure and worth being skeptical of. Routing and failover are described entirely in policy language with no worked example of an actual rule or how it's tested.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →