Skip to content

EMBEDDING_MODEL env var is silently ignored — should be OLLAMA_MODEL #13

@NikolaRHristov

Description

@NikolaRHristov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions