Dev AI config: env var overrides in config_reader, LM Studio via .env
config_reader.py now merges environment variables (AI_PROVIDER, LMSTUDIO_BASE_URL, LMSTUDIO_API_KEY, LMSTUDIO_MODEL, OLLAMA_*, ANTHROPIC_*) on top of the JSON config file, so the dev .env file can pin the AI connection without writing to the shared config volume. docker-compose.dev.yml loads features/doc-service/.env (gitignored) into the doc-service container so the token is never committed. .env.example updated with all supported override variables and comments. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,21 @@
|
||||
DATABASE_URL=postgresql+asyncpg://postgres:password@db:5432/destroying_sap
|
||||
DATA_DIR=/data/documents
|
||||
CONFIG_PATH=/config/doc_service_config.json
|
||||
|
||||
# Optional AI provider overrides — if set, these take precedence over
|
||||
# whatever is stored in doc_service_config.json.
|
||||
# Useful for pinning a dev environment to a specific local AI instance
|
||||
# without touching the shared config volume.
|
||||
#
|
||||
# AI_PROVIDER=lmstudio
|
||||
# LMSTUDIO_BASE_URL=http://host.docker.internal:1234/v1
|
||||
# LMSTUDIO_API_KEY=your-lm-studio-token
|
||||
# LMSTUDIO_MODEL=local-model
|
||||
#
|
||||
# AI_PROVIDER=ollama
|
||||
# OLLAMA_BASE_URL=http://host.docker.internal:11434/v1
|
||||
# OLLAMA_MODEL=llama3.2
|
||||
#
|
||||
# AI_PROVIDER=anthropic
|
||||
# ANTHROPIC_API_KEY=sk-ant-...
|
||||
# ANTHROPIC_MODEL=claude-haiku-4-5-20251001
|
||||
|
||||
Reference in New Issue
Block a user