Split the corrupted line 15 into two valid assignments:
- QDRANT_API_KEY = os.environ.get('QDRANT_API_KEY', '')
- EMBEDDING_DIMS = int(os.environ.get('EMBEDDING_DIMS', '4096'))
The merged line 'QDRANT_API_KEY=os.env...DIMS = ...' was a leftover
placeholder that prevented the ARQ worker from starting.
Reported-by: CG1up
- Silent removal (empty string) left grammatically broken sentences
and no audit trail. [REDACTED] preserves context structure.
- Control chars and zero-width Unicode keep empty string replacement
(invisible characters, removal is correct).
- Updated 4 test assertions in _test_sanitize.py.
fix(context_enhancer): refactor embed_query_sparse to use stdin instead of f-string interpolation
- Eliminates shlex.quote() crash with apostrophes (SyntaxError in subprocess)
- Eliminates user text interpolation into Python code string
- Hardcodes BM25 model name (was already hardcoded module-level)
- Corrects FastEmbed API usage: model.embed([query]) instead of model.embed(string)
Fix 4 bugs that prevent the ARQ worker from booting with a
Qdrant instance that has an API key set:
1. reflection.py: add missing 'import os' (NameError crash at
COLLECTION_NAME = os.environ.get(...))
2. local_qdrant.py: read QDRANT_API_KEY from environment
3. local_qdrant.py: pass api_key= to AsyncQdrantClient and set
https=False to prevent SSL error when API key triggers
auto-HTTPS against a local HTTP Qdrant instance
4. docker-compose.yml: pass QDRANT_API_KEY env var to the
worker service so the key is available inside the container
- Remove unconditional OPENROUTER_API_KEY check that blocked local providers
(Ollama, vLLM, llama.cpp) from running without an API key
- Send OpenRouter-specific headers (HTTP-Referer, X-Title) only when
EMBEDDING_API_BASE contains 'openrouter'
- Stop sending empty Authorization header to non-OpenRouter endpoints
- Update .env.example and setup/install.md to clarify that
OPENROUTER_API_KEY is only required for OpenRouter
Closes#1
Co-authored-by: ClaudioDrews <claudio@drews.com.br>
Context injection delivers memory into the prompt, but without an explicit
Ground Truth hierarchy the agent treats it as optional suggestion. This
layer documents the fix: injected memory ([qdrant], [fabric], [sessions],
[facts]) ranked as authoritative for documented knowledge, with clear
conflict-resolution rules against terminal output and training knowledge.