Skip to main content
The AI gateway is the LLM proxy on the Agent Controller, the xpander service that mediates every model and skill call. No executor, workspace or harness holds a provider key. The client inside the session is pointed at the proxy instead. The controller then resolves the credential, applies the organization’s model policy and budget, records the call under the person who asked, and forwards it to the provider.

What passes through it

  • Every turn of an agent on Claude Code, Codex or OpenCode. The session receives ANTHROPIC_BASE_URL (Claude Code) or OPENAI_BASE_URL (Codex) pointing at the proxy, with a session token instead of a provider key.
  • xpander’s own model calls: thread titles, context compaction, evaluation judges, and the gateway model that runs entry filtering ahead of the agent’s model.
  • Guardrail moderation, when enabled.
Preflight refuses a self-hosted install that has no provider configured for model calls: an organization default provider, a gateway provider, or a per-provider in-cluster endpoint must exist.

Where it is configured

Which harness a new agent starts on follows the organization’s default provider: Anthropic maps to Claude Code, Amazon Bedrock with an Anthropic model to Claude Code on Bedrock, OpenAI to Codex, any other provider to OpenCode on that model.
LLM settings providers card

Settings > LLM settings: the providers card, workspace defaults and gateway model. Shown with sample data.

Routing through a gateway you already run

The proxy’s upstream per provider is an environment variable on the Agent Controller, so an existing AI gateway in your network can sit between xpander and the vendor: The controller egresses to api.anthropic.com by default; with an override set, that is the only host it needs for Anthropic. xpander’s model policy, budget and record are applied on the controller before the call leaves; the gateway sees one more client, and its other clients stay outside xpander’s controls.

Verify

In Xpander Chat, Settings > Locations shows the installation as Connected. A model call from any agent appears in the task’s usage and under Settings > Usage. Deep pages: AI vendors, Air-gapped: local LLM inference, Hybrid: managing LLM API keys.