Do prompts pass through the Elchi control plane?
No. Requests go from the client to Envoy on your edge and from there to the provider. The control plane holds the configuration and reads usage, the request log and decisions from ClickHouse.
One governed entry point for LLM providers and MCP tools on your Envoy listeners: provider keys stay in the control plane, every application and agent gets its own key and quotas, a model can fail over across providers, and every request is measured for tokens and cost.
ELCHI AI GATEWAY
Add-on · Requires Elchi CoreAdd-on to Elchi Core. Configured centrally per project, served on your edges next to Envoy — prompts go from the edge to the provider, never through Elchi’s control plane.
Elchi AI Gateway is an LLM and MCP gateway for Envoy. Applications call an AI listener on your edge instead of the model providers. The edge picks a gateway by the request’s Host, checks the caller’s key, model grants and quotas, sends the request to a provider that serves the model with that provider’s own credential, and records tokens, cost and the outcome. The engine is the upstream Agent Router extproc (formerly Envoy AI Gateway), which parses OpenAI- and Anthropic-style requests, translates them to each provider’s API and counts tokens; Elchi runs it as the child of a sidecar, elchi-ai-gateway, one per edge. Envoy talks to the engine and to the sidecar’s key and quota checks over local Unix sockets. Providers, gateways, consumers, MCP servers and the sensitive-data policy are set per project in the Elchi UI or the REST API; the agent delivers them to the edges as files, and the control plane generates every Envoy resource the AI listeners need.
OpenAI, Azure OpenAI (API key or Microsoft Entra ID), Anthropic, AWS Bedrock, Google Vertex AI, Cohere, TypeSafe and any OpenAI-compatible server. Credentials are sealed in the control plane and masked in the API; applications never hold them.
Consumers get virtual keys (sk-elchi-…), shown once and stored as hashes, accepted as a Bearer token, x-api-key or api-key and removed before the provider sees the request. Allow each consumer only the gateways, providers and models it needs.
Requests, tokens and cost per minute, day and month per consumer, enforced before the request reaches a provider. Model prices turn token counts into cost; CEL token limits cap a gateway or the whole project.
One model name served by several providers with weights inside a priority level and fallback levels behind it. Retries go to the level’s other providers first; a fallback serves only when the level above has no healthy provider.
Each gateway is its own set of hosts, models, limits and request-log policy. An AI listener serves the gateways bound to it, over HTTPS and/or plain HTTP with a 308 redirect, with a default gateway for other hosts.
Personal data and secrets in prompts and MCP tool calls are flagged or blocked per type, per project or per gateway. The check fails closed: a scan that cannot finish refuses the request instead of passing it on.
One row per request with model, provider, tokens, cost and status. Optional content capture is masked by the sensitive-data policy and encrypted on the edge to the project’s key; opening it is audited.
Tokens and cost per gateway, provider, model, consumer and edge, unpriced tokens called out, and every provider’s answers by class and code — all from ClickHouse.
Agents such as Claude Code and Cursor connect once to /mcp on an AI listener and see only the tools they were granted. Each call is authorized, counted against an MCP call quota and logged; server credentials stay in the control plane and the proxy.


On an AI listener, Envoy’s HTTP connection manager runs the AI filters before the router: a header filter that names the gateway, a key check over ext_authz, the engine over ext_proc (which reads the body and sets the model), and a model check over ext_authz for grants, quotas, cost and sensitive data. The router then picks the provider cluster by model, and each provider cluster’s upstream chain translates the request and injects the provider credential.
The sidecar supervises the engine and answers the key and model checks on its own socket. It is not a proxy in the path: the request bytes flow through Envoy to the provider.
Elchi Core, and a Linux amd64 edge running elchi-client with elchi-ai-gateway installed next to it. Elchi OS 0.8.0 and later ship the gateway in the image with its engine, so it runs without the network; on a plain Linux edge the installer sets up the service, its sockets and a firewall guard for the engine’s admin port. Usage, the request log and the MCP call log go to ClickHouse; without one the gateway still serves traffic.
The AI filters are fail-closed: if the gateway or its checks cannot answer, requests fail rather than reach a provider without authorization. A configuration the edge refuses never replaces the one it serves — the last accepted configuration stays active and the refusal is reported back to the control plane with the edge’s exact version. A provider that fails is retried on the model’s other providers.
Clients of the OpenAI API (chat completions, completions, embeddings, models) and of the Anthropic Messages API, with their own SDKs: set the base URL to the AI listener and the API key to a consumer key. Which client API reaches which provider type is fixed by the engine; the providers page lists the matrix, for example Claude for OpenAI-format clients is served through Bedrock or Vertex AI.
The edge must be amd64. One AI gateway instance serves every AI listener on an edge, and an HTTP connection manager with the AI gateway turned on serves AI traffic only, so AI listeners are dedicated. A request body is limited to 50 MiB. Usage and cost come from ClickHouse, and hourly rollups are not backfilled for the time before they started. Elchi publishes no general latency figure for the gateway.
Add providers once per project; their keys stay in the control plane.
Define gateways and models, bind them to an AI listener, deploy.
Give every application or agent its own key, grants and quotas.
Follow tokens, cost, provider health and the request log.
No. Requests go from the client to Envoy on your edge and from there to the provider. The control plane holds the configuration and reads usage, the request log and decisions from ClickHouse.
Yes, when the provider allows it: a client may send its own key in x-elchi-provider-key, and Envoy moves it to metadata and removes the header before anything else sees it.
Not by default: the request log stores metadata. Content capture is opt-in per gateway, masked by the sensitive-data policy and encrypted on the edge to the project’s key.
Tell us how many Envoy hosts you run, which Envoy versions, and which add-ons you are evaluating. We reply with a demo or a proof-of-concept plan for your setup. To try it yourself first, the quickstart installs the free tier.