Skip to main content
SAFIA supports four LLM providers out of the box. All use an OpenAI-compatible API interface, so switching between them is a matter of changing a few lines in your .env. You choose your provider during safia setup and can change it at any time with safia config.
Voice transcription always uses Groq (Whisper) — regardless of which provider handles your chat completions. If you want to enable voice messages, you need a GROQ_API_KEY in your .env even when using a different primary provider. The only exception is when LLM_PROVIDER=groq, in which case your LLM_API_KEY is reused for transcription automatically.

Provider comparison

ProviderBest forFree tierNotes
LunosDefault, multilingualCheck siteOpenAI-compatible gateway; default model is openai/gpt-oss-120b
GroqLow-latency inferenceYesExcellent free tier; also handles voice transcription
OpenAIOfficial GPT modelsNoDirect access to GPT-4o, GPT-4 Turbo, GPT-3.5
CustomAny compatible APIVariesOpenRouter, LM Studio, Ollama, or your own server

Configuration by provider

Lunos is the default provider and requires no extra URL configuration — SAFIA knows the endpoint automatically when you set LLM_PROVIDER=lunos.What is Lunos? Lunos is an AI gateway that provides access to a range of models via an OpenAI-compatible API. It’s the recommended starting point for SAFIA users..env configuration
LLM_PROVIDER=lunos
LLM_API_KEY=sk-your-lunos-api-key

# Optional: override the default model
LLM_MODEL=openai/gpt-oss-120b

# Always required for voice messages
GROQ_API_KEY=gsk_your-groq-api-key
The default model openai/gpt-oss-120b works well for SAFIA’s financial assistant tasks. You can change LLM_MODEL to any model ID available on your Lunos account.Vision (receipt scanning)Lunos also handles receipt photo scanning via the VISION_MODEL setting. The default vision model works out of the box:
VISION_MODEL=mistralai/mistral-small-3.2-24b-instruct

Voice transcription

Regardless of your LLM_PROVIDER choice, voice messages are transcribed using Whisper via Groq. This is a separate API call using a separate key.
Groq provides one of the fastest and cheapest Whisper implementations available. Keeping transcription on a single provider simplifies configuration and ensures consistent latency regardless of which LLM you use for chat.
To enable voice messages, add your Groq API key to .env:
GROQ_API_KEY=gsk_your-groq-api-key
If GROQ_API_KEY is absent and LLM_PROVIDER is not groq, voice messages are silently disabled — the bot will ignore audio messages.

Switching providers

You can switch providers at any time without reinstalling. Run safia config, select AI Provider & API Key, choose the new provider, enter the new key, and save. Then restart:
safia config
safia restart
Switching providers does not affect your stored data (transactions, debts, portfolios, knowledge base documents). Only the LLM used for new conversations changes.