> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lehar.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Providers & Models

> Choose the LLM, speech-to-text, and text-to-speech providers per agent or per session.

Lehar is provider-pluggable. You pick the **LLM**, **STT** (speech-to-text), and **TTS** (text-to-speech) by name — on the agent's `config`, or overridden per [session](/concepts/sessions). Cloud, local, and self-hosted providers are interchangeable.

## Capabilities

| Capability | Providers                                                                                                   |
| ---------- | ----------------------------------------------------------------------------------------------------------- |
| **LLM**    | `livekit`, `openai`, `groq`, `gemini`, `sarvam`, `ollama` (local)                                           |
| **STT**    | `livekit`, `sarvam`, `whisper` (local)                                                                      |
| **TTS**    | `livekit`, `sarvam`, `murf`, `elevenlabs`, `edge`, `piper` (local), `kokoro` (local), `qwen3` (self-hosted) |

Set them in `config`:

```json theme={null}
{
  "config": {
    "llm_provider": "gemini",
    "llm_model": "gemini-3.5-flash",
    "stt_provider": "sarvam",
    "tts_provider": "sarvam",
    "sarvam_tts_model": "bulbul:v3",
    "speaker": "shubh"
  }
}
```

## Realtime (audio-to-audio) models

Some Gemini models (Live / native-audio) do integrated voice input and output — there is **no separate STT or TTS stage**. When a realtime model is selected, STT/TTS settings are ignored, and Lehar skips estimated STT/TTS [billing](/concepts/billing) for that session.

## Voices

* **Sarvam** — pick a Bulbul model version with `sarvam_tts_model` (`bulbul:v3`, the default, or `bulbul:v2`), then a `speaker`. **Speakers are specific to the model version and the two sets are disjoint** — a v2 speaker on v3 is rejected at save time. Speaking `pace` is configurable (0.3–3.0), and `tts_language` (the spoken output language) is separate from the STT input language.
* **Murf** — `voice` is a Murf `{locale}-{name}` id (e.g. `en-IN-anisha`), with an optional `murf_tts_style` (`Conversational`, `Promo`, `Narration`) and signed `murf_tts_speed` / `murf_tts_pitch` in −50…50. Real-time streaming only; there is no model selector.
* **ElevenLabs** — `voice` is an ElevenLabs voice id and `elevenlabs_tts_model` selects the model: `eleven_flash_v2_5` (default, lowest latency), `eleven_turbo_v2_5`, `eleven_multilingual_v2`, or `eleven_v3`. Flash and Turbo bill at half the per-character rate of the other two. Optional `elevenlabs_tts_language` plus voice settings `elevenlabs_tts_stability`, `elevenlabs_tts_similarity_boost` and `elevenlabs_tts_style` in 0…1, `elevenlabs_tts_speed` in 0.8…1.2, and `elevenlabs_tts_use_speaker_boost`. Leave a setting unset to use the voice's own.
* **Edge** — voices use Edge TTS voice names (e.g. `en-IN-NeerjaNeural`).
* **Kokoro** (local) — English and Hindi voices; the pipeline language is derived from the voice name, so use only the voices the catalog lists.
* **Qwen3** (self-hosted) — a model size (`0.6b` fast / `1.7b` quality) plus a voice, selected with the `voice` field. Lehar hosts its own fine-tuned voices `manish` and `shail` (Hinglish), plus reference-clip clones `ojas`, `shruti`, `happy` and `sad`. The language selector has no Hindi entry — use a Hinglish voice instead.
* **LiveKit** — voices use LiveKit TTS voice IDs.

## Pronunciation

Attach a [pronunciation dictionary](/concepts/pronunciation-dictionaries) to an agent (via `pronunciation_dictionary_id`) to control how it says specific words — brand names, places, acronyms. The rules are applied as a text substitution **just before speech**, so they behave identically across every TTS provider. `GET /catalog/models` advertises this with `pronunciation_dictionary_supported`, and names the providers that additionally accept IPA entries in `pronunciation_dictionary_ipa_providers`.

## Sarvam LLM reasoning

Sarvam LLMs reason by default, which costs voice latency and bills reasoning tokens as completion tokens. Set `sarvam_llm_reasoning_effort` to `low` (recommended for voice), `medium`, `high`, or `off` to disable chain-of-thought entirely. Leave it unset to inherit the deployment's default.

## Discover what's available

`GET /catalog/models` (scope `sessions:read`) returns the live catalog that powers the dashboard's agent editor: LLM/STT/TTS providers, their models and defaults, Gemini voices, Edge voices, and Sarvam speakers. Read it at runtime rather than hard-coding lists.

```bash theme={null}
curl "$LEHAR_BASE_URL/catalog/models" -H "X-API-KEY: $LEHAR_API_KEY"
```

<Note>
  Provider selection is one direction only: it flows to the agent worker as session metadata at dispatch time. If your deployment restricts which providers are configured, unavailable ones simply won't appear in the catalog.
</Note>

<CardGroup cols={2}>
  <Card title="Agents" icon="robot" href="/concepts/agents">Set defaults on the agent.</Card>
  <Card title="Sessions" icon="phone" href="/concepts/sessions">Override per call.</Card>
</CardGroup>
