Compare · Cloudflare AI Gateway

A Cloudflare AI Gateway alternative for finding and replacing repeated LLM work

Cloudflare AI Gateway runs on Cloudflare's network with analytics, caching, rate limiting, dynamic routing and guardrails, and its core features are free. ModelGate is a paid, hosted gateway for four providers whose focus is different: it groups repeated requests into tasks and tests cheaper replacements — a model, plain code or a small open model — against your recorded answers, then opens the change as a pull request.

Where ModelGate is different

  • It works from your repository as well as your traffic: findings point at the file and line, and fixes open as pull requests you merge.
  • For rule-like tasks it proposes plain code, tested against your model’s own recorded answers; when code can’t match them, a small open model may.
  • Pricing is a base fee plus a share of realized savings — see pricing for the full terms.

We found none of the first two in Cloudflare AI Gateway’s reviewed documentation. That is not proof they don’t exist.

Where Cloudflare AI Gateway is stronger

  • Core features are free; log storage, Logpush and guardrails are billed through Workers / Workers AI usage.
  • Dynamic routing with conditional and percentage splits, retries and model fallbacks.
  • Guardrails that flag or block harmful prompts and responses, and DLP scanning — ModelGate has no content-moderation categories.
  • Runs on Cloudflare's own network as a managed service.

Stay with Cloudflare AI Gateway if you want free gateway analytics and routing on infrastructure you already use, and don't need code-level changes.

ModelGate compared with Cloudflare AI Gateway on ten criteria
CriterionModelGateCloudflare AI Gateway
Request and cost observabilityAvailableEvery request logged, failed ones included, and priced against a versioned rate table. Four providers: OpenAI, Anthropic, Google Gemini, Azure OpenAI.Details: ModelGate documentationAvailableAnalytics on requests, tokens and cost, plus request logs.Source: Cloudflare AI Gateway docs (opens in a new tab)
Budgets and access controlsAvailablePer-project monthly spend cap (402), requests-per-minute per key (429), token ceilings (413); scoped API keys; agency roles and per-client caps. No SSO.Details: ModelGate securityAvailableRate limiting; budget-limit and rate-limit nodes in dynamic routing switch to a fallback when exceeded.Source: Cloudflare AI Gateway docs (opens in a new tab) · Source: Cloudflare AI Gateway — Dynamic routing (opens in a new tab)
Security guardrailsLimitedBuilt-in heuristic detectors: prompt-injection scoring, 17 secret signatures plus an entropy pass, 6 personal-data types. Detect on every plan; enforce on paid plans. No content-moderation categories.Details: ModelGate securityAvailableGuardrails flag or block harmful prompts and responses (billed as Workers AI usage); DLP scanning.Source: Cloudflare AI Gateway — Guardrails (opens in a new tab) · Source: Cloudflare AI Gateway — Pricing (opens in a new tab)
Caching and model routingLimitedExact cache only (temperature 0, no tools, 24 h). Routing moves small, simple calls to a fixed same-provider cheaper model; retry plus one secondary provider. No semantic cache or load balancing.Details: ModelGate documentationAvailableCaching; dynamic routing with conditional and percentage splits, retries and model fallbacks.Source: Cloudflare AI Gateway docs (opens in a new tab) · Source: Cloudflare AI Gateway — Dynamic routing (opens in a new tab)
Repository analysisLimitedGitHub only. Reads the repositories you choose in memory and maps LLM calls to file and line (JavaScript/TypeScript and Python). Source is not stored.Details: ModelGate docs — GitHub connectionNot confirmed in reviewed documentationNo mention found in the pages reviewed.
Integration and optimization pull requestsLimitedA setup PR that points OpenAI SDK clients at the gateway; one-line PRs for a model switch or a lower output limit; a PR that adds a verified code replacement. Always on a new branch.Details: ModelGate docs — GitHub connectionNot confirmed in reviewed documentationNo mention found in the pages reviewed.
Deterministic code replacementLimitedOnly for rule-like tasks (a few fixed labels, extraction, JSON reshaping, arithmetic, simple image checks) with 50+ recorded calls and prompt and response storage on.Details: ModelGate docs — code replacementsNot confirmed in reviewed documentationNo mention found in the pages reviewed.
Validation and customer approval of changesAvailableCode replacements must match 95% of 30+ held-out recorded answers. Model-switch PRs point to an optional replay eval. Every PR is merged by you; gateway optimizations are off until you switch them on.Details: ModelGate docs — code replacements · Details: ModelGate docs — GitHub connectionNot confirmed in reviewed documentationNot applicable as reviewed: no code-change workflow found to validate.
Deployment optionsLimitedHosted service only. ModelGate OSS is a separate local-first gateway (v0.1) with a smaller feature set.Details: ModelGate OSSAvailableRuns on Cloudflare's network as a managed service.Source: Cloudflare AI Gateway docs (opens in a new tab)
Pricing structureAvailable$99/month (1 project, +$29 per extra) or $199/month for agencies (5 clients, +$29 per extra), plus 30% of realized savings and 30% of savings from changes made from suggestions for 3 months. 14-day trial.Details: ModelGate pricingAvailableCore features free; log storage, Logpush and guardrails billed through Cloudflare Workers / Workers AI usage.Source: Cloudflare AI Gateway — Pricing (opens in a new tab)

Request and cost observability

ModelGateAvailableEvery request logged, failed ones included, and priced against a versioned rate table. Four providers: OpenAI, Anthropic, Google Gemini, Azure OpenAI.Details: ModelGate documentation
Cloudflare AI GatewayAvailableAnalytics on requests, tokens and cost, plus request logs.Source: Cloudflare AI Gateway docs (opens in a new tab)

Budgets and access controls

ModelGateAvailablePer-project monthly spend cap (402), requests-per-minute per key (429), token ceilings (413); scoped API keys; agency roles and per-client caps. No SSO.Details: ModelGate security
Cloudflare AI GatewayAvailableRate limiting; budget-limit and rate-limit nodes in dynamic routing switch to a fallback when exceeded.Source: Cloudflare AI Gateway docs (opens in a new tab) · Source: Cloudflare AI Gateway — Dynamic routing (opens in a new tab)

Security guardrails

ModelGateLimitedBuilt-in heuristic detectors: prompt-injection scoring, 17 secret signatures plus an entropy pass, 6 personal-data types. Detect on every plan; enforce on paid plans. No content-moderation categories.Details: ModelGate security
Cloudflare AI GatewayAvailableGuardrails flag or block harmful prompts and responses (billed as Workers AI usage); DLP scanning.Source: Cloudflare AI Gateway — Guardrails (opens in a new tab) · Source: Cloudflare AI Gateway — Pricing (opens in a new tab)

Caching and model routing

ModelGateLimitedExact cache only (temperature 0, no tools, 24 h). Routing moves small, simple calls to a fixed same-provider cheaper model; retry plus one secondary provider. No semantic cache or load balancing.Details: ModelGate documentation
Cloudflare AI GatewayAvailableCaching; dynamic routing with conditional and percentage splits, retries and model fallbacks.Source: Cloudflare AI Gateway docs (opens in a new tab) · Source: Cloudflare AI Gateway — Dynamic routing (opens in a new tab)

Repository analysis

ModelGateLimitedGitHub only. Reads the repositories you choose in memory and maps LLM calls to file and line (JavaScript/TypeScript and Python). Source is not stored.Details: ModelGate docs — GitHub connection
Cloudflare AI GatewayNot confirmed in reviewed documentationNo mention found in the pages reviewed.

Integration and optimization pull requests

ModelGateLimitedA setup PR that points OpenAI SDK clients at the gateway; one-line PRs for a model switch or a lower output limit; a PR that adds a verified code replacement. Always on a new branch.Details: ModelGate docs — GitHub connection
Cloudflare AI GatewayNot confirmed in reviewed documentationNo mention found in the pages reviewed.

Deterministic code replacement

ModelGateLimitedOnly for rule-like tasks (a few fixed labels, extraction, JSON reshaping, arithmetic, simple image checks) with 50+ recorded calls and prompt and response storage on.Details: ModelGate docs — code replacements
Cloudflare AI GatewayNot confirmed in reviewed documentationNo mention found in the pages reviewed.

Validation and customer approval of changes

ModelGateAvailableCode replacements must match 95% of 30+ held-out recorded answers. Model-switch PRs point to an optional replay eval. Every PR is merged by you; gateway optimizations are off until you switch them on.Details: ModelGate docs — code replacements · Details: ModelGate docs — GitHub connection
Cloudflare AI GatewayNot confirmed in reviewed documentationNot applicable as reviewed: no code-change workflow found to validate.

Deployment options

ModelGateLimitedHosted service only. ModelGate OSS is a separate local-first gateway (v0.1) with a smaller feature set.Details: ModelGate OSS
Cloudflare AI GatewayAvailableRuns on Cloudflare's network as a managed service.Source: Cloudflare AI Gateway docs (opens in a new tab)

Pricing structure

ModelGateAvailable$99/month (1 project, +$29 per extra) or $199/month for agencies (5 clients, +$29 per extra), plus 30% of realized savings and 30% of savings from changes made from suggestions for 3 months. 14-day trial.Details: ModelGate pricing
Cloudflare AI GatewayAvailableCore features free; log storage, Logpush and guardrails billed through Cloudflare Workers / Workers AI usage.Source: Cloudflare AI Gateway — Pricing (opens in a new tab)

“Not confirmed in reviewed documentation” means we found no mention — not that the feature is missing. ModelGate OSS, a separate local-first gateway with a smaller feature set, is not counted here.

Trying ModelGate from Cloudflare AI Gateway

ModelGate speaks the OpenAI Chat Completions API, streaming included. Point your OpenAI SDK client at ModelGate's base URL instead of your Cloudflare gateway URL. You see the cost per task first; nothing in your code changes until you merge a pull request.

from openai import OpenAI

client = OpenAI(
    base_url="https://gw.modelgatehq.com/v1",
    api_key="YOUR_MODELGATE_KEY",
)

Full setup, providers and limits are in the documentation. To see what a repeated task looks like as code, read replacing LLM calls with code.

Sources

Cloudflare AI Gateway’s own product pages and documentation, reviewed 7 October 2026. Vendors change quickly — check the source before deciding.

Spotted something out of date? Tell us at support@modelgatehq.com and we’ll correct it.

Other comparisons