Providers¶
CodeNavi has two model slots, and they are not symmetric.
- Embedding: the model that turns your code into vectors at index time and your queries into vectors at search time. This is Buric-E0.6B, CodeNavi's own code-specialized embedder, baked into the image and run on your hardware. It is
localby default. You can switch to another listed model with one setting, but not to a generic embedding model or an embedding API, see the model page. - LLM (chat): the generative model behind the web UI's Chat screen and
POST /chat. Search and every MCP tool work without it. It is pluggable: on-box (Ollama, LM Studio, vLLM, AnythingLLM) or cloud (Claude, OpenAI-compatible, Gemini, OpenRouter).
The line that matters: search never sends code anywhere. Only chat with a cloud LLM provider sends retrieved chunks off the box, and the UI says so next to the provider picker.
LLM providers¶
| Variable | Default | Description |
|---|---|---|
LLM_PROVIDER |
ollama |
LLM provider, on-box: ollama, lmstudio, vllm, anythingllm; cloud: claude, openai, gemini, openrouter. Each provider also reads its own model/URL/key vars (e.g. CLAUDE_MODEL, GEMINI_API_KEY, VLLM_URL): see .env.example for the full list. |
LLM_MODEL |
llama3.1 |
Model name (provider-specific, e.g. claude-sonnet-4-6, gpt-4o) |
OLLAMA_URL |
http://host.docker.internal:11434 |
Ollama base URL (for LLM_PROVIDER=ollama) |
ANTHROPIC_API_KEY |
(empty) | API key for LLM_PROVIDER=claude |
OPENAI_API_KEY |
(empty) | API key for LLM_PROVIDER=openai or openrouter |
OPENAI_BASE_URL |
(empty) | OpenAI-compatible endpoint for the openai provider, set https://api.deepseek.com (DeepSeek), a Groq/Mistral/Together URL, etc.; OPENAI_API_KEY then holds that provider's key. Empty = api.openai.com. Also editable on the web UI Settings screen1, where the host must be in CODENAVI_OUTBOUND_HOSTS (since 1.3.76). |
VLLM_URL, VLLM_MODEL, VLLM_API_KEY |
http://localhost:8000/v1, (empty), (empty) |
For LLM_PROVIDER=vllm. Set the key only if vLLM runs with --api-key. |
ANYTHINGLLM_URL, ANYTHINGLLM_MODEL, ANYTHINGLLM_API_KEY |
http://localhost:3001/api/v1/openai, (empty), (empty) |
For LLM_PROVIDER=anythingllm. The key is required. |
LMSTUDIO_URL |
http://localhost:1234 |
For LLM_PROVIDER=lmstudio; the model is LLM_MODEL. |
The other provider keys (CLAUDE_MODEL, GEMINI_API_KEY, OPENROUTER_MODEL, …) are listed in the .env.example shipped in your package. The chat temperature is a settings key.
The server runs in a container. On a GPU install it shares the host's network, so localhost is your machine. On Windows, macOS and installs without a GPU, localhost is the container itself: write http://host.docker.internal:8000/v1 instead.
"On-box" is the provider's name, not its address. CodeNavi trusts ollama, lmstudio, vllm and anythingllm to be local. If you point one of their URLs at another machine, chat sends code there, and so does the scanner's optional LLM check, which sees flagged text before redaction. Use only a machine you control.
Installs made with 1.3.75 or older: an update replaces the image, not your compose file, and that file does not pass the vLLM, AnythingLLM and LM Studio variables on. Put the URL and the model in data/settings.json (which one is live). API keys are read from the environment only, so for a server that needs a key use the openai provider: OPENAI_BASE_URL, OPENAI_API_KEY and OPENAI_MODEL are passed on every version.
Chat requires a working LLM. The simplest options:
Local (Ollama):
# Install Ollama from https://ollama.com, then:
ollama pull llama3.1
# In .env:
LLM_PROVIDER=ollama
LLM_MODEL=llama3.1
Cloud (Claude):
# In .env:
LLM_PROVIDER=claude
LLM_MODEL=claude-sonnet-4-6
ANTHROPIC_API_KEY=your-key-here
After changing the provider or key, recreate the container. LLM settings, and the API key especially, which is environment-only (never read from
settings.jsonor the web UI), are read once at startup:Editingdocker compose up -d --force-recreate.envor switching provider in the chat UI alone won't reload the key; a stale/empty key surfaces as/chat → 500: Could not resolve authentication method.
GPUs with 12 GB or less: don't run the chat LLM on the same card¶
CodeNavi's search models stay loaded on the GPU, and on an 11 GB card they use about 8 GB. A local chat model on the same card then gets only the rest, so Ollama runs most of it on the CPU. On an RTX 2080 Ti (11 GB), llama3.1 8B made 2 to 7 tokens per second, and some answers took over two minutes. A smaller model does not fix this: llama3.2 3B was 2 to 3 times faster, but it still did not fit on the GPU, and its answers were worse.
On such a card, do one of these:
- Use your coding agent, not the Chat screen. Claude Code, Codex, Cursor and the other agents are the LLM. They call CodeNavi's MCP tools, and the tools need no chat LLM. Most users lose nothing.
- Run Ollama on another GPU or another machine. Set
OLLAMA_URLto it. Your code stays on your network. - Use a cloud provider (Claude, OpenAI-compatible, Gemini). Chat is fast, but each question and the code CodeNavi retrieves for it go to that provider.
With option 2 or 3, stop any Ollama on the CodeNavi card (sudo systemctl stop ollama) or set
OLLAMA_KEEP_ALIVE=0 on it. Otherwise it competes with search for the card's memory and can cause
CUDA out of memory errors. See CODENAVI_VRAM_BUDGET_GIB in
Configuration.
The Docs Wiki compile is the exception: it unloads the search model while it runs, so a local model gets the whole card (see Web UI).
The llm section of /health shows the current status:
- "status": "ok": LLM reachable and responding
- "status": "unreachable": provider not reachable (search still works)
- "status": "error": provider reachable but returned an error
Picking the model from the web UI¶
The Chat screen's rail has a provider dropdown and a provider-aware model box. Self-hosted backends (ollama, lmstudio, AnythingLLM, vLLM) and Gemini list their models live from the backend; claude / openai / openrouter show a curated, editable list, and the field is always free text so a newer model can be typed. The choice is saved to that provider's own model key (LLM_MODEL for ollama/lmstudio, CLAUDE_MODEL / OPENAI_MODEL / GEMINI_MODEL / … otherwise). API keys are not editable in the UI, they live in .env; of the base URLs, only OPENAI_BASE_URL is, and only to a host on your outbound list. Details in the web UI guide.
OpenAI-compatible endpoints¶
The openai provider is OpenAI-compatible: set OPENAI_BASE_URL to DeepSeek, Groq, Mistral, Together or any compatible API and put that provider's key in OPENAI_API_KEY. Set it in .env; set on the Settings screen or in data/settings.json, its host must be in CODENAVI_OUTBOUND_HOSTS, because the server sends the key there. The chat rail discloses the custom endpoint so it is visible that chat is not talking to api.openai.com.1
Embedding providers¶
| Variable | Default | Description |
|---|---|---|
CONTENT_EMBEDDING_PROVIDER |
local |
Provider for doc/web embeddings: local, ollama, openai |
Code is embedded locally, by the Buric embedder: the server refuses a remote API for code, on save and before any reindex, and a packaged install has no setting that lifts this. local is the only option with the published search quality, and changing the provider invalidates every vector it made. Generic embedder APIs measured ~30 quality points behind the Buric-E4B model on code retrieval; if your host has no GPU, use a cloud reindex or a vendor-assisted remote embedder (contact support) instead of a generic API.