LiteLLM

The LiteLLM integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] allows you to use a LiteLLM proxy as a conversation agent or speech-to-text service in Home Assistant.

LiteLLM exposes a single OpenAI-compatible API in front of a wide range of model providers, so you can use almost any model through one endpoint. This is similar to a service like OpenRouter, with the added benefit that you can run LiteLLM yourself if you prefer to keep everything under your own control. This integration lets you point Home Assistant at any LiteLLM proxy, whether it is a hosted instance or one you self-host.

Home Assistant lists all models returned by LiteLLM in both the conversation and speech-to-text model lists. Choose a model that supports chat completions for a conversation agent or audio transcription for a speech-to-text service. The proxy’s settings may not match what a model’s backend can do, so LiteLLM or the model’s backend may reject an incompatible request.

Prerequisites

Before you add this integration, you need the following:

  • A LiteLLM proxy that Home Assistant can reach. This is the endpoint the integration connects to. You can use a hosted LiteLLM proxy or run one yourself.
  • At least one model configured on the proxy. The integration discovers the available models when you add a conversation agent or speech-to-text service.
  • An API key, if your proxy requires authentication. This is used to authorize Home Assistant’s requests to the proxy. You can leave it empty if your proxy does not require one.

Configuration

To add the LiteLLM service to your Home Assistant instance, use this My button:

Manual configuration steps

If the above My button doesn’t work, you can also perform the following steps manually:

URL

The base URL of your LiteLLM proxy, including the host and port. The integration automatically appends the OpenAI /v1 path if it is missing.

API key

An optional LiteLLM API key or virtual key. Leave it empty if your proxy does not require authentication.

Adding a conversation agent

After the integration is set up, add a conversation agent for the model you want to use:

  1. Go to Settings > Devices & services and select your LiteLLM entry.
  2. Select Add conversation agent.
  3. Fill in the fields:
Model

The model to use for the conversation agent. The list is discovered from your LiteLLM proxy.

Instructions

Instruct how the LLM should respond. This field supports templates.

AI tools

Device control only accesses the entities you expose to voice assistants. Home Assistant accesses everything and only works for administrators, not voice assistant devices. Leave it empty if you do not want the agent to control Home Assistant.

To change the model, instructions, or tools later, select the conversation agent and choose Reconfigure conversation agent.

Adding a speech-to-text service

  1. Go to Settings > Devices & services and select your LiteLLM entry.
  2. Select Add speech-to-text service.
  3. Fill in the fields. If you turn on Custom prompt/keywords, select Submit to show the Prompt and Keywords fields.
Model

The model used to transcribe speech. The list is discovered from your LiteLLM proxy.

Custom prompt/keywords

Turn on to send optional prompt and keyword hints. Not every backend supports them. If the backend doesn’t support a parameter, it rejects the request and Assist can’t transcribe your speech. To fix this, clear the field or turn this off. Turning this off also removes any saved prompt and keywords.

Prompt

Optional context or instructions for the transcription, in the same language as the audio. Supports templates.

Keywords

Comma-separated words or phrases, such as names, to help the model recognize them. Supports templates.

The service appears as a speech-to-text entity named after the model. Select it in an Assist pipeline. Home Assistant sends the pipeline language without its region. For example, en-US is sent as en.

To change these settings later, select the speech-to-text service and choose Reconfigure speech-to-text service.

Supported functionality

For each conversation agent you add, you can use it in Assist like any other conversation agent. Speech-to-text entities can be selected in an Assist pipeline.

When you select tools in AI tools, the agent can call them to interact with your devices and entities. To choose which devices and entities Device control can access, see exposing entities to Assist.

Removing the integration

This integration follows standard integration removal, no extra steps are required.

To remove an integration instance from Home Assistant

  1. Go to Settings > Devices & services and select the integration card.
  2. Next to the entry you want to remove, select the three dots menu. Then, select Delete.
    • Depending on the integration, the entries are listed under one of the following headings:
      • Devices
      • Hubs
      • Services
      • Integration entries
  3. To confirm, select Delete.
    • Home Assistant also deletes the devices and entities of the entry.
  4. If Home Assistant asks you to restart, restart Home Assistant.
  5. If Home Assistant asks whether to also delete the application credentials, select Remove or Keep.