Skip to main content
Use LiteLLM as an OpenAI-compatible gateway in front of Poolside model inference when you need centralized routing, virtual API keys, budgets, spend tracking, cross-provider fallbacks, or a shared endpoint for internal teams. LiteLLM receives OpenAI-compatible requests from clients, reads the model field in each request, and routes the request to the matching upstream model endpoint. In this setup, each upstream endpoint is a Poolside model server running in your Kubernetes cluster.
LiteLLM is third-party software. You are responsible for LiteLLM configuration, access controls, persistence, upgrades, and security hardening. For production deployment guidance, see the LiteLLM production deployment documentation.

How it works

This setup includes:
  • One or more Poolside model inference services running in Kubernetes.
  • A LiteLLM proxy deployment running in the same cluster.
  • A LiteLLM ingress that exposes a shared OpenAI-compatible endpoint.
  • A LiteLLM database that stores state for virtual keys, budgets, spend logs, and models added through the LiteLLM admin UI.
Clients send requests to LiteLLM instead of calling each Poolside model endpoint directly. LiteLLM routes each request to the Poolside model service that matches the public model name configured in LiteLLM.

Watch the deployment walkthrough

Prerequisites

  • You have deployed Poolside model inference in a Kubernetes cluster. See Cloud deployment overview.
  • You have a valid kubeconfig for the cluster.
  • You have helm, kubectl, curl, jq, and openssl installed on the machine where you run the deployment.
  • You have a DNS hostname for the LiteLLM endpoint.
  • You have an ingress controller that can route traffic to LiteLLM.
  • You know the namespace where Poolside model inference is running. The examples on this page use <inference-namespace>.

Step 1: Confirm Poolside model inference is running

Check the model pods and services:
Confirm each model pod is ready before you deploy LiteLLM. In the standard Poolside inference chart, each model deployment and service is named inference-<model-key>, where <model-key> is the suffix shown in the kubectl get pods,svc output, such as lagunas in inference-lagunas. Retrieve the served model name from the model deployment:
If the model has an ingress, you can query the model endpoint instead:
To find the model hostname, read it from the model ingress:

Step 2: Create the LiteLLM namespace

Create a namespace for LiteLLM:

Step 3: Create LiteLLM secrets

Create a master key for authenticating to LiteLLM:
Create the LiteLLM environment secret:
Store LITELLM_SALT_KEY securely and do not change it after you add models. LiteLLM uses this key to encrypt provider credentials stored in the database.
If you configured API key authentication for Poolside inference, keep the VLLM_API_KEY available for Step 6. If the model server does not require authentication, LiteLLM still requires a non-empty value for the upstream OpenAI API key field.

Step 4: Configure LiteLLM Helm values

Create a values.yaml file for the LiteLLM Helm chart. This complete example uses the secrets you created in Step 3:
Example: values.yaml
Replace:
  • <postgres-password> with a strong database password.
  • <ingress-class-name> with the ingress class for your cluster, such as nginx.
  • <litellm-hostname> with the DNS hostname that routes to LiteLLM.
This configuration leaves model_list empty and sets store_model_in_db: true so you can add Poolside models from the LiteLLM admin UI.
This example uses the bundled PostgreSQL chart for a simple single-cluster deployment. For high availability or production hardening, review LiteLLM’s guidance for external PostgreSQL, Redis, multiple replicas, image pinning, and secret management.

Step 5: Install LiteLLM

Install the LiteLLM Helm chart:
The install creates the LiteLLM proxy, a PostgreSQL pod, and a database migration job. Confirm the pods are ready:
Retrieve the LiteLLM master key:
You use this key to sign in to the LiteLLM admin UI and to authenticate test requests to the LiteLLM proxy.

Step 6: Add a Poolside model in LiteLLM

You can add Poolside models through the LiteLLM admin UI or define them in values.yaml. Each model uses three names:
  • <model-key>: The key that names the inference Deployment and Service, as inference-<model-key>. Used to build the API base.
  • <served-model-name>: The name the Poolside model server serves, from Step 1. Goes after the openai/ prefix.
  • <public-model-name>: A name of your choice that clients send in the request model field.

Add a model from the admin UI

  1. Gather two values from your Poolside inference deployment:
    • The served model name from Step 1, which must match the value used to deploy Poolside.
    • The inference service name, inference-<model-key>, used to build the in-cluster API base:
      The service name includes the model key:
      Example output
  2. Open the LiteLLM admin UI:
  3. Sign in with:
    • Username: admin
    • Password: The LiteLLM master key from Step 5
  4. In the navigation menu, select Models + Endpoints.
  5. Select the Add Model tab and then select or enter the following values:
  6. Click Test Connect. A successful test confirms that LiteLLM can reach the Poolside model service from inside the cluster.
  7. Click Add Model. The public model name appears on the All Models tab.

Add a model in Helm values

  1. Define the model in values.yaml under proxy_config.model_list:
    values.yaml
  2. Upgrade the chart:

Step 7: Test the LiteLLM endpoint

List the models that LiteLLM exposes:
The response includes the public model name you configured in LiteLLM:
Send a chat completion request through LiteLLM:
The setup is working when LiteLLM returns a chat completion response from the Poolside model.

Next steps

Use LiteLLM with Poolside Agent CLI

Follow Install Poolside Agent CLI and choose Connect an OpenAI-compatible provider. Enter:
  • API base URL: http://<litellm-hostname>/v1
  • API key: The LiteLLM master key from Step 5. For shared or production use, create a scoped virtual key instead.
LiteLLM lists the public model names you configured at /v1/models. Start pool, then press Ctrl+M or use /model to choose a model. See Change the agent.

Use the LiteLLM endpoint from other clients

Point any OpenAI-compatible client, such as the OpenAI SDK, at LiteLLM. Enter:
  • API base URL: http://<litellm-hostname>/v1
  • API key: The LiteLLM master key from Step 5. For shared or production use, create a scoped virtual key instead.
Set the request’s model value to a public model name configured in LiteLLM.

Operational considerations

  • Authentication: The master key is a full-access administrator credential. For shared or production use, create scoped LiteLLM virtual keys for users, teams, and applications instead of distributing the master key.
  • Persistence: LiteLLM stores keys, budgets, spend logs, and UI-managed models in PostgreSQL. Back up the database according to your organization’s recovery requirements.
  • High availability: A multi-replica LiteLLM deployment requires production-grade PostgreSQL and Redis configuration. Review LiteLLM’s production deployment guidance before scaling the gateway.
  • Network access: LiteLLM must be able to reach the Poolside model service URLs from inside the cluster.
  • TLS: Expose LiteLLM over HTTPS before sharing the endpoint outside a trusted internal network.
  • Model names: The LiteLLM public model name is the name clients use. The upstream model name must match the served model name returned by the Poolside model endpoint.