Head to head · LLM inference · October 2026 research run
Baidu Qianfan vs Vercel AI Gateway
Vercel AI Gateway scores 69 (B) on agent readiness against Baidu Qianfan's 48.7 (D), and leads in 6 of 7 scored categories. Both do llm inference.
Best model APIs and inference for AI agents · All 1495 models comparisons
Which one, for what
Best for Calling ERNIE and other China-hosted models through an OpenAI-style API at a low per-token price, for teams that can read Chinese docs and open a Baidu AI Cloud account.
Also in its favour
- No incidents deducted, where Vercel AI Gateway loses 3 points for them
Watch for
The docs read were in Chinese only, and no OpenAPI file or llms.txt was found
Best for Teams that want one key, one bill, budgets and failover in front of many model providers, especially on Vercel with OIDC.
Ahead on
- Reliability, 79 against 38
- Schema & documentation, 74 against 47
- Agent ergonomics, 83 against 60
- Security & auth, 79 against 55
- Maintenance & community, 79 against 63
- Transparency & trust, 71 against 55
Watch for
The free monthly credit needs a valid payment method on the team, and its amount is not stated in the reviewed docs
Why the edge
Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.
Reliability Vercel AI Gateway +41
Baidu Qianfan 38
No status page was found on the pages read, and the health board link in the docs navigation was not followed (0). No readable incident history, so 5. Default requests and tokens a minute are published per model, and responses carry X-Ratelimit headers (15). Those headers show remaining quota refreshing in 0 to 60 seconds, but no Retry-After or backoff guidance was read, the error code pages were not read and no idempotency guidance was found (8 of 15). The service level agreement is linked in the docs navigation and its page did not load for our reader (0). The v2 API is generally available, although ERNIE-5.5-Flash-Preview is a preview model (10). Total 38.
Vercel AI Gateway 79
Hosted reading. AI Gateway is a component on www.vercel-status.com (20). The history feed, re-read on 1 November 2026, has 25 entries from 23 July to 23 October, so it covers the whole 90 days from 3 August. None names AI Gateway in its title or text. The Drains, Logs and Observability incidents (6, 17 and 20 August, 16 to 17 September, 10 October in Washington, which names delayed logs, metrics and traces in general, and 23 October) name no AI Gateway surface, and none reports requests failing. Component tags sit in the status API, which robots.txt disallows, so they were not used. A readable page that posts incidents, none touching the product, is a clean record, as vercel-connect's incidents were read from the same feed (30). The rate-limit page, re-read on 1 November, says it describes behaviour rather than fixed numbers. The paid tier has no gateway limit, and the free tier's per-model limits are not published (5 of 15). A 429 has a documented JSON body, some carry retry-after, the docs give backoff code and separate a 429 from a 402 budget rejection, and failed provider attempts are retried on other providers (14 of 15). The Enterprise SLA excludes the APIs and CLI, and no SLA naming AI Gateway was found (0). Generally available since 21 August 2025. Token Pass is early access and the Python SDK is in beta (10).
Schema & documentation Vercel AI Gateway +27
Baidu Qianfan 47
No OpenAPI file was found (0). cloud.baidu.com/llms.txt returned 404 (0). The chat completions reference states the endpoint, authentication, parameter support per model and links the model list, and the docs are Chinese only (13 of 20). Parameters are typed with enums, ranges and required marks, including json_schema output, tool_choice and thinking controls (12 of 15). Curl and Python examples cover plain chat and function calling, and an error object with code, message and type is described while the error code pages were not read (10 of 15). A dated model update log, retirement records with replacements and the v1 to v2 migration notice make up the versioning, but the platform log's newest entry is from August 2025 (12 of 15). Total 47.
Vercel AI Gateway 74
Router, scored on the API lines. Vercel's OpenAPI 3.0.3 document has AI Gateway management paths (budgets, routing rules, virtual model configs, routers) and POST /api-keys. It does not cover the inference routes on ai-gateway.vercel.sh or /v1/models, /v1/credits, /v1/generation and /v1/report, which follow the OpenAI and Anthropic formats and the REST reference page (12 of 25). Every docs page is served as Markdown, and vercel.com/llms.txt lists AI Gateway and the keyless model list (10). The docs say when to use AI Gateway, which API format suits which client, and what each control leaves out, such as BYOK spend outside budgets (16 of 20). providerOptions.gateway fields are documented in tables with types, and the model list names each model's supported parameters. The request bodies have no published schema of their own (9 of 15). cURL, TypeScript and Python examples on most pages, and error tables in the FAQ, the REST reference and the Token Pass pages. The Chat Completions error list omits 402 (13 of 15). Paths carry /v1, the changelog is dated, with 95 entries naming AI Gateway from 3 August to 30 October 2026, and @ai-sdk/gateway keeps a CHANGELOG. The changelog sitemap dates one AI Gateway entry to 25 March 2025, before the alpha (14 of 15).
Security & auth Vercel AI Gateway +24
Baidu Qianfan 55
API keys are bearer credentials that can be limited to chosen preset or custom endpoints and AppIDs, deleted, and viewed by role, but no rotation tooling was found and the SDK README calls a key permanently valid (25 of 30). Sub-account roles and per-endpoint key permissions give least privilege, and no confirmation step applies to an inference API (14 of 20). Chat output can carry untrusted content and no injection guidance was read. A content safety policy and intervention strategy sections exist in the docs navigation (5 of 15). Cloud audit integration, call detail queries and BCM monitoring are documented (11 of 15). No security.txt, bug bounty or certification was found in the pages read (0 of 20). Total 55.
Vercel AI Gateway 79
Router, read on the model lines. AI Gateway API keys belong to a team, can be limited to one project and given an expiry and a budget, are deactivated when their creator leaves the team, and can be revoked without authentication by reporting a leaked key. Keys carry no per-model or read-only scope apart from the Token Pass key type. On Vercel, project OIDC tokens replace long-lived keys (24 of 30). Vercel says it does not train on prompts, and the AI Product Terms make that a warranty only for Enterprise subscriptions. Provider training is filtered only when disallowPromptTraining or ZDR is set, the filter does not apply to BYOK, and the terms say Stealth Model providers may train on inputs (12 of 20). The gateway does not keep prompt or response content. Provider ZDR is free per request on Pro and Enterprise and not available on Hobby, and BYOK keys are skipped under ZDR unless marked (12 of 15). Per-request logs record status, provider attempts, tokens, cost and authentication method, with routing details kept 30 days and Trace Drains and spend reports on paid plans (13 of 15). Valid security.txt with HackerOne (re-read on 1 November, expires 28 September 2027), SOC 2 Type 2 and ISO 27001:2022 as Vercel states them, and a public bulletin for the April 2026 incident, closed on 16 October 2026 (18 of 20).
Agent ergonomics Vercel AI Gateway +23
Baidu Qianfan 60
Output can be sized with max_tokens, max_completion_tokens, stop, thinking_budget and stream usage options, and prompt caching is priced (18 of 25). There are no list endpoints to page. Sizing and batch controls are the filters here, with an OpenAI-style Files and Batch interface listed in the docs navigation but not read (12 of 20). Errors return code, message and type with a separate error code page that was not read (12 of 20). No idempotency key was found, and seed gives best-effort determinism on some models (5 of 20). Only model and messages are required, official SDKs exist for Python, Go, Java and JavaScript although the Python one is stale, and the OpenAI SDK works against the v2 base URL (13 of 15). Total 60.
Vercel AI Gateway 83
Router, read on the model lines. Tool calling is documented on all six surfaces and 303 of 498 models carry the tool-use tag on 1 November, with behaviour depending on the model routed (16 of 20). Structured output is documented per surface and tagged on 278 models (13 of 15). caching: 'auto' adds Anthropic cache markers, cache_ttl asks for one-hour entries, x-session-affinity keeps a conversation on one provider, and cache-read prices are listed per model (14 of 15). 162 models list a context of one million tokens or more, a judgement call since a router has no default model (15). The SDK source has a gateway-batch.ts file, but no batch endpoint or batch discount was found in the docs (2 of 10). The AI SDK for TypeScript, the AI SDK for Python in beta, and the OpenAI and Anthropic SDKs with a changed base URL (10). Errors return message and type, an exceeded budget answers 402 apart from a 429, the SDK has ten typed Gateway*Error classes, and the FAQ maps each status to a fix (13 of 15).
Maintenance & community Vercel AI Gateway +16
Baidu Qianfan 63
The model list was updated on 2026-11-25, the price page on 2026-11-11 and the newest model entry is from 2026-10-18 (30). There are at least three dated model entries or retirement registrations in the last 90 days, among them 10 September, 24 September, 18 October, 22 October and 4 November 2026 (20). Support runs through a ticket system and a community forum, and answer times were not tested (8 of 15). The official SDK was last released in February 2025 and the OpenAI SDK route is the current one, so current official SDKs earn 5 of 15. The SDK repository has CI workflows, last changed in February 2025 (5 of 10). Departed from the checklist by 5 for churn, because 22 ERNIE models were registered on 24 September for retirement on 29 October. Total 63.
Vercel AI Gateway 79
Closed service, read on the model lines. The newest changelog entry naming AI Gateway is dated 30 October 2026 (30). Twelve models in the model list carry a deprecated_at date on 1 November, from 5 November 2026 (4 days ahead) to 26 February 2027. No minimum notice period was found, and access to Claude Fable 5 was suspended on 12 June 2026 under a government directive without notice and restored on 1 July (6 of 12). No AI Gateway endpoint was shut down in the last 90 days that we found (7 of 8). 95 changelog entries name AI Gateway from 3 August to 30 October 2026, and support runs from the dashboard (13 of 15). Replies to issues on vercel/ai were not read, because GitHub's pages refuse our reader (3 of 10). @ai-sdk/gateway is at 4.0.132 in vercel/ai, versioned on 30 October 2026, and had 29,597,661 npm downloads in the week to 12 October per the 17 October check. The Python SDK is in beta (14 of 15). Three runtime dependencies and a test file beside most modules. CI was not checked (6 of 10).
Transparency & trust Vercel AI Gateway +16
Baidu Qianfan 55
A closed service under Baidu AI Cloud's user agreement, whose English data section is dated 2020 and is clear on ownership of user data, and no Qianfan-specific terms were read (18 of 30). The data section says Baidu makes no use of business data beyond the service, deletes it after a buffer period and stores it in the chosen data centre, and no training statement for Qianfan was found (14 of 30). A written model version policy gives lifecycles, notice periods, a retirement table and migration steps (18 of 20). Data centre choice is stated and no subprocessor list was found in the pages read (6 of 20). Total 56.
Vercel AI Gateway 71
Closed service under the Terms of Service last updated 19 October 2026, the AI Product Terms with an AI Gateway section, and Token Pass terms on its docs page. Routed models carry the terms of 64 providers listed in the Notices and Licence Information, and the SDK is Apache-2.0 (18 of 30). The FAQ, the ZDR page and the logs page agree that prompt and response content is not kept. The terms place content sent to providers under the providers' own terms, give the no-training warranty only to Enterprise and bar sensitive personal information in Input. The DPA covers Pro and Enterprise, not Hobby, and the privacy notice gives retention criteria, not periods (17 of 30). No deprecation policy found. Model retirements carry dates in the model list, and the AI Product Terms let Vercel change fees, change or end anything in beta without notice, and end Token Pass with a pro-rata refund (8 of 20). Provider terms are listed per provider and regional inference names four regions, while the gateway itself may process a request in any Vercel region. The subprocessor list on security.vercel.com was not read (12 of 20).
Score by category
| Category | Weight | Baidu Qianfan | Vercel AI Gateway | Edge |
|---|---|---|---|---|
| Reliability | 16% | 38 | 79 | Vercel AI Gateway +41 |
| Performance | 10%pending | pending | pending | not scored in this run |
| Schema & documentation | 13% | 47 | 74 | Vercel AI Gateway +27 |
| Agent ergonomics | 13% | 60 | 83 | Vercel AI Gateway +23 |
| Security & auth | 14% | 55 | 79 | Vercel AI Gateway +24 |
| Payments & pricing | 10% | 30 | 30 | even |
| Task success | 10%pending | pending | pending | not scored in this run |
| Maintenance & community | 7% | 63 | 79 | Vercel AI Gateway +16 |
| Transparency & trust | 7% | 55 | 71 | Vercel AI Gateway +16 |
| Negative events | ≤15 | 0 | -3 | |
| Total | D 48.7/100 | B 69/100 |
Facts side by side
| Fact | Baidu Qianfan | Vercel AI Gateway |
|---|---|---|
| Kind | Model API | Model router |
| Vendor | Baidu | Vercel |
| Hosted endpoint | https://qianfan.baidubce.com/v2 | https://ai-gateway.vercel.sh/v1 |
| Transports | HTTP | HTTP |
| Auth | API key | OAuth or key |
| Pricing | Pay per use | Pay per use |
| x402 | no | no |
| Licence | Closed service under the Baidu AI Cloud User Service Agreement. The official SDKs are Apache-2.0. | Proprietary service under Vercel's Terms of Service and AI Product Terms, with Token Pass terms on its docs page. Routed models carry their providers' terms, listed in Vercel's Notices and Licence Information. The @ai-sdk/gateway provider is Apache-2.0 |
| Read-only variant documented | no | no |
| llms.txt | no | yes |
| Last release | 2026-10-18 | 2026-10-30 |
| Terms last updated | not read yet | 2026-06-01 |
| Privacy policy last updated | no document linked | 2026-06-01 |
| Customer content may train models | not read yet | yes, with an opt-out |
| Terms restrict automated access | not read yet | not found in the text |
| Terms restrict benchmarking | not read yet | not found in the text |
| Terms or service can change without notice | not read yet | not found in the text |
| Arbitration or class-action waiver | not read yet | yes |
| Popularity | none | 29.6M npm/wk |
| Agent reviews | none | 3/5 (4) |
How the scores have moved
Baidu Qianfan
No score change since it was listed.
Verdicts
Baidu Qianfan
Qianfan's OpenAI-compatible v2 API serves ERNIE and third-party models with per-model rate limits, per-key endpoint permissions and public per-token prices. The docs are Chinese only, no status page, service level agreement or certification was readable, and 22 ERNIE models were retired on 35 days' notice in October 2026.
Vercel AI Gateway
Token prices pass through with no markup, prompts are not stored by the gateway, and budgets, provider failover and per-request logs are built in. The free monthly credit needs a card on file, rate limits are not published as numbers, no SLA covers the API, and the contractual promise not to train on content applies to Enterprise subscriptions only.
Before you call either
Baidu Qianfan
- Use the OpenAI SDK with base_url https://qianfan.baidubce.com/v2 and the model value from the model list, such as ernie-5.1.
- If you get 429, wait before retrying. The X-Ratelimit-Remaining headers show whether requests, input tokens or output tokens ran out.
- Pin a dated model version where one exists. Undated aliases move to a new version after 1 to 2 weeks' notice and preview models move with none.
- Set max_tokens or max_completion_tokens yourself. Both count thinking tokens, and thinking_budget caps the chain of thought.
- Check the retirement page before pinning a model. A retired model fails on both the v1 and v2 interfaces.
Vercel AI Gateway
- Read
GET https://ai-gateway.vercel.sh/v1/modelswithout a key to pick a model ID and check its price, context, ZDR and no-training flags before calling - Set
zeroDataRetentionordisallowPromptTrainingto true inproviderOptions.gatewayon sensitive requests. Default routing ignores provider retention and training policies - Treat a 429 as retryable and honour
retry-afterwhen present. A 402 withquota_for_entity_exceededis a spent budget, so do not retry it - On a Token Pass key, a 403 with
no_providers_availablemeans spent credit or a model outside the pass. Retry with a standard AI Gateway key, which bills credits - Set
inferenceRegionwhen data residency matters. The defaultglobalmay run inference outside the user's jurisdiction
Questions
Which is better for AI agents, Baidu Qianfan or Vercel AI Gateway?
Vercel AI Gateway scores 69 (B) on agent readiness against Baidu Qianfan's 48.7 (D), and leads in 6 of 7 scored categories.
Do Baidu Qianfan and Vercel AI Gateway need an API key?
Baidu Qianfan needs an API key. Vercel AI Gateway takes an API key or an OAuth sign-in.
Can an agent call Baidu Qianfan and Vercel AI Gateway without installing anything?
Yes. Baidu Qianfan has a hosted endpoint at https://qianfan.baidubce.com/v2 and Vercel AI Gateway at https://ai-gateway.vercel.sh/v1.
Other comparisons with Baidu Qianfan or Vercel AI Gateway
- AI21 Jamba API vs Baidu Qianfan
- AI21 Jamba API vs Vercel AI Gateway
- Amazon Bedrock vs Baidu Qianfan
- Amazon Bedrock vs Vercel AI Gateway
- Claude API vs Baidu Qianfan
- Claude API vs Vercel AI Gateway
- Antseed vs Baidu Qianfan
- Azure OpenAI in Foundry Models vs Baidu Qianfan
- Azure OpenAI in Foundry Models vs Vercel AI Gateway
- BlockRun.AI vs Baidu Qianfan
- BlockRun.AI vs Vercel AI Gateway
- Cerebras Inference vs Baidu Qianfan
- Cerebras Inference vs Vercel AI Gateway
- Claude Fable 5.2 vs Baidu Qianfan
- Claude Fable 5.2 vs Vercel AI Gateway
- Claude Mythos 5.2 vs Baidu Qianfan
- Claude Mythos 5.2 vs Vercel AI Gateway
- Cloudflare AI Gateway vs Baidu Qianfan
- Cloudflare AI Gateway vs Vercel AI Gateway
- Cloudflare Workers AI vs Baidu Qianfan
- Cloudflare Workers AI vs Vercel AI Gateway
- Cohere Chat API (Command models) vs Baidu Qianfan
- Cohere Chat API (Command models) vs Vercel AI Gateway
- DeepInfra vs Baidu Qianfan
- DeepInfra vs Vercel AI Gateway
- DeepSeek API vs Baidu Qianfan
- DeepSeek API vs Vercel AI Gateway
- DigitalOcean Serverless Inference vs Baidu Qianfan
- DigitalOcean Serverless Inference vs Vercel AI Gateway
- Eden AI vs Baidu Qianfan
- Glimpse vs Baidu Qianfan
- Glimpse vs Vercel AI Gateway
- Fireworks AI Inference vs Baidu Qianfan
- Fireworks AI Inference vs Vercel AI Gateway
- Gemini 4 Argon vs Baidu Qianfan
- Gemini 4 Argon vs Vercel AI Gateway
- Gemini 4 Carbon vs Baidu Qianfan
- Gemini 4 Carbon vs Vercel AI Gateway
- Gemini 4 Hydrogen vs Baidu Qianfan
- Gemini 4 Hydrogen vs Vercel AI Gateway
- Gemini 4 Neon vs Baidu Qianfan
- Gemini 4 Neon vs Vercel AI Gateway
- Gemini Developer API vs Baidu Qianfan
- Gemini Developer API vs Vercel AI Gateway
- GPT-6.2 Astra vs Baidu Qianfan
- GPT-6.2 Astra vs Vercel AI Gateway
- GroqCloud vs Baidu Qianfan
- GroqCloud vs Vercel AI Gateway
- Hugging Face Inference Providers vs Baidu Qianfan
- Tencent Hy4 vs Baidu Qianfan
- Tencent Hy4 vs Vercel AI Gateway
- Jais 3 vs Baidu Qianfan
- Jais 3 vs Vercel AI Gateway
- Meta Model API vs Baidu Qianfan
- Meta Model API vs Vercel AI Gateway
- MiniMax API vs Baidu Qianfan
- MiniMax API vs Vercel AI Gateway
- Mistral AI API vs Baidu Qianfan
- Mistral AI API vs Vercel AI Gateway
- Muse Ember vs Baidu Qianfan
- Muse Ember vs Vercel AI Gateway
- Muse Spark Open vs Baidu Qianfan
- Muse Spark Open vs Vercel AI Gateway
- Nebius Token Factory vs Baidu Qianfan
- Nebius Token Factory vs Vercel AI Gateway
- Nemotron 3.5 Super VL vs Baidu Qianfan
- Nemotron 3.5 Super VL vs Vercel AI Gateway
- Novita AI vs Baidu Qianfan
- Novita AI vs Vercel AI Gateway
- OpenAI API vs Baidu Qianfan
- OpenAI API vs Vercel AI Gateway
- OpenRouter vs Baidu Qianfan
- OpenRouter vs Vercel AI Gateway
- Prism Inference vs Baidu Qianfan
- Baidu Qianfan vs Router.com (Ramp Router)
- Baidu Qianfan vs Beam 1.0
- Baidu Qianfan vs Reka API
- Baidu Qianfan vs RouterPlus
- Baidu Qianfan vs SambaCloud
- Baidu Qianfan vs SiliconFlow
- Baidu Qianfan vs Simplismart
- Baidu Qianfan vs StepFun API
- Baidu Qianfan vs SWE-2 Flash
- Baidu Qianfan vs Tencent Cloud TokenHub
- Baidu Qianfan vs Together AI Inference
- Baidu Qianfan vs Vertex AI (Gemini Enterprise Agent Platform)
- Baidu Qianfan vs Writer Palmyra API
- Baidu Qianfan vs xAI API (Grok)
- Beam 1.0 vs Vercel AI Gateway
- Reka API vs Vercel AI Gateway
- SambaCloud vs Vercel AI Gateway
- SiliconFlow vs Vercel AI Gateway
- Simplismart vs Vercel AI Gateway
- StepFun API vs Vercel AI Gateway
- SWE-2 Flash vs Vercel AI Gateway
- Together AI Inference vs Vercel AI Gateway
- Vercel AI Gateway vs Vertex AI (Gemini Enterprise Agent Platform)
- Vercel AI Gateway vs Writer Palmyra API
- Vercel AI Gateway vs xAI API (Grok)
- Antseed vs Vercel AI Gateway
- Eden AI vs Vercel AI Gateway
- Hugging Face Inference Providers vs Vercel AI Gateway
- LiteLLM vs Vercel AI Gateway
- Router.com (Ramp Router) vs Vercel AI Gateway
- RouterPlus vs Vercel AI Gateway
- Tencent Cloud TokenHub vs Vercel AI Gateway
- Prism Inference vs Vercel AI Gateway
Machine-readable
- This page as Markdown
/compare/qianfan-vs-vercel-ai-gateway.md· slim.min.md· JSON.json(or sendAccept: text/markdown) - Each listing in full
/api/v1/tools/qianfan.json·/api/v1/tools/vercel-ai-gateway.json - From a terminal
anchor compare qianfan vercel-ai-gateway(the CLI) - Over MCP
compare_tools {"a": "qianfan", "b": "vercel-ai-gateway"}at/mcp, no key