CodeWiki icon indicating copy to clipboard operation
CodeWiki copied to clipboard

I got "Failed with error: name 'MAIN_MODEL' is not defined" error

Open park-onezero opened this issue 11 months ago • 1 comments

my litellm Image

my .env file

# Copy this file to .env and fill in your API keys

# =============================================================================
# LLM API Keys
# =============================================================================

MAIN_MODEL=gpt-oss
FALLBACK_MODEL_1=gpt-oss
CLUSTER_MODEL=gpt-oss
LLM_BASE_URL=https://litellm-my-domain/
LLM_API_KEY=sk-api-key

I executed "docker compose -f docker/docker-compose.yml up" and I got following result

Image

park-onezero avatar Dec 15 '25 22:12 park-onezero

I found the cause in background_worker.py (line 19). Please add an import for MAIN_MODEL by changing the import to: from codewiki.src.config import Config, MAIN_MODEL.

park-onezero avatar Dec 15 '25 22:12 park-onezero