QVeris
Hybrid AI gateway buyer and migration guide混合 AI Gateway 采购与迁移指南

ngrok AI Gateway Alternatives: 8 Options for 2026 ngrok AI Gateway 替代方案:2026 年 8 个选择

Compare eight alternatives against ngrok’s current hybrid-routing baseline, then prove public, private, and local model traffic with one repeatable workload.

以 ngrok 当前混合路由能力为公平基线,对比八种替代方案,并用同一可重复负载验证公共、私有与本地模型流量。

Updated July 31, 2026更新于 2026 年 7 月 31 日 20 min read阅读约 20 分钟 Buyer Scorecard · Hybrid Test · Migration
Network portal comparing hosted, edge, and self-hosted AI gateways across public providers, private cloud endpoints, and local models
A valid ngrok replacement must reproduce the traffic boundary—not just expose an OpenAI-compatible endpoint.
合格的 ngrok 替代方案必须复现完整流量边界,而不仅是提供一个 OpenAI-compatible Endpoint。

TL;DR: replace ngrok only for a specific control-plane advantageTL;DR:只有存在明确控制面优势时才替换 ngrok

Direct answer直接结论

Cloudflare is the strongest edge-platform alternative; Vercel fits AI SDK and application-platform workflows; Portkey fits AI-native guardrails and observability; Kong fits an enterprise API estate; LiteLLM fits broad self-hosted provider normalization; TrueFoundry fits enterprise deployment and governance; Bifrost fits performance-focused self-hosting; and Helicone fits teams that want gateway routing tied closely to LLM observability. Keep ngrok when hybrid reach and Traffic Policy already solve the actual problem.

Cloudflare 更适合边缘平台;Vercel 更适合 AI SDK 与应用平台工作流;Portkey 更适合 AI-native Guardrail 与可观测性;Kong 更适合企业 API 资产;LiteLLM 更适合广泛供应商标准化与自托管;TrueFoundry 更适合企业部署与治理;Bifrost 更适合性能优先的自托管;Helicone 更适合把 Gateway Routing 与 LLM Observability 紧密结合的团队。如果混合可达与 Traffic Policy 已经解决核心问题,就应继续使用 ngrok。

Edge policyCloudflare

Global edge controls, explicit cache and log behavior, and versioned dynamic routes.

全球边缘控制、显式缓存/日志行为和版本化动态路由。

Application DXVercel

Unified model access, AI SDK integration, provider selection, OIDC, and app observability.

统一模型访问、AI SDK、Provider Selection、OIDC 和应用可观测性。

Self-hosted controlLiteLLM or Bifrost

Operate the data plane and own provider configuration, virtual keys, budgets, and routing.

自行运营数据面,并掌控 Provider Config、Virtual Key、Budget 与 Routing。

Enterprise platformKong or TrueFoundry

Broader governance, deployment, identity, audit, and multi-team platform requirements.

覆盖更广的治理、部署、身份、审计与多团队平台需求。

What “ngrok AI Gateway alternatives” searchers need搜索“ngrok AI Gateway alternatives”的用户真正需要什么

This is a commercial evaluation query, not a request for eight product descriptions. The buyer needs to know whether a candidate can preserve public-provider access, private reachability, local models, key custody, failover, request transforms, tenant policy, and trace continuity—and what new operational burden the move creates.

这是商业选型搜索,不是要求列出八段产品简介。买家需要确认候选方案能否保留公共 Provider、私有可达、本地模型、密钥托管、Failover、Request Transform、Tenant Policy 与 Trace Continuity,以及迁移会新增哪些运维负担。

Evaluation method评价方法

Capabilities below are based on current first-party documentation reviewed in July 2026. “Best” means best starting point for a stated requirement, not an absolute product ranking. Pricing, plan entitlements, regional availability, and enterprise terms must be rechecked during procurement.

以下能力基于 2026 年 7 月核对的第一方文档。“最佳”只表示某项明确需求的更好起点,不代表绝对产品排名。采购时仍需重新核对价格、套餐权限、区域可用性与企业条款。

Start with a fair ngrok AI Gateway baseline先建立公平的 ngrok AI Gateway 基线

ngrok’s current AI Gateway is more than a tunnel in front of one provider. Its documented request flow validates an AI Gateway key or uses BYOK, resolves models, selects candidates, removes unsupported top-level parameters when configured, forwards the request, and tries the next model, provider, or key after a failure.

当前 ngrok AI Gateway 并不只是某个 Provider 前面的 Tunnel。官方请求流程会验证 AI Gateway Key 或使用 BYOK,解析模型、选择候选、按配置移除不支持的顶层参数、转发请求,并在失败后尝试下一个 Model、Provider 或 Key。

Baseline capability基线能力Current ngrok behaviorngrok 当前行为Replacement proof替代验证
Client surfaces客户端协议OpenAI- and Anthropic-compatible paths and popular SDKsOpenAI/Anthropic-compatible Path 与常见 SDKStreaming, tools, structured output, embeddings, and error parityStreaming、Tool、Structured Output、Embedding 与 Error 一致性
Provider accessProvider 访问Managed access for documented providers plus BYOK and passthrough patterns对已支持 Provider 提供托管访问,并支持 BYOK 与 PassthroughAccount ownership, attribution, quotas, rotation, and billing path账户所有权、归因、配额、轮换与计费路径
Hybrid endpoints混合端点Public providers, custom HTTPS endpoints, private services, and self-hosted models公共 Provider、自定义 HTTPS Endpoint、私有服务与自托管模型DNS, TLS, identity, egress, and local/private reachabilityDNS、TLS、Identity、Egress 与本地/私有可达
Selection选择策略ngrok/auto, provider prefixes, catalog metadata, and CEL strategiesngrok/auto、Provider Prefix、Catalog Metadata 与 CEL StrategySame policy inputs, deterministic audit, and rollback相同策略输入、确定性审计与回滚
FailoverMoves to the next candidate on timeout, HTTP error, or connection failureTimeout、HTTP Error 或连接失败时切换到下一候选Trigger map, attempt budget, total deadline, and output validity触发映射、尝试预算、总 Deadline 与输出有效性
Traffic PolicyAuthentication, rate limits, restrictions, request/response transforms, and AI gateway action认证、限流、限制、请求/响应转换与 AI Gateway ActionTranslate every policy; do not treat it as networking-only config转换每条策略,不能把它当作纯网络配置

When to keep ngrok—and when an alternative is justified何时保留 ngrok,何时值得替换

Keep ngrokHybrid reach is the hard problem混合可达是最难问题

You already use ngrok ingress or Traffic Policy and must connect public, private, customer-hosted, or local inference behind one boundary.

你已经使用 ngrok Ingress/Traffic Policy,并需要在一个边界后连接公共、私有、客户托管或本地推理。

Consider switchingAI workflow depth dominatesAI 工作流深度更重要

Prompt lifecycle, evaluations, semantic cache, guardrails, model catalog ergonomics, or agent traces matter more than network reach.

Prompt 生命周期、Evaluation、Semantic Cache、Guardrail、Model Catalog 或 Agent Trace 比网络可达更重要。

Consider switchingYou need to own the data plane必须拥有数据面

Policy requires gateway runtime, telemetry, secrets, and payload processing inside your infrastructure or region.

策略要求 Gateway Runtime、Telemetry、Secret 与 Payload Processing 位于自有基础设施或指定区域。

Consider switchingOne enterprise gateway is strategic统一企业 Gateway 是战略目标

The organization wants API, AI, MCP, and agent traffic governed through an existing platform team and identity model.

组织希望由现有平台团队与身份模型统一治理 API、AI、MCP 和 Agent 流量。

Buyer scorecard: eight questions before the shortlist采购评分表:进入候选名单前的八个问题

Dimension维度Pass signal通过信号Fail signal失败信号
Hybrid reach混合可达Public, private, and local targets use a tested identity and route公共、私有、本地目标拥有已测试身份与路由“Custom endpoint” requires public exposure you cannot allow“Custom Endpoint”要求无法接受的公网暴露
Protocol parity协议一致Required chat, responses, messages, streaming, tool, and embedding behavior passes所需 Chat、Responses、Messages、Streaming、Tool 与 Embedding 行为通过Only basic non-streaming chat was tested只测试基础 Non-streaming Chat
Key custody密钥托管Managed, BYOK, virtual key, rotation, revocation, and tenant mapping are explicitManaged、BYOK、Virtual Key、Rotation、Revocation 与 Tenant Mapping 明确Provider keys cross more components after migration迁移后 Provider Key 接触更多组件
Routing semantics路由语义Conditions, weights, allowlists, timeouts, retry ownership, and fallback triggers are versioned条件、权重、Allowlist、Timeout、重试所有权与回退触发已版本化A “smart router” cannot explain the chosen path“Smart Router”无法解释选择路径
Policy depth策略深度Auth, rate and budget limits, PII, guardrails, transforms, and model restrictions are enforceable可执行 Auth、Rate/Budget Limit、PII、Guardrail、Transform 与模型限制Policy exists only as dashboard configuration with no test策略只存在于 Dashboard 配置,未测试
Evidence证据One request reconstructs tenant, policy, attempts, provider, model, tokens, cost, and terminal reason单请求可还原 Tenant、Policy、Attempt、Provider、Model、Token、Cost 与最终原因Logs show only final HTTP status日志只有最终 HTTP Status
Deployment部署SaaS, controlled storage, self-hosted, or region model matches policy and staffingSaaS、受控存储、自托管或区域模式匹配策略与人员A self-hosted checkbox hides database, upgrades, and on-call ownership“自托管”勾选项掩盖数据库、升级与值班责任
Exit退出能力Neutral client adapter, exported config, model aliases, telemetry mapping, and one-step rollback中立 Client Adapter、可导出配置、Model Alias、Telemetry Mapping 与一步回滚Routing logic and prompt policy are locked in a proprietary UI路由逻辑与 Prompt Policy 锁在专有 UI

Eight ngrok AI Gateway alternatives compared八种 ngrok AI Gateway 替代方案对比

Option方案Strongest fit最强场景Documented strengths官方能力重点Validate against ngrok相对 ngrok 需验证
Cloudflare AI GatewayGlobal edge policy and Cloudflare estates全球边缘策略与 Cloudflare 技术栈Caching, rate limiting, detailed logging controls, OpenAI-compatible REST, dynamic route versions and rollbackCaching、Rate Limit、详细日志控制、OpenAI-compatible REST、动态路由版本与回滚Private/local reach design and non-Cloudflare network dependencies私有/本地可达设计与非 Cloudflare 网络依赖
Vercel AI GatewayAI SDK, Next.js, and application-platform workflowAI SDK、Next.js 与应用平台工作流Unified catalog, creator/model IDs, automatic provider selection, order/only policy, OIDC, budgets and fallbacks统一目录、creator/model ID、自动 Provider 选择、order/only、OIDC、预算与回退Private and local model network path; policy portability outside Vercel私有/本地模型网络路径及离开 Vercel 后的策略可移植性
PortkeyAI-native routing, guardrails, evaluations, and observabilityAI-native Routing、Guardrail、Evaluation 与 ObservabilityUniversal API, simple and semantic cache, conditional routing, circuit breaker, canary, budgets, guardrails, OTel and MCP supportUniversal API、Simple/Semantic Cache、Conditional Routing、Circuit Breaker、Canary、Budget、Guardrail、OTel 与 MCPHybrid reach, selected deployment mode, guardrail latency, and plan entitlement混合可达、所选部署模式、Guardrail 延迟与套餐权限
Kong AI GatewayEnterprise API platform, identity, plugins, MCP and A2A企业 API 平台、身份、插件、MCP 与 A2AProvider-agnostic API, AI Proxy plugins, semantic caching/routing, guardrails, token policy, OTel, MCP and A2A traffic governanceProvider-agnostic API、AI Proxy Plugin、Semantic Cache/Route、Guardrail、Token Policy、OTel、MCP/A2A 治理Edition and plugin requirements, platform administration, and migration complexity版本/插件要求、平台管理与迁移复杂度
LiteLLM ProxyBroad provider normalization with a self-operated gateway广泛 Provider 标准化与自运营 GatewayOpenAI-format access to 100+ models, retry/fallback router, virtual keys, spend tracking, budgets, rate limits, guardrails and callbacks以 OpenAI Format 访问 100+ 模型、Retry/Fallback Router、Virtual Key、Spend、Budget、Rate Limit、Guardrail 与 CallbackProduction database, HA, upgrades, callbacks, secret operations, and private networking ownership生产数据库、HA、升级、Callback、Secret 运维与私有网络责任
TrueFoundryEnterprise governance and flexible deployment ownership企业治理与灵活部署所有权Unified LLM and MCP gateway, security, observability, budgets, routing, guardrails, SaaS, own-storage, cloud and on-prem options统一 LLM/MCP Gateway、安全、Observability、Budget、Routing、Guardrail,以及 SaaS、自有存储、Cloud/On-prem 模式Platform scope, commercial terms, control/data-plane topology, and operating model平台范围、商业条款、控制面/数据面拓扑与运营模式
BifrostPerformance-focused self-hosted routing and governance性能优先的自托管路由与治理Virtual keys, budgets, weighted and CEL routing, provider fallback, audit trail, observability and MCP or coding-agent integrationsVirtual Key、Budget、Weighted/CEL Routing、Provider Fallback、Audit Trail、Observability 与 MCP/Coding Agent 集成Feature maturity for your protocols, operational stack, private reach, and support needs所需协议的功能成熟度、运维栈、私有可达与支持需求
HeliconeGateway routing integrated with LLM observability与 LLM Observability 集成的 Gateway RoutingOpenAI-compatible unified API, provider registry, managed credits or BYOK, automatic and manual failover, sessions, prompts and cost trackingOpenAI-compatible 统一 API、Provider Registry、Managed Credit/BYOK、自动/手动回退、Session、Prompt 与成本追踪Local/private model path, governance depth, unknown-model behavior, and data retention本地/私有模型路径、治理深度、未知模型行为与数据保留

Choose by replacement reason, not feature count按替换原因选型,而不是按功能数量

CloudflareChoose for edge policy gravity边缘策略优先

A strong fit when AI traffic should live beside existing Cloudflare security, delivery, Workers, logging, and global edge controls. Do not assume it reproduces ngrok private endpoint reach without a network design.

适合让 AI 流量靠近既有 Cloudflare Security、Delivery、Workers、Logging 与全球边缘控制。不要假设无需网络设计就能复制 ngrok 私有端点可达。

VercelChoose for application workflow gravity应用工作流优先

A strong fit when Next.js, AI SDK, preview deployments, OIDC, unified model discovery, and application telemetry matter more than a hybrid network portal.

当 Next.js、AI SDK、Preview Deployment、OIDC、统一模型发现和应用遥测比混合网络入口更重要时更合适。

PortkeyChoose for AI-specific control depthAI 专属控制深度优先

A strong fit when guardrails, semantic caching, canaries, evaluation datasets, prompt operations, and LLM observability belong in the gateway workflow.

当 Guardrail、Semantic Cache、Canary、Evaluation Dataset、Prompt Operation 与 LLM Observability 需要进入 Gateway 工作流时更合适。

KongChoose for enterprise API convergence企业 API 融合优先

A strong fit when a platform team already governs APIs through Kong and wants AI, MCP, and A2A traffic to inherit enterprise identity, plugins, analytics, and policy.

当平台团队已通过 Kong 治理 API,并希望 AI、MCP、A2A 流量继承企业身份、插件、分析和策略时更合适。

LiteLLMChoose for self-operated provider breadth自运营与 Provider 广度优先

A strong fit for teams comfortable owning the proxy, database, scaling, upgrades, secrets, and on-call path in exchange for broad model/provider support and configuration control.

适合愿意自行承担 Proxy、Database、Scaling、Upgrade、Secret 与 On-call,以换取广泛模型/Provider 支持和配置控制的团队。

TrueFoundryChoose for enterprise deployment options企业部署模式优先

A strong fit when teams need managed operation with controlled storage, or gateway components deployed in their cloud or on-prem, plus broader governance.

当团队需要托管运营但自有存储,或将 Gateway 组件部署在自有 Cloud/On-prem,并需要更广治理时更合适。

BifrostChoose for lean, routing-focused self-hosting精简路由型自托管优先

A candidate when latency, throughput, virtual-key governance, CEL rules, and auditability matter, and the team will validate the exact feature surface it needs.

当延迟、吞吐、Virtual-key Governance、CEL Rule 与审计性重要,且团队愿意验证精确功能面时可重点考虑。

HeliconeChoose for observability-led operationsObservability 驱动运营优先

A candidate when sessions, prompt versions, cost and latency analysis, and provider routing should share one LLM operations surface.

当 Session、Prompt Version、成本/延迟分析与 Provider Routing 需要共享一个 LLM 运营界面时可重点考虑。

Decision matrix: the shortest responsible shortlist决策矩阵:最短且负责任的候选名单

Primary requirement首要需求Start with优先评估Keep as benchmark保留基准
Public + private + local model reach with existing ngrok network结合现有 ngrok 网络连接公共、私有与本地模型ngrokLiteLLM, TrueFoundry
Global edge cache, logging, and traffic policy全球边缘 Cache、Logging 与流量策略Cloudflarengrok, Kong
Next.js and AI SDK developer workflowNext.js 与 AI SDK 开发工作流Vercelngrok, Helicone
Guardrails, prompts, evaluations, and LLM operationsGuardrail、Prompt、Evaluation 与 LLM 运营PortkeyHelicone, TrueFoundry
Existing enterprise API gateway and platform team已有企业 API Gateway 与平台团队KongTrueFoundry, ngrok
Open-source, self-operated, broad provider normalization开源、自运营、广泛 Provider 标准化LiteLLMBifrost
Enterprise-controlled storage, cloud, or on-prem topology企业受控存储、Cloud 或 On-prem 拓扑TrueFoundryKong, LiteLLM
Performance-focused self-hosted routing性能优先的自托管路由BifrostLiteLLM

The hybrid workload every alternative must reproduce每个替代方案都必须复现的混合负载

Public primary公共主路径

One OpenAI-compatible public model through a gateway virtual key, with explicit provider or deployment identity.

通过 Gateway Virtual Key 调用一个 OpenAI-compatible 公共模型,并明确 Provider/Deployment 身份。

Private fallback私有回退路径

One model endpoint inside a private cloud or VPC with scoped egress, TLS, service identity, and a known API surface.

一个位于 Private Cloud/VPC 的模型端点,具备受控 Egress、TLS、Service Identity 与已知 API Surface。

Local final path本地最终路径

One Ollama or vLLM-compatible endpoint that proves network reach, model mapping, parameter compatibility, and timeout behavior.

一个 Ollama/vLLM-compatible Endpoint,用于证明网络可达、模型映射、参数兼容与 Timeout 行为。

Shared policy共享策略

Tenant identity, model allowlist, input token cap, PII redaction, per-attempt timeout, total deadline, and trace ID.

Tenant Identity、Model Allowlist、Input Token Cap、PII 脱敏、逐次 Timeout、Total Deadline 与 Trace ID。

Accepted result有效结果

A response counts only when output schema, policy, trace completeness, latency budget, and source/provider evidence pass.

只有 Output Schema、Policy、Trace Completeness、Latency Budget 与 Provider Evidence 全部通过才算成功。

Implement a neutral client boundary first先实现中立客户端边界

Both ngrok and most alternatives support an OpenAI-compatible client path. Keep the base URL, gateway credential, and deployment-specific model alias outside business logic. This limits code changes, but it does not eliminate policy and telemetry translation.

ngrok 与多数替代方案都支持 OpenAI-compatible Client Path。把 Base URL、Gateway Credential 与 Deployment-specific Model Alias 放在业务逻辑之外。这样能减少代码改动,但不能省略策略与遥测转换。

TypeScript · portable gateway adapter
import OpenAI from "openai";

type GatewayProfile = {
  baseURL: string;
  apiKey: string;
  model: string;
  headers?: Record<string, string>;
};

export async function run(
  profile: GatewayProfile,
  prompt: string,
  traceId: string
) {
  const client = new OpenAI({
    baseURL: profile.baseURL,
    apiKey: profile.apiKey,
    defaultHeaders: {
      ...profile.headers,
      "x-trace-id": traceId,
      "x-tenant-id": "tenant-test",
    },
    timeout: 30_000,
    maxRetries: 0, // gateway owns the upstream attempt budget
  });

  return client.chat.completions.create({
    model: profile.model,
    messages: [{ role: "user", content: prompt }],
    temperature: 0,
    response_format: { type: "json_object" },
  });
}
Do not hard-code “latest” models不要硬编码“最新”模型

Discover models from the candidate’s current catalog, approve a deployment-specific ID, and resolve application aliases such as fast, balanced, and reasoning in configuration. Model availability and capabilities change faster than application release cycles.

从候选方案当前 Model Catalog 发现模型,批准 Deployment-specific ID,再在配置中解析 fastbalancedreasoning 等应用别名。模型可用性与能力变化通常快于应用发布周期。

Capture the ngrok policy you must translate完整记录需要迁移的 ngrok 策略

The following abbreviated pattern shows why migration is more than a base URL change: provider and key configuration, custom local reach, CEL model selection, and timeouts are all behavior. Export the effective policy and secrets references; never reconstruct them from memory.

以下精简示例说明迁移远不止更换 Base URL:Provider/Key 配置、本地自定义可达、CEL Model Selection 与 Timeout 都属于行为。应导出有效策略与 Secret Reference,不能靠记忆重建。

YAML · ngrok hybrid routing baseline
on_http_request:
  - type: ai-gateway
    config:
      per_request_timeout: "30s"
      total_timeout: "60s"
      max_input_tokens: 8000
      providers:
        - id: public-primary
          base_url: \${secrets.get('public-model', 'base-url')}
          api_keys:
            - value: \${secrets.get('public-model', 'api-key')}
        - id: private-fallback
          base_url: \${secrets.get('private-model', 'base-url')}
          api_keys:
            - value: \${secrets.get('private-model', 'api-key')}
        - id: local-final
          base_url: \${secrets.get('local-model', 'base-url')}
      model_selection:
        strategy:
          - "ai.models.filter(m, m.provider_id == 'public-primary')"
          - "ai.models.filter(m, m.provider_id == 'private-fallback')"
          - "ai.models.filter(m, m.provider_id == 'local-final')"

Use actual provider definitions and model metadata supported by your deployment. The production proof should also include authentication and rate-limit actions, provider/model restrictions, request transforms, and the exact client API surface.

实际部署应使用受支持的 Provider Definition 与 Model Metadata。生产验证还应包含 Auth/Rate-limit Action、Provider/Model Restriction、Request Transform 与精确客户端 API Surface。

Key custody and billing are architecture choices密钥托管与计费属于架构选择

Mode模式Benefit优势Control to prove必须证明的控制
Managed provider access托管 Provider 访问One gateway key, consolidated credits, fewer provider accounts一个 Gateway Key、统一 Credit、更少 Provider AccountCoverage, attribution, markup, capacity, data terms, exit path覆盖、归因、Markup、容量、数据条款与退出路径
BYOKDirect provider contract, credits, quotas, region, and ownership保留直接 Provider 合同、Credit、Quota、Region 与所有权Encryption, secret references, rotation, tenant isolation, audit加密、Secret Reference、Rotation、Tenant Isolation 与 Audit
Gateway virtual keyGateway Virtual KeyScoped client identity without exposing upstream keys不暴露上游 Key 的受限客户端身份Expiry, revocation, model and budget scope, owner mappingExpiry、Revocation、Model/Budget Scope 与 Owner Mapping
Passthrough透传Reduces central provider-key custody减少集中托管 Provider KeyHeader exposure, client distribution, policy visibility, log redactionHeader Exposure、Client Distribution、Policy Visibility 与日志脱敏

Same-workload validation plan同负载验证方案

Run ngrok and each shortlisted alternative against the same accepted-output contract. Freeze model versions and policy during the baseline. Test routing optimization only after fixed-provider latency and output parity are known.

让 ngrok 与每个候选方案执行同一个有效输出契约。基线期间冻结模型版本与策略。只有固定 Provider 的延迟和输出一致性明确后,才测试路由优化。

Test测试Injection注入Pass condition通过条件
Protocol协议Streaming, tools, JSON schema, embeddings, long contextStreaming、Tool、JSON Schema、Embedding、长上下文Client behavior and accepted output match the contract客户端行为与有效输出满足契约
Authentication认证Revoke gateway key; rotate BYOK; use wrong tenant and forbidden model撤销 Gateway Key、轮换 BYOK、使用错误 Tenant 与禁止模型Immediate denial or recovery with complete identity evidence立即拒绝或恢复,并保留完整身份依据
Failover429, 401, 400/context, 5xx, DNS, TLS, connection reset, timeout429、401、400/Context、5xx、DNS、TLS、连接重置、TimeoutOnly approved triggers move to the next valid target within total deadline只有批准触发器在总 Deadline 内切换到下一有效目标
Private reach私有可达Block public route, expire certificate, remove service identity阻断公网路径、证书过期、移除 Service IdentityNo insecure fallback; failure identifies the network or identity layer不进行不安全回退;错误明确网络或身份层
Policy策略Oversized prompt, PII marker, disallowed provider, budget exhaustion超大 Prompt、PII Marker、禁止 Provider、Budget 耗尽Deterministic deny, redact, downgrade, or route result确定性 Deny、Redact、Downgrade 或 Route
Evidence证据Trace one forced three-attempt request end to end端到端追踪一次强制三次尝试请求Tenant, policy, attempts, provider, model, tokens, latency, cost, resultTenant、Policy、Attempt、Provider、Model、Token、Latency、Cost 与 Result 完整
Count accepted success, not HTTP 200统计有效成功,不只统计 HTTP 200

A fallback can return a syntactically successful but semantically incompatible response. Validate tool-call shape, JSON schema, citations, safety policy, and business rules after every route branch.

Fallback 可能返回语法成功但语义不兼容的响应。每个 Route Branch 后都应验证 Tool-call Shape、JSON Schema、Citation、Safety Policy 与业务规则。

Normalize gateway evidence before comparing dashboards比较 Dashboard 前先标准化 Gateway 证据

Each product names logs, traces, attempts, cache, guardrail results, and cost fields differently. Create a provider-neutral event envelope so the migration does not destroy historical SLOs or incident queries.

每个产品对 Log、Trace、Attempt、Cache、Guardrail Result 与 Cost Field 的命名不同。建立 Provider-neutral Event Envelope,避免迁移破坏历史 SLO 与事故查询。

JSON · normalized gateway evidence
{
  "requestId": "req_01...",
  "traceId": "trace_01...",
  "tenantId": "tenant-test",
  "gateway": "candidate-name",
  "policyVersion": "hybrid-v3",
  "requestedAlias": "balanced",
  "resolvedModel": "approved-model-id",
  "attempts": [
    {
      "provider": "public-primary",
      "endpointClass": "public",
      "status": 429,
      "durationMs": 812,
      "terminalReason": "rate_limited"
    }
  ],
  "cacheStatus": "bypass",
  "guardrailResults": [],
  "inputTokens": 1240,
  "outputTokens": 318,
  "costUsd": 0.0123,
  "accepted": true
}

Security and privacy controls for hybrid routing混合路由的安全与隐私控制

  • Identity: map each gateway key to tenant, application, environment, owner, allowed models, budget, and expiry.身份:把每个 Gateway Key 映射到 Tenant、Application、Environment、Owner、Allowed Model、Budget 与 Expiry。
  • Provider allowlist: never let an automatic router cross a data-residency or contractual boundary merely because another provider is healthy.Provider Allowlist:不能因为另一个 Provider 健康,就让自动路由跨越数据驻留或合同边界。
  • PII: test redaction on JSON, tools, streaming events, nested content, and logs; top-level parameter stripping is not payload DLP.PII:在 JSON、Tool、Streaming Event、Nested Content 与 Log 中测试脱敏;移除顶层参数并不等于 Payload DLP。
  • Private endpoints: use TLS, service identity, scoped egress, DNS control, certificate rotation, and no insecure public fallback.私有端点:使用 TLS、Service Identity、Scoped Egress、DNS Control、Certificate Rotation,并禁止不安全公网回退。
  • Logs: choose payload collection, retention, export, regional storage, and role access explicitly; verify with a canary marker.日志:明确选择 Payload Collection、Retention、Export、Regional Storage 与 Role Access,并使用 Canary Marker 验证。

Compare total cost per accepted response比较每个有效响应的总成本

Current pricing models range from managed credits and BYOK to plan subscriptions, enterprise licenses, and self-hosted infrastructure. Do not compare one gateway fee line. Use provider inference + gateway or credit fees + retries and fallbacks + cache and log storage + egress + databases + compute + on-call and upgrade labor, divided by accepted results.

当前计费模式包括 Managed Credit、BYOK、套餐订阅、企业 License 与自托管基础设施。不要只比较一行 Gateway Fee。应计算 Provider Inference + Gateway/Credit Fee + Retry/Fallback + Cache/Log Storage + Egress + Database + Compute + On-call/Upgrade 人力,再除以有效结果。

Managed does not mean zero operations托管不等于零运维

Teams still own aliases, policies, incident thresholds, access reviews, retention, and vendor changes.

团队仍需负责 Alias、Policy、事故阈值、访问复核、Retention 与供应商变化。

Self-hosted does not mean free自托管不等于免费

Include HA, database, secret store, dashboards, upgrades, vulnerability response, scaling, and on-call.

应计入 HA、Database、Secret Store、Dashboard、Upgrade、漏洞响应、Scaling 与 On-call。

Fallback can multiply spend回退会放大成本

Count every upstream attempt, including failures and output rejected after HTTP success.

统计每次上游尝试,包括失败以及 HTTP 成功后因输出无效而拒绝的调用。

Network path has a price网络路径也有成本

Private connectivity, egress, cross-region traffic, certificates, and customer-hosted agents belong in TCO.

Private Connectivity、Egress、跨区域流量、Certificate 与客户托管 Agent 都应进入 TCO。

Migration mapping: move behavior, not just traffic迁移映射:迁移行为,而不仅是流量

ngrok artifactngrok 资产Target artifact目标资产Acceptance proof验收证据
Endpoint URL and API surfaceEndpoint URL 与 API SurfaceGateway profile and client adapterGateway Profile 与 Client AdapterChat, streaming, tools, schema, embeddings, errorsChat、Streaming、Tool、Schema、Embedding、Error
AI Gateway keys and auth actionsAI Gateway Key 与 Auth ActionVirtual keys, roles, JWT/OIDC, service identityVirtual Key、Role、JWT/OIDC、Service IdentityIssue, scope, rotate, revoke, deny, auditIssue、Scope、Rotate、Revoke、Deny、Audit
Provider definitions and BYOK secretsProvider Definition 与 BYOK SecretProvider/deployment registry and secret referencesProvider/Deployment Registry 与 Secret ReferenceCorrect account, region, quota, rotation, billing attribution账户、区域、配额、轮换与计费归因正确
CEL selection strategyCEL Selection StrategyRoute graph, config, weights, aliases, or policy codeRoute Graph、Config、Weight、Alias 或 Policy CodeGolden requests resolve to the expected ordered candidatesGolden Request 解析到预期有序候选
Timeouts and failoverTimeout 与 FailoverPer-attempt timeout, total deadline, retry owner, trigger map逐次 Timeout、总 Deadline、重试 Owner、触发映射Injected failures recover once without retry amplification注入失败后只恢复一次,无重试放大
Traffic Policy transforms and restrictionsTraffic Policy Transform 与 RestrictionMiddleware, guardrail, allowlist, DLP, and budget policyMiddleware、Guardrail、Allowlist、DLP 与 Budget PolicyGolden allow/deny/redact/downgrade cases matchGolden Allow/Deny/Redact/Downgrade Case 一致
Logs and metricsLog 与 MetricNormalized event envelope, OTel, export, dashboards, alerts标准 Event Envelope、OTel、Export、Dashboard、AlertOne request reconstructs both old and new paths单请求可同时还原旧路径与新路径

Canary rollout and rollbackCanary 放量与回滚

Inventory and freeze盘点并冻结

Export effective routes, secrets references, model aliases, transforms, timeouts, logs, SLOs, domains, certificates, and incident runbooks.

导出有效 Route、Secret Reference、Model Alias、Transform、Timeout、Log、SLO、Domain、Certificate 与 Incident Runbook。

Replay offline离线回放

Use redacted production-shaped prompts and compare accepted outputs, policy decisions, and route evidence—not exact prose.

使用脱敏生产形态 Prompt,比较有效输出、策略决策与路由证据,而不是逐字文本。

Shadow eligible traffic影子符合条件的流量

Exclude sensitive or side-effecting requests. Measure p50/p95/p99, accepted success, attempts, cost, and trace completeness.

排除敏感或有副作用的请求,测量 p50/p95/p99、有效成功、Attempt、Cost 与 Trace Completeness。

Canary by tenant按 Tenant Canary

Ramp 1% → 5% → 25% → 50% → 100% only when error, latency, quality, policy, and spend thresholds hold.

只有 Error、Latency、Quality、Policy 与 Spend 阈值持续满足时才按 1% → 5% → 25% → 50% → 100% 放量。

Keep instant rollback保留即时回滚

One configuration flag restores the ngrok profile without code deployment, DNS redesign, or data migration.

一个配置开关即可恢复 ngrok Profile,无需代码部署、DNS 重构或数据迁移。

Common migration failure modes常见迁移失败模式

Symptom现象Likely cause可能原因Fix修复
Public model works; private model fails公共模型正常,私有模型失败Only the API contract moved; DNS, TLS, identity, or egress did not只迁移 API Contract,未迁移 DNS、TLS、Identity 或 EgressProve the network path independently before model testing模型测试前独立验证网络路径
Costs double during outage故障期间成本翻倍Client, gateway, worker, and provider SDK all retryClient、Gateway、Worker 与 Provider SDK 同时重试Assign one retry owner and cap total upstream attempts指定一个 Retry Owner 并限制总上游尝试
Fallback returns invalid tool calls回退返回无效 Tool CallCandidate models or surfaces are not semantically compatible候选模型或 API Surface 语义不兼容Validate every route branch and restrict fallback by capability验证每个 Route Branch,并按能力限制回退
Forbidden provider receives traffic禁止 Provider 收到流量Automatic routing optimized health or price without a hard allowlist自动路由按健康/价格优化,但没有硬 AllowlistEnforce provider and region policy before optimization优化前强制 Provider 与 Region Policy
PII appears in logs after redaction脱敏后日志仍出现 PIIOnly one path or top-level field was transformed; streaming/tool/log paths were missed只转换一路径或顶层字段,遗漏 Streaming/Tool/Log 路径Test canary markers through request, response, events, errors, and exports让 Canary Marker 经过 Request、Response、Event、Error 与 Export 全链路测试
Self-hosted gateway is less reliable自托管 Gateway 可靠性更差HA, database, secret store, scaling, upgrades, and on-call were not designed未设计 HA、Database、Secret Store、Scaling、Upgrade 与 On-callTreat the gateway as a production platform, not a container把 Gateway 当作生产平台,而不是一个 Container

Where QVeris fits after the model gatewayQVeris 位于模型 Gateway 之后的哪里

ngrok or any alternative governs how applications reach models. QVeris complements that boundary when agents also need financial data, business APIs, research sources, or other external tools. Keep model-routing evidence and tool-source evidence as separate but correlated provenance chains.

ngrok 或其他替代方案负责应用如何到达模型。当 Agent 还需要金融数据、业务 API、研究来源或其他外部工具时,QVeris 补充能力访问边界。模型路由证据与工具来源证据应作为两条独立但可关联的 Provenance Chain 保存。

Discover

Find an external capability by task, coverage, region, freshness, and trust boundary.

按任务、覆盖、区域、新鲜度与信任边界发现外部能力。

Inspect

Review provider identity, schema, permissions, limits, evidence fields, and failure semantics.

检查 Provider 身份、Schema、权限、Limit、Evidence Field 与 Failure Semantics。

Call

Invoke the narrowest tool, validate output, preserve the source, and pass only necessary context through the model gateway.

调用最小范围工具,验证输出、保留来源,只把必要上下文传递给模型 Gateway。

ngrok AI Gateway alternatives FAQngrok AI Gateway 替代方案常见问题

What is the best ngrok AI Gateway alternative?最佳 ngrok AI Gateway 替代方案是什么?

There is no universal winner. Cloudflare fits edge policy, Vercel application and AI SDK workflows, Portkey guardrails and observability, Kong enterprise API estates, LiteLLM self-hosted provider breadth, TrueFoundry enterprise deployment control, Bifrost performance-focused self-hosting, and Helicone gateway observability.

没有通用赢家。Cloudflare 适合边缘策略;Vercel 适合应用与 AI SDK;Portkey 适合 Guardrail 与 Observability;Kong 适合企业 API;LiteLLM 适合自托管 Provider 广度;TrueFoundry 适合企业部署控制;Bifrost 适合性能型自托管;Helicone 适合 Gateway Observability。

When should I keep ngrok AI Gateway?什么时候应该继续使用 ngrok AI Gateway?

Keep ngrok when secure reach across public providers, private endpoints, and local models is the primary requirement and its Traffic Policy, key modes, routing, failover, and observability satisfy your controls.

当安全连接公共 Provider、私有端点与本地模型是首要需求,且 ngrok 的 Traffic Policy、Key Mode、Routing、Failover 与 Observability 已满足控制要求时,应继续使用。

Can ngrok route to Ollama or vLLM?ngrok 能路由到 Ollama 或 vLLM 吗?

Yes. Current documentation supports custom and self-hosted OpenAI- or Anthropic-compatible endpoints, including local-model patterns, when the endpoint is reachable and configured with BYOK.

可以。当前文档支持自定义及自托管 OpenAI/Anthropic-compatible Endpoint;只要端点可达并正确配置 BYOK,就可用于本地模型模式。

Which alternative is best for self-hosting?哪个替代方案最适合自托管?

LiteLLM Proxy and Bifrost are strong starting points for operating the gateway data plane. Kong and TrueFoundry also support enterprise-controlled deployment models, but with broader platform scope.

LiteLLM Proxy 与 Bifrost 是自行运营 Gateway 数据面的重点起点。Kong 与 TrueFoundry 也支持企业受控部署,但平台范围更广。

Which alternative is closest for edge traffic control?哪个方案最接近边缘流量控制?

Cloudflare AI Gateway is the closest edge-platform comparison, combining global edge infrastructure with caching, rate limiting, logging controls, and versioned dynamic routing.

Cloudflare AI Gateway 是最接近的边缘平台对比,将全球边缘基础设施与 Cache、Rate Limit、Logging Control 和版本化 Dynamic Routing 结合。

How should I compare gateway failover?应该如何比较 Gateway Failover?

Use the same model, prompt, timeouts, concurrency, and injected failures. Record each upstream attempt, final provider, latency, error class, output validity, and total cost.

固定 Model、Prompt、Timeout、Concurrency 与注入失败,记录每次上游 Attempt、最终 Provider、Latency、Error Class、Output Validity 与总成本。

Can I migrate by changing only the base URL?迁移时只改 Base URL 可以吗?

The client change may be small, but production migration also requires translating authentication, model aliases, provider policies, parameter handling, retries, cache semantics, logs, private reachability, and rollback.

客户端改动可能很小,但生产迁移还必须转换 Auth、Model Alias、Provider Policy、Parameter Handling、Retry、Cache Semantics、Log、Private Reachability 与 Rollback。

Where does QVeris fit?QVeris 位于哪里?

QVeris complements any model gateway by helping agents discover, inspect, and call external tools and data capabilities. The gateway governs model traffic; QVeris governs the broader capability-access layer.

QVeris 为任一模型 Gateway 补充外部工具与数据能力的发现、检查和调用。Gateway 管理模型流量,QVeris 管理更广泛的能力访问层。

Official sources官方资料

Capabilities, catalogs, deployment modes, pricing, and plan entitlements change. These primary sources were reviewed for this July 2026 revision; verify the current pages and your contract before purchase.

能力、目录、部署模式、价格与套餐权限会变化。以下第一方资料已在 2026 年 7 月修订时核对;采购前请再次核对当前页面与合同。

Shortlist by boundary, then prove the exit先按边界筛选,再证明退出能力

Choose at most two alternatives for the hybrid workload. Compare accepted-output reliability, policy evidence, private reach, cost, and operating ownership—then keep ngrok rollback active until the observation window closes.

针对混合负载最多选择两个替代方案。比较有效输出可靠性、策略证据、私有可达、成本与运营所有权,并在观察期结束前持续保留 ngrok 回滚路径。

Discover external AI capabilities发现外部 AI 能力