任务决策
AI 网关与模型路由:只在治理收益超过抽象成本时加入
为密钥、预算、回退、日志和模型可用性建立统一控制面。
Recommendation
早期直接集成一个供应商;需要集中调用层时用 AI SDK 等应用层工具作为过渡。
选择标准
按真实约束逐项判断,不要只比较功能列表。
Compatibility
Test the exact models, endpoints, streaming events, tools, structured output, errors, usage, headers, state, images, audio, embeddings, and provider options required.3
适用路线
这些条件会改变默认答案;请在作出承诺前逐项验证。
Managed AI control plane
Choose Managed AI control plane
Choose Portkey when a managed gateway plus centralized routing, credentials, budgets, policy, observability, and enterprise deployment options fit.
Verify: Verify cloud, hybrid, and air-gapped boundaries, supported providers and features, pricing-data coverage, logs, retention, guardrails, budget behavior, plans, and exit.1
Self-operated OpenAI-compatible proxy
Choose Self-operated OpenAI-compatible proxy
Choose LiteLLM when a team wants to operate an open proxy and explicitly own provider adapters, routing, keys, budgets, logs, deployment, and upgrades.
Verify: OpenAI-compatible does not mean feature-equivalent; test every required provider behavior and own high availability, storage, security, updates, policy, and enterprise edition boundaries.2
Hosted multi-model routing
Choose Hosted multi-model routing
Choose OpenRouter when hosted access to many models and providers, consolidated billing, routing, fallback, and provider policy controls are the intended boundary.
Verify: Verify model and provider identity, routing defaults, data policy, region, fallbacks, tool support, version pinning, fees, credits, BYOK, limits, failed attempts, logs, and outage behavior.3
Vercel-managed gateway
Choose Vercel-managed gateway
Choose Vercel AI Gateway when Vercel-managed model access, routing, fallback, budgets, usage, and AI SDK integration fit the application.
Verify: Keep it distinct from Vercel hosting and AI SDK; verify provider catalog, API compatibility, provider options, credits, BYOK, pricing and markup, logs, regions, limits, and exit.4
边界: AI Gateways own proxy and request-path routing, fallback, retry, caching, rate, budget, credentials, policy, and traffic telemetry. LLM APIs choose models, AI SDKs own in-code abstraction, and AI Observability spans gateway and non-gateway behavior and evaluation.
关键差异
把真正会改变决策的边界单独比较。
- Ownership
- Managed, hosted aggregation, self-operated proxy, and platform gateway routes transfer availability, updates, policy, and support differently.1
- Compatibility
- Unified or OpenAI-compatible interfaces do not guarantee provider feature, event, tool, policy, or error equivalence.3
- Routing and resilience
- Fallbacks can improve availability while changing provider identity, data path, latency, output behavior, and cost.23
- Commercial boundary
- Pass-through inference, platform fees, credit purchase fees, BYOK, logs, seats, and enterprise controls must be evaluated separately.3
官方资源
官方文档与继续决策的正式路径。
来源
支撑页面关键主张的资料。
- 1Portkey official documentation
Portkey · Accessed Official
- 2LiteLLM official documentation
LiteLLM · Accessed Official
- 3OpenRouter official documentation
OpenRouter · Accessed Official
- 4Vercel AI Gateway official documentation
Vercel AI Gateway · Accessed Official
- 5OpenRouter pricing
OpenRouter · Accessed Official
- 6Vercel AI Gateway pricing
Vercel · Accessed Official
- 7Portkey model pricing and cost management
Portkey · Accessed Official