This document explains how to configure AI models in Eclaire.
Eclaire uses AI models for two distinct purposes:
| Context | Purpose | Requirements |
|---|---|---|
| Backend | Powers the chat assistant, handles conversations and tool calling | Good tool/function calling support |
| Workers | Processes documents, images, and other content | Vision capability for image/document analysis |
You can use the same model for both, or different models optimized for each task. The default setup uses separate models: a text model for the assistant and a vision model for workers.
You have two options for running local models with llama.cpp:
Use one model for both backend and workers. This is the simplest setup -just run one llama-server instance:
llama-server -hf unsloth/Qwen3-VL-8B-Instruct-GGUF:Q4_K_XL --ctx-size 16384 --port 11500Configure both contexts to use the same model via the admin UI or eclaire model activate.
Use different models optimized for each purpose:
- Backend (port 11500): A smarter/larger model for the AI assistant -better reasoning and tool calling
- Workers (port 11501): A smaller/faster model with vision for background processing -efficient document and image analysis
This setup requires two separate llama-server instances:
# Terminal 1: Backend model (AI assistant)
llama-server -hf unsloth/Qwen3-14B-GGUF:Q4_K_XL --ctx-size 16384 --port 11500
# Terminal 2: Workers model (vision processing)
llama-server -hf unsloth/gemma-3-4b-it-qat-GGUF:Q4_K_XL --ctx-size 16384 --port 11501The default configuration uses the llama-cpp provider (port 11500) and llama-cpp-2 provider (port 11501).
Note: llama-server has a router mode that can serve multiple models from one instance, but it's not yet production-ready. We recommend running separate instances for reliability.
Context size: The
--ctx-size 16384flag limits context to 16K tokens to reduce GPU memory usage. Adjust based on your hardware -higher values allow longer conversations but require more memory.
Choose your setup based on your hardware and available memory.
The recommended way to manage models is through the Eclaire CLI. In Docker deployments, prefix commands with docker compose run --rm eclaire.
# Show all configured models and which are active
eclaire model list
# Filter by context
eclaire model list --context backendImport models directly from HuggingFace or OpenRouter. This fetches model metadata and adds it to your local model registry.
Note: For HuggingFace models, import only adds the model configuration. You'll still need to download the model file when you first use it (llama-server downloads automatically on startup).
# Import from HuggingFace (GGUF format for llama.cpp)
eclaire model import https://huggingface.co/unsloth/Qwen3-14B-GGUF
# Import from OpenRouter
eclaire model import https://openrouter.ai/qwen/qwen3-vl-30b-a3b-instructActivate a model that has already been configured (either imported or manually added):
# Set the backend (assistant) model
eclaire model activate --backend llama-cpp:qwen3-14b-q4
# Set the workers model
eclaire model activate --workers llama-cpp:gemma-3-4b-q4
# Interactive selection
eclaire model activate# List configured providers
eclaire provider list
# Add a new provider (interactive)
eclaire provider add
# Add using a preset
eclaire provider add --preset openrouter
# Test provider connectivity
eclaire provider test llama-cpp# Check configuration for errors
eclaire config validateAI configuration (providers, models, and active selection) is stored in the database and managed through the admin UI or the CLI.
Providers define LLM backends (inference servers) Eclaire can connect to. Each provider has:
dialect: API format (openai_compatible,anthropic_messages, ormlx_native)baseUrl: The API endpoint URL (supports${ENV:VAR_NAME}interpolation)auth: Authentication config (none,bearer, or custom headers)
Manage providers via the admin UI Settings page or eclaire provider CLI commands.
Models define individual LLM configurations with their capabilities. Key fields:
provider: Which provider serves this modelproviderModel: The model identifier used by the providercapabilities.modalities.input: Include"image"for vision modelscapabilities.tools: Set totruefor models that support function calling
Import models via eclaire model import <url> or the admin UI model catalog.
The active selection maps contexts (backend, workers) to specific models. Set via eclaire model activate or the admin UI.
| Provider | Type | Dialect | Notes |
|---|---|---|---|
| llama.cpp | Local | openai_compatible |
Recommended for local inference |
| Ollama | Local | openai_compatible |
Easy model management |
| LM Studio | Local | openai_compatible |
GUI-based model loading |
| vLLM | Local | openai_compatible |
High-performance inference |
| OpenRouter | Cloud | openai_compatible |
Access to many models via one API |
| OpenAI | Cloud | openai_compatible |
GPT models |
| Anthropic | Cloud | anthropic_messages |
Claude models |
Mac users with Apple Silicon (M1/M2/M3/M4/M5) can take advantage of MLX, Apple's machine learning framework optimized for the unified memory architecture.
-
LLM Engine with MLX Support:
-
MLX-Optimized Models:
- Download models from MLX Community on Hugging Face
- Look for models with "MLX" in the name or repository
Add your MLX-compatible server as a provider via the admin UI or CLI:
eclaire provider add lm-studio --dialect openai_compatible --base-url http://127.0.0.1:1234/v1 --auth-type noneThen import and activate models with the CLI.
The recommended way is to import directly:
eclaire model import https://huggingface.co/unsloth/Qwen3-VL-30B-A3B-Instruct-GGUF
eclaire model activate --backend llama-cpp:qwen3-vl-30b-a3b-instruct-gguf-q4-k-xlYou can also add models via the admin UI model catalog.
-
Find the model on OpenRouter (e.g., qwen/qwen3-vl-30b-a3b-instruct)
-
Ensure the
openrouterprovider is configured with your API key (via admin UI or CLI) -
Import and activate:
eclaire model import https://openrouter.ai/models/qwen/qwen3-vl-30b-a3b-instruct- Activate it:
eclaire model activate --backend openrouter:qwen-qwen3-vl-30b-a3b-instruct