Description
The docker documentation/examples reference EMBEDDING_MODEL as the env var to override the embedding model, but the application never reads it. The actual env var the code checks is OLLAMA_MODEL.
Root Cause
In lib/elixir_nexus/embedding_model.ex, model resolution is:
def model_name do
System.get_env("OLLAMA_MODEL") || Application.get_env(:elixir_nexus, :ollama_model, @default_model)
end
Passing -e EMBEDDING_MODEL=nomic-embed-text in docker run is silently ignored, causing the app to always fall back to the hardcoded default embeddinggemma:300m.
Steps to Reproduce
docker run -d --name code_nexus -p 4100:4100 -p 3002:3002 \
-e QDRANT_URL=http://host.docker.internal:6333 \
-e MCP_HTTP_PORT=3002 \
-e OLLAMA_URL=http://host.docker.internal:11434 \
-e EMBEDDING_MODEL=nomic-embed-text \
-e WORKSPACE_HOST="$HOME/Developer/Application/CodeEditorLand/Land" \
-v "$HOME/Developer/Application/CodeEditorLand/Land:/workspace:ro" \
iksnerd/code-nexus:latest
Despite passing EMBEDDING_MODEL=nomic-embed-text, the app uses embeddinggemma:300m.
Fix
Either:
- Rename the env var check in
embedding_model.ex from OLLAMA_MODEL to EMBEDDING_MODEL for clarity, or
- Update all documentation and examples to use
OLLAMA_MODEL=nomic-embed-text consistently
The correct working command is:
docker run -d --name code_nexus -p 4100:4100 -p 3002:3002 \
-e QDRANT_URL=http://host.docker.internal:6333 \
-e MCP_HTTP_PORT=3002 \
-e OLLAMA_URL=http://host.docker.internal:11434 \
-e OLLAMA_MODEL=nomic-embed-text \
-e WORKSPACE_HOST="$HOME/Developer/Application/CodeEditorLand/Land" \
-v "$HOME/Developer/Application/CodeEditorLand/Land:/workspace:ro" \
iksnerd/code-nexus:latest
Description
The docker documentation/examples reference
EMBEDDING_MODELas the env var to override the embedding model, but the application never reads it. The actual env var the code checks isOLLAMA_MODEL.Root Cause
In
lib/elixir_nexus/embedding_model.ex, model resolution is:Passing
-e EMBEDDING_MODEL=nomic-embed-textindocker runis silently ignored, causing the app to always fall back to the hardcoded defaultembeddinggemma:300m.Steps to Reproduce
Despite passing
EMBEDDING_MODEL=nomic-embed-text, the app usesembeddinggemma:300m.Fix
Either:
embedding_model.exfromOLLAMA_MODELtoEMBEDDING_MODELfor clarity, orOLLAMA_MODEL=nomic-embed-textconsistentlyThe correct working command is: