// compare
Functional AI vs an LLM gateway
Verdict
An LLM gateway sits between your code and your model providers: one API for many models, with fallbacks, spend limits, and logging on every call — while your application still runs the prompts and agents. Functional AI solves a different problem: it hosts and tests the prompt or agent that makes those calls, behind one typed endpoint your app calls. It does not route between providers or fail over to a backup model — each deployment runs on one model you chose, and switching or rolling back is instant. If provider fallback is what you need, use a gateway; the two can be used together.
LLM gateway details reflect the published pages of LiteLLM, Portkey, Cloudflare AI Gateway, Vercel AI Gateway and OpenRouter as of 2026-09; individual products differ, and corrections are welcome.
Choose Functional AI for
- Not running the agent yourself — the prompt or agent is hosted as one Agentic Function behind a typed endpoint
- Testing a prompt or agent across models on your own dataset before a human deploys it
- Agents with side effects: guarded tools, call limits, and human approval enforced by the runtime, not the prompt
- Shipping a new prompt or agent version without redeploying your app, and rolling it back instantly
Choose an LLM gateway for
- Governing every model call your own code makes — one API, keys, budgets, logs
- Running the proxy inside your own network: LiteLLM and Portkey's gateway are MIT-licensed and self-hostable
- Response caching and spend limits per key, team, or project
- Starting free: open-source, free-tier, or free-plan options are available today
Side by side
What it is
Functional AIAI observability and evaluation platform — hosts and tests the prompt or agent that makes model calls
LLM gatewayA proxy between your code and model providers
Where your agent runs
Functional AIIn Functional AI — your app calls the Agentic Function
LLM gatewayIn your code — the gateway carries its model calls
Access to many models
Functional AIYour own keys for Amazon Bedrock, Anthropic, OpenAI, or Google; one model per deployment
LLM gatewayYes — one OpenAI-compatible API across providers
Fallback when a model fails
Functional AINo — one model per deployment; switch model or roll back instantly
LLM gatewayYes — retries and model or provider fallbacks you configure
Testing before a change ships
Functional AIExperiments across models on your dataset inform a human; the Contract Test is the only automatic deploy check
LLM gatewayNot advertised by these gateways
Versioning and rollback
Functional AIFrozen, hashed versions — instant rollback; URL and keys never change
LLM gatewayPrompt management in some (Portkey); otherwise your code
Caching
Functional AINo
LLM gatewayResponse or semantic caching in most
Spend controls
Functional AIAgent step budget, per-key rate limits and quotas; cost and tokens on every call
LLM gatewayBudgets or spend limits per key, team, or project
Self-hosting
Functional AIHosted platform
LLM gatewayLiteLLM and Portkey's gateway: open source; Cloudflare, Vercel, OpenRouter: managed
Stage and pricing
Functional AIAvailable now — get started at fnai.dev/get-started, self-serve or with an engineer; credit-based plans; your own model keys, tokens never marked up
LLM gatewayOpen-source, free, usage-based, and enterprise tiers
At a glance
- An LLM gateway routes each model call your code makes; Functional AI hosts and tests the prompt or agent that makes the calls, and your app calls that instead. They solve different problems and can be used together.
- Gateways give you many models behind one API and automatic fallback when a provider fails. Functional AI does neither: each deployment runs on one model, on your own Bedrock, Anthropic, OpenAI, or Google key, and switching model or rolling back is instant.
- Functional AI tests a version across models on your dataset — trust score, pass rate, cost, latency, findings with prompt fixes — and a human decides what ships; the gateways compared here do not advertise pre-release testing.
- Functional AI's typed contract rejects bad input with a 422 before any model call, and guards hide a tool from the model until its condition holds.
- Gateways commonly add response caching and budgets per key or team; Functional AI has per-key rate limits and quotas but no caching.
- LiteLLM and Portkey's gateway are MIT-licensed and self-hostable; Cloudflare AI Gateway, Vercel AI Gateway, and OpenRouter are managed services.
- The gateways here can be used today, and so can Functional AI: is available on every plan self-serve or with a forward deployed engineer.
Honest pros and cons
Functional AI pros
- One call replaces an agent you would otherwise run, test, and version yourself
- Bad input costs nothing — the contract rejects it before any tokens are spent
- What you tested is what runs: each version is one hashed artifact, and rollback is instant
- Cost, latency, tokens, and version come back with every call; your provider bills tokens, never marked up
Functional AI cons
- No multi-provider routing or automatic fallback — if a provider outage must never reach users, a gateway does that and Functional AI does not
- Not a drop-in proxy: you move the prompt or agent into an Agentic Function rather than pointing existing calls at a new base URL
- No response caching
- A hosted platform — if policy requires an open-source proxy inside your own network, a self-hosted gateway meets that today
- No published customer stories or benchmarks yet
LLM gateway pros
- Close to drop-in: an OpenAI-compatible endpoint means existing code changes little
- Mature controls on raw model calls: budgets, caching, logging, key management
- Open-source options (LiteLLM, Portkey's gateway) you can run yourself
- Free or open-source tiers to start
FAQ
- What is an LLM gateway?
- An LLM gateway is a proxy between your application and model providers. Your code sends each model call to the gateway, which forwards it through one API — usually OpenAI-compatible — and adds retries and fallbacks, spend limits, logging, and often caching along the way. Your application still owns the prompts, agents, and workflows; the gateway governs the calls they make.
- What are the main LLM gateway options?
- Common options include LiteLLM and Portkey, both with MIT-licensed gateways you can self-host, and managed gateways from Cloudflare (AI Gateway), Vercel (AI Gateway), and OpenRouter. Choose the hosting model first — self-hosted open source or managed — then the controls you need: budgets, caching, guardrails, key management. If what you actually want is for someone else to run the agent, not just its model calls, that is an AI observability and evaluation platform such as Functional AI rather than a gateway.
- Is an LLM gateway free?
- Often, at least to start. LiteLLM and Portkey's gateway are open source under the MIT licence and free to self-host. Cloudflare AI Gateway's core features are free on all plans, Vercel AI Gateway has a free tier, and OpenRouter has a free plan with free models. You still pay for model usage, and paid tiers add features or fees — check each vendor's pricing page.
- Do I need an LLM gateway if I use Functional AI?
- It depends on what you need from the model calls. Functional AI hosts and tests the prompt or agent and returns cost, tokens, and latency on every call, but it does not route between providers or fall back to a backup model: each deployment runs on one model, on your own provider key, and a model switch or rollback is a deliberate, instant change. If you need multi-provider fallback, caching, or one API across many models, that is a gateway's job. The two can be used together — a gateway for the model calls your own code makes, Functional AI for the agents you would rather not run yourself.
- What is the difference between an MCP gateway and an LLM gateway?
- An LLM gateway sits in front of model providers and governs model calls. An MCP gateway sits in front of MCP servers — the tools an agent calls — and governs tool access. Some products do both: Portkey offers an MCP gateway alongside its AI gateway, and LiteLLM can proxy calls to MCP servers.
- What is the difference between an LLM gateway and an LLM router?
- A gateway gives you access to models and carries each call; a router decides which model a request should go to. The two are often used together, with the router's choice executed through the gateway. Functional AI sits at a different layer: it hosts and tests the agent that makes the calls, on one model per deployment chosen by a human from experiment results. See Functional AI vs an LLM router for the routing side.
Evaluating options? Book a Functional AI demo or talk to an engineer — available on every plan, self-serve or with an engineer from the team that built the platform.