fix: expose embedding backend env vars in docker-compose and setup.sh#30
Merged
Merged
Conversation
… docker-compose and setup.sh The worker container could not be configured to use an alternative embedding backend (Ollama, vLLM, etc.) because docker-compose.yml did not pass through EMBEDDING_API_BASE, EMBEDDING_MODEL, or EMBEDDING_API_KEY. The worker code (embedding.py) already reads these env vars — only the compose file was missing the plumbing. Changes: - docker-compose.yml: add 3 env vars to worker.environment with defaults preserving current OpenRouter/Qwen3 behavior - setup.sh: add_env for all 3 vars (consistency with EMBEDDING_DIMS) Closes #29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The worker container (
cognitive-worker) readsEMBEDDING_API_BASE,EMBEDDING_MODEL, andEMBEDDING_API_KEYfrom environment variables (seeembedding.py), butdocker-compose.ymlnever passed these through — onlyEMBEDDING_DIMSwas exposed. Users wanting to use Ollama, vLLM, or any non-OpenRouter embedding backend in the Docker stack had no way to configure it.Changes
docker/docker-compose.ymlworker.environmentwith backward-compatible defaultssetup.shadd_envcalls for consistency with the existingEMBEDDING_DIMSentryDefault values
All defaults match the existing defaults in
embedding.py, so current OpenRouter/Qwen3 users are unaffected:EMBEDDING_API_BASE→https://openrouter.ai/api/v1EMBEDDING_MODEL→qwen/qwen3-embedding-8bEMBEDDING_API_KEY→""(optional, only needed for authenticated non-OpenRouter endpoints)Verification
Usage after this fix
Closes #29