Skip to main content

Legacy AI Gateway

Legacy gateway

This page covers the legacy AI Gateway, which runs through the AI Gateway operator and AIGateway resources. For the current AI Gateway, see AI Gateway.

Stacklok Enterprise

The legacy AI Gateway is a component of Stacklok Enterprise.

Learn more about Stacklok Enterprise.

The legacy AI Gateway is a self-hosted control point between AI clients and large language model (LLM) providers. Platform and security teams use it to enforce identity, budget, routing, data protection, and audit policies for model traffic.

The legacy gateway governs model access. The Connector Gateway governs MCP tool access.

Identify your deployment​

The legacy gateway is installed through the AI Gateway operator with global.stacklok.aiGateway.enabled and is configured through AIGateway custom resources. If this command lists any resources, you run the legacy gateway:

kubectl get aigw -A

The current AI Gateway is installed with global.stacklok.aiGatewayV2.enabled, runs as the <RELEASE_NAME>-ai-gateway-v2 Deployment, and is configured through Helm values. If this command lists a Deployment, you run the current AI Gateway:

kubectl get deploy -A | grep ai-gateway-v2

For the current AI Gateway, see AI Gateway. To move an existing deployment from the legacy gateway, see Migrate from the legacy AI Gateway.

What you can do​

  • Set cost budgets for users and groups.
  • Route model names across providers with weighting and failover.
  • Screen requests and responses for prompt injection, payment card data, and personally identifiable information (PII).
  • Record structured audit events and forward them to a security information and event management (SIEM) system.
  • Associate requests with identities while keeping provider credentials in the gateway.
  • Export traces and metrics to an OpenTelemetry collector, attributed to the users and groups that sent the traffic.

How configuration works​

Apply an AIGateway custom resource to configure providers, routing, resilience, and screening. The AI Gateway operator reconciles the resource into running infrastructure.

Manage budgets in the console or use the Enterprise Manager API for automation and bulk import. See Manage budgets and Budgets and pricing. To confirm that the legacy gateway enforces those budgets, see Enforce budgets at the legacy AI Gateway.

Before you start​

Install the legacy gateway before applying the examples in this section. See Configure the legacy AI Gateway.

Examples on these pages use -n <NAMESPACE>, where <NAMESPACE> is the namespace your legacy gateway is installed into.

For caller identity and catalog API endpoints, see the management API reference.

Contents​