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.
| Criterion | ModelGate | Cloudflare AI Gateway |
|---|---|---|
| Request and cost observability | AvailableEvery request logged, failed ones included, and priced against a versioned rate table. Four providers: OpenAI, Anthropic, Google Gemini, Azure OpenAI.Details: ModelGate documentation | AvailableAnalytics on requests, tokens and cost, plus request logs.Source: Cloudflare AI Gateway docs (opens in a new tab) |
| Budgets and access controls | AvailablePer-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 | AvailableRate 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 | LimitedBuilt-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 | AvailableGuardrails 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 | LimitedExact 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 | AvailableCaching; 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 | LimitedGitHub 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 | Not confirmed in reviewed documentationNo mention found in the pages reviewed. |
| Integration and optimization pull requests | LimitedA 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 | Not confirmed in reviewed documentationNo mention found in the pages reviewed. |
| Deterministic code replacement | LimitedOnly 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 | Not confirmed in reviewed documentationNo mention found in the pages reviewed. |
| Validation and customer approval of changes | AvailableCode 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 | Not confirmed in reviewed documentationNot applicable as reviewed: no code-change workflow found to validate. |
| Deployment options | LimitedHosted service only. ModelGate OSS is a separate local-first gateway (v0.1) with a smaller feature set.Details: ModelGate OSS | AvailableRuns on Cloudflare's network as a managed service.Source: Cloudflare AI Gateway docs (opens in a new tab) |
| Pricing structure | Available$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 | AvailableCore 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
Budgets and access controls
Security guardrails
Caching and model routing
Repository analysis
Integration and optimization pull requests
Deterministic code replacement
Validation and customer approval of changes
Deployment options
Pricing structure
“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.
- Cloudflare AI Gateway docs
- Cloudflare AI Gateway — Dynamic routing
- Cloudflare AI Gateway — Guardrails
- Cloudflare AI Gateway — Pricing
Spotted something out of date? Tell us at support@modelgatehq.com and we’ll correct it.