# LiteLLM vs Tencent Cloud TokenHub

> LiteLLM scores 62.4 (B) to Tencent Cloud TokenHub's 59.5 (C) for model routing. Prices, MCP, x402, uptime and agent notes side by side.

- Canonical: https://www.anchorterminal.com/compare/litellm-vs-tencent-tokenhub
- Markdown: https://www.anchorterminal.com/compare/litellm-vs-tencent-tokenhub.md (~5,800 tokens)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-07

LiteLLM scores 62.4 (B) on agent readiness against Tencent Cloud TokenHub's 59.5 (C), and leads in 6 of 7 scored categories. Both do model routing.

- LiteLLM: grade B, 62.4/100, rank #559 of 1510. Markdown https://www.anchorterminal.com/tools/litellm.md · JSON https://www.anchorterminal.com/api/v1/tools/litellm.json
- Tencent Cloud TokenHub: grade C, 59.5/100, rank #703 of 1510. Markdown https://www.anchorterminal.com/tools/tencent-tokenhub.md · JSON https://www.anchorterminal.com/api/v1/tools/tencent-tokenhub.json
- Best model APIs and inference for AI agents: https://www.anchorterminal.com/best/inference/index.md
- All 830 models comparisons: https://www.anchorterminal.com/compare/inference/index.md

## Which one, for what

### LiteLLM (B)

Good for: Teams that want one OpenAI-compatible endpoint over many providers on their own infrastructure, with per-key budgets, model allowlists and an MCP gateway.

Ahead on:
- Reliability, 70 against 46
- Schema & documentation, 91 against 73
- Payments & pricing, 60 against 35
- Maintenance & community, 82 against 73
- Transparency & trust, 63 against 54

Also in its favour:
- Open source

Watch for: litellm 1.82.7 and 1.82.8 on PyPI carried a credential stealer for about 40 minutes on 24 March 2026

### Tencent Cloud TokenHub (C)

Good for: Teams in or near Tencent Cloud that want one key and bill for Tencent's Hy models and Chinese open-weight models (DeepSeek, Kimi, GLM, MiniMax, Qwen, MiMo) with per-key limits and CNY billing.

Also in its favour:
- A hosted endpoint, with nothing to install

Watch for: Sign-up needs a Tencent Cloud account with real-name verification. The international site answered with a bot check, so access from outside China was not established


## Why the edge

### Payments & pricing: LiteLLM +25

- LiteLLM (60): Read with the self-hosted rule, since an agent uses the free gateway and Enterprise is a sales-led licence for the same software. No x402, MPP or L402 (0). MIT with no account and no card, so 20, 20 and 20 on the last three lines. Model calls cost what the operator's provider keys cost.
- Tencent Cloud TokenHub (35): No x402, MPP or L402 (0). Per-token prices for every model are public in CNY for Guangzhou and Singapore, with DeepSeek's peak and off-peak rates (20). Each account gets 1M free tokens per language model, valid for a year, in a campaign running to 31 December 2026. No card is mentioned, but the account needs real-name verification, so this line takes 15 of 20. A person signs up and completes real-name verification in a browser. Keys can then be created in code or by `thcli auth login`, but only from that account (0).

### Reliability: LiteLLM +24

- LiteLLM (70): Read with the local-software lines, since the gateway runs on the operator's hardware and BerriAI hosts nothing an agent calls. litellm on PyPI states Python 3.10 to 3.14, and the gateway ships as a Docker image, a Helm chart and Terraform modules, with GHCR images signed by cosign (20). 51 GitHub Actions workflows plus a CircleCI config cover unit, proxy-database, end-to-end, chaos, mutation and UI tests. The GitHub API was rate-limited for our reader on 6 November and Actions pages refused it on 6 October, so we couldn't confirm main is passing (15 of 25). The issue tracker showed 1,674 open issues on 6 November, with eight bug reports among the 15 newest, seven of them with a reply, against a project that tags several releases a day (10 of 25, down from an unchecked 12). Release notes carry breaking-change bullets, but breaking changes land in weekly minor releases on the 1.x line, so version numbers don't signal them (10 of 15). 1.108.1, past 1.0 (15).
- Tencent Cloud TokenHub (46): Hosted reading. No public status page was found. status.cloud.tencent.com did not answer and the Tencent Cloud health dashboard documentation answered with a bot check (0). With no page there is no incident record to read (5 of 30). The announcements carry one incident, DeepSeek's directly supplied models unavailable from 9:06 to 13:04 Beijing time on 15 October 2026 after a fault at DeepSeek, compensated with vouchers. Rate limits are per model, shown in the console and returned by DescribeModelQuota. The public docs give numbers only for batch jobs (20 created a minute, 10 active), image models (5 concurrent) and DeepSeek V4 Flash and Pro (2,500 and 500 concurrent), with the rules for self-serve increases (8 of 15). Six 429 codes separate RPM, TPM, TPD, concurrency and upstream capacity, 429s may carry `Retry-After` and the docs advise exponential backoff. No idempotency guidance, though inference calls are not writes (13 of 15). The TokenHub SLA promises 99.5% monthly availability with vouchers of 10, 25 or 50 per cent of the month's fee. It excludes free use and third-party deployed models such as DeepSeek's directly supplied ones (10). Generally available since 7 April 2026, with some models marked preview (10).

### Schema & documentation: LiteLLM +18

- LiteLLM (91): Every gateway serves Swagger at /, ReDoc at /redoc and the raw schema at /openapi.json, and the docs host a public Swagger explorer (25). llms.txt, llms-full.txt and a Markdown twin of every page via `.md` (10). Pages say what a feature is for and where its limits are, and the key-auth page explains how permissions are inherited and where they aren't, but the reference is very large for a model to navigate (16 of 20). OpenAI-shaped request schemas from Pydantic models, with `metadata`, `litellm_params` and config blocks left as free-form objects (10 of 15). A full error reference with the envelope, every status, response headers and how to tell gateway limits from provider limits, plus examples on every page (15). Release notes per version with dates, newest v1.108.0 and v1.106.7 on 4 November 2026 (15).
- Tencent Cloud TokenHub (73): Router, scored on the API lines. No OpenAPI file for the inference routes. Field pages document the OpenAI Chat Completions, OpenAI Responses and Anthropic Messages formats as TokenHub implements them, and the control plane is a Tencent Cloud API 3.0 service (version 2026-03-22) with typed parameters, API Explorer and SDKs (12 of 25). An llms.txt at cloud.tencent.com/document/product/1823/llms.txt links a Markdown copy of each docs page (10). The docs say which models support thinking, tools, structured output and caching, how TokenHub departs from each standard protocol, and which DeepSeek model suits which job. The quickstart's examples still use `deepseek-v3`, which is not in the model list, and Qwen3.5 stays in the list with a past shutdown date (13 of 20). Protocol pages list each field with type, required flag and default, and control-plane parameters carry enums and required flags (10 of 15). Examples in curl, Python, Node.js, Java and Go, and an error page listing 30 codes with HTTP status, cause and fix (14 of 15). Paths carry `/v1`, release notes are dated monthly from 7 April to 24 October 2026, and the control-plane API has a dated history of 26 releases to 18 September 2026 (14 of 15).

### Maintenance & community: LiteLLM +9

- LiteLLM (82): v1.108.1 tagged on 5 November 2026, v1.108.0 and v1.106.7 on 3 and 4 November (30). 125 tags between 8 August and 6 November, stable, patch, release-candidate and dev builds, with patch releases for four minor lines at once (20). Reply times not measured. On the issues page 7 of the 15 newest had a reply on the day, workflows auto-close duplicates and label issues, and Discord is the listed community channel (12 of 25). The package is the official SDK, current, with OpenAI and Anthropic SDKs working against the gateway (12 of 15). Dependency and image scanning (OSV, zizmor, Scorecard, grype) run in CI, with pass state unchecked (8 of 10).
- Tencent Cloud TokenHub (73): Closed service, read on the model lines. The newest release note is dated 24 October 2026 and the price page was updated on 31 October (30). The four retirement notices read gave 21 to 33 days, and eligible callers are switched to a successor at its price. No minimum notice period is written, and DeepSeek-V4.1-Flash (directly supplied) was moved to the 1017 version under the same ids on 17 October 2026 in a notice dated two days later (7 of 12). 18 retirement notices from 21 April to 22 October 2026, 12 of them since 3 August (3 of 8). Dated release notes and announcements, ticket and phone support around the clock and a Q&A community (13 of 15). Replies on the THCLI repository were not sampled (3 of 10). Tencent Cloud SDK 3.0 in several languages covers the control plane and `tencent-tokenhub-cli` 1.0.2 was published on 30 October 2026. No inference SDK of its own (12 of 15). The CLI has four releases since 15 September 2026, lists no runtime dependencies and needs Node.js 18 or later. CI not checked (5 of 10).

### Transparency & trust: LiteLLM +9

- LiteLLM (63): MIT for everything outside enterprise/, which has its own licence (25 of 30). The data security page (updated 6 November 2026) and security.md agree that a self-hosted gateway sends no data or telemetry to BerriAI, and the gateway stores prompts and spend in the operator's own Postgres. We found no terms of service or privacy policy on litellm.ai for its site, trial or Enterprise licence (20 of 30). A version support policy since 29 June 2026 (four stable minor lines), deprecated pages labelled in the docs, and release notes with breaking-change bullets (15 of 20). Usage telemetry, new in v1.107.0, is off by default, lists every field it can send and goes only to a table or endpoint the operator sets. A main-branch commit of 23 October 2026 made the Admin UI chat post a hashed user id to chat-telemetry.litellm.ai, and it was removed on 24 October before any tagged release contained it, so it isn't deducted. The start-up fetch of the price map from GitHub is documented with an opt-out (17 of 20).
- Tencent Cloud TokenHub (54): Closed service under the TokenHub Terms of Service (effective 14 September 2026), the SLA (23 April 2026), a special note on third-party deployed models and the Tencent Cloud Service Agreement, naming Tencent Cloud Computing (Beijing) Co., Ltd. The CLI is Apache-2.0 (18 of 30). The terms and the FAQ agree that inputs are processed on the customer's instructions and not used for training, and clause 2.14 limits retention to what the service needs without periods. The TokenHub privacy policy on privacy.qq.com renders only with JavaScript and was not read (15 of 30). Dated retirement notices, shutdown dates in the model list, a `pre-offline` status in `/v1/models` and a `DiscontinuedAt` field in the control API. Clause 6.3 refunds paid, unused tokens when a third-party model is removed. No minimum notice period is written (13 of 20). Clause 2.13 places processing generally in mainland China for the China site and in Singapore for the international site, and the third-party model list names DeepSeek's Hangzhou company with a link to its terms. No subprocessor list was found (13 of 20).

## Score by category

| Category | Weight | LiteLLM | Tencent Cloud TokenHub | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% (20 this run) | 70 | 46 | LiteLLM +24 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% (16.2 this run) | 91 | 73 | LiteLLM +18 |
| Agent ergonomics | 13% (16.2 this run) | 79 | 83 | Tencent Cloud TokenHub +4 |
| Security & auth | 14% (17.5 this run) | 72 | 71 | LiteLLM +1 |
| Payments & pricing | 10% (12.5 this run) | 60 | 35 | LiteLLM +25 |
| Task success | 10%, pending | pending | pending | not scored in this run |
| Maintenance & community | 7% (8.8 this run) | 82 | 73 | LiteLLM +9 |
| Transparency & trust | 7% (8.8 this run) | 63 | 54 | LiteLLM +9 |
| Negative events | ≤15 | -12 | -3 | |
| **Total** | | **62.4 · B** | **59.5 · C** | |

## Facts side by side

| Fact | LiteLLM | Tencent Cloud TokenHub |
| --- | --- | --- |
| Kind | Model router | Model router |
| Vendor | BerriAI | Tencent Cloud |
| Hosted endpoint | no (local only) | `https://tokenhub.tencentmaas.com/v1` |
| Transports | HTTP | HTTP |
| Auth | API key | API key |
| Pricing | Freemium | Pay per use |
| x402 | no | no |
| Licence | MIT, except the enterprise/ directory, which is under its own licence and needs an Enterprise licence key | Proprietary service under the TokenHub Terms of Service, the TokenHub SLA and the Tencent Cloud Service Agreement, with a special note for third-party deployed models. The `tencent-tokenhub-cli` package is Apache-2.0 |
| Read-only variant documented | no | no |
| llms.txt | yes | yes |
| Last release | 2026-11-05 | 2026-10-24 |
| Terms last updated | no document linked | couldn't be read |
| Privacy policy last updated | no date given | couldn't be read |
| Customer content may train models | not read yet | couldn't be read |
| Terms restrict automated access | not read yet | couldn't be read |
| Terms restrict benchmarking | not read yet | couldn't be read |
| Terms or service can change without notice | not read yet | couldn't be read |
| Arbitration or class-action waiver | not read yet | couldn't be read |
| Popularity | 63k stars, 22.5M PyPI/wk | 204 npm/wk |

## Verdicts

**LiteLLM.** An MIT-licensed gateway that puts 100+ model providers behind one OpenAI-compatible API, with virtual keys, budgets, fallbacks and an MCP gateway, released several times a week. Its security record is the main limitation. Two PyPI releases carried a credential stealer on 24 March 2026, and 30 GitHub advisories followed in 12 months, five of them critical.

**Tencent Cloud TokenHub.** Keys can be limited to chosen models, source IPs and token quotas, errors name their source and code, and a 99.5% SLA covers paid use of models Tencent runs. Sign-up needs a Tencent Cloud account with real-name verification, prices are in CNY, no public status page was found, and 18 model retirement notices ran from April to October 2026.

## Before you call either

### LiteLLM

1. Pin an exact litellm version or image digest, verify the cosign signature, and never install an unpinned latest in CI
2. Give each agent a virtual key limited to its models, routes and MCP servers, with a budget and an expiry
3. Treat a 429 with `retry-after` as the gateway's own limit and wait that long; a 429 without it came from the provider
4. Set `NO_DOCS`, `NO_REDOC` and `NO_OPENAPI` to True in production, and use the `-non_root` image variant
5. Set `LITELLM_LOCAL_MODEL_COST_MAP=True` where egress is blocked, since start-up otherwise fetches the price map from GitHub

### Tencent Cloud TokenHub

1. Use `https://tokenhub.tencentmaas.com/v1` with keys made for Guangzhou and `https://tokenhub-intl.tencentmaas.com/v1` with keys made for Singapore. Keys do not work across the two
2. Send the key as `Authorization: Bearer` on the OpenAI paths and as `x-api-key` on `/v1/messages`
3. Parse `error.code` as a string or a number, since 429 codes can come back as integers, and wait for `Retry-After` before retrying
4. Take model ids from `GET /v1/models` and watch for `pre-offline`. The quickstart's `deepseek-v3` example is not in the current model list
5. Expect DeepSeek prices to double on weekdays from 9am to noon and 2pm to 6pm Beijing time, when the peak rate applies

## Questions

### Which is better for AI agents, LiteLLM or Tencent Cloud TokenHub?

LiteLLM scores 62.4 (B) on agent readiness against Tencent Cloud TokenHub's 59.5 (C), and leads in 6 of 7 scored categories.

### Do LiteLLM and Tencent Cloud TokenHub need an API key?

Both need an API key.

### Can an agent call LiteLLM and Tencent Cloud TokenHub without installing anything?

No hosted endpoint is listed for LiteLLM. Tencent Cloud TokenHub has a hosted endpoint at https://tokenhub.tencentmaas.com/v1.

### Are LiteLLM and Tencent Cloud TokenHub open source?

LiteLLM is open source (MIT, except the enterprise/ directory, which is under its own licence and needs an Enterprise licence key). No open-source release is listed for Tencent Cloud TokenHub.


## For agents

- This comparison as JSON: https://www.anchorterminal.com/compare/litellm-vs-tencent-tokenhub.json, and with the fewest tokens: https://www.anchorterminal.com/compare/litellm-vs-tencent-tokenhub.min.md
- Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "litellm", "b": "tencent-tokenhub"}`. From a terminal: `anchor compare litellm tencent-tokenhub`
- Each listing in full: https://www.anchorterminal.com/api/v1/tools/litellm.json and https://www.anchorterminal.com/api/v1/tools/tencent-tokenhub.json

## Other comparisons with LiteLLM or Tencent Cloud TokenHub

- [Amazon Bedrock vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/amazon-bedrock-vs-tencent-tokenhub.md)
- [Claude API vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/anthropic-api-vs-tencent-tokenhub.md)
- [Azure OpenAI in Foundry Models vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/azure-openai-vs-tencent-tokenhub.md)
- [BlockRun.AI vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/blockrun-ai-vs-tencent-tokenhub.md)
- [Cerebras Inference vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/cerebras-inference-vs-tencent-tokenhub.md)
- [Cloudflare AI Gateway vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/cloudflare-ai-gateway-vs-tencent-tokenhub.md)
- [Cloudflare Workers AI vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/cloudflare-workers-ai-vs-tencent-tokenhub.md)
- [Cohere Chat API (Command models) vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/cohere-chat-vs-tencent-tokenhub.md)
- [DeepInfra vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/deepinfra-vs-tencent-tokenhub.md)
- [DeepSeek API vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/deepseek-api-vs-tencent-tokenhub.md)
- [Glimpse vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/elorian-glimpse-vs-tencent-tokenhub.md)
- [Fireworks AI Inference vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/fireworks-inference-vs-tencent-tokenhub.md)
- [Gemini Developer API vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/gemini-api-vs-tencent-tokenhub.md)
- [GroqCloud vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/groq-vs-tencent-tokenhub.md)
- [Inkling 2 Small vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/inkling-2-small-vs-tencent-tokenhub.md)
- [Jais 3 vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/jais-3-vs-tencent-tokenhub.md)
- [Meta Model API vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/meta-model-api-vs-tencent-tokenhub.md)
- [MiniMax API vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/minimax-api-vs-tencent-tokenhub.md)
- [Mistral AI API vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/mistral-api-vs-tencent-tokenhub.md)
- [Muse Spark Open vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/muse-spark-open-vs-tencent-tokenhub.md)
- [Novita AI vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/novita-ai-vs-tencent-tokenhub.md)
- [OpenAI API vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/openai-api-vs-tencent-tokenhub.md)
- [OpenRouter vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/openrouter-vs-tencent-tokenhub.md)
- [Beam 1.0 vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/reflection-beam-vs-tencent-tokenhub.md)
- [SambaCloud vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/sambanova-vs-tencent-tokenhub.md)
- [SiliconFlow vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/siliconflow-vs-tencent-tokenhub.md)
- [Simplismart vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/simplismart-vs-tencent-tokenhub.md)
- [StepFun API vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/stepfun-api-vs-tencent-tokenhub.md)
- [SWE-2 Flash vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/swe-2-flash-vs-tencent-tokenhub.md)
- [Tencent Cloud TokenHub vs Together AI Inference](https://www.anchorterminal.com/compare/tencent-tokenhub-vs-together-inference.md)
- [Tencent Cloud TokenHub vs Vertex AI (Gemini Enterprise Agent Platform)](https://www.anchorterminal.com/compare/tencent-tokenhub-vs-vertex-ai.md)
- [Tencent Cloud TokenHub vs xAI API (Grok)](https://www.anchorterminal.com/compare/tencent-tokenhub-vs-xai-api.md)
- [Antseed vs LiteLLM](https://www.anchorterminal.com/compare/antseed-vs-litellm.md)
- [Antseed vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/antseed-vs-tencent-tokenhub.md)
- [Cloudflare AI Gateway vs LiteLLM](https://www.anchorterminal.com/compare/cloudflare-ai-gateway-vs-litellm.md)
- [Eden AI vs LiteLLM](https://www.anchorterminal.com/compare/eden-ai-vs-litellm.md)
- [Eden AI vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/eden-ai-vs-tencent-tokenhub.md)
- [Hugging Face Inference Providers vs LiteLLM](https://www.anchorterminal.com/compare/hugging-face-inference-providers-vs-litellm.md)
- [Hugging Face Inference Providers vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/hugging-face-inference-providers-vs-tencent-tokenhub.md)
- [LiteLLM vs OpenRouter](https://www.anchorterminal.com/compare/litellm-vs-openrouter.md)
- [LiteLLM vs Router.com (Ramp Router)](https://www.anchorterminal.com/compare/litellm-vs-ramp-router.md)
- [LiteLLM vs RouterPlus](https://www.anchorterminal.com/compare/litellm-vs-routerplus.md)
- [LiteLLM vs Vercel AI Gateway](https://www.anchorterminal.com/compare/litellm-vs-vercel-ai-gateway.md)
- [Router.com (Ramp Router) vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/ramp-router-vs-tencent-tokenhub.md)
- [RouterPlus vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/routerplus-vs-tencent-tokenhub.md)
- [Tencent Cloud TokenHub vs Vercel AI Gateway](https://www.anchorterminal.com/compare/tencent-tokenhub-vs-vercel-ai-gateway.md)
- [Nemotron 3.5 Super VL vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/nemotron-3-5-super-vl-vs-tencent-tokenhub.md)
- [Prism Inference vs Tencent Cloud TokenHub](https://www.anchorterminal.com/compare/prism-inference-vs-tencent-tokenhub.md)

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
