Describe the Bug
When running supamem init (with or without --qdrant-url), the Greenfield bootstrap ignores the QDRANT_API_KEY and fallback QDRANT_URL environment variables.
Specifically, inside supamem/init.py, the Qdrant client is instantiated via:
client = _get_client(url)
which defaults to api_key="" (unauthorized). Consequently, if Qdrant requires authentication/API keys, supamem init fails with:
✗ failed to create collection: Unexpected Response: 401 (Unauthorized)
Raw response content:
b'Must provide an API key or an Authorization bearer token'
even if QDRANT_API_KEY is present in the environment.
Additionally, probe_qdrant fails to probe /healthz successfully if the endpoint requires authorization, since it doesn't include the api-key header in the probe request.
To Reproduce
- Set
QDRANT_API_KEY in the environment.
- Run
supamem init --yes --qdrant-url "https://authorized-qdrant-instance.com" --force.
- See 401 Unauthorized error during collection creation.
Expected Behavior
supamem init should:
- Fall back to
QDRANT_URL environment variable if --qdrant-url is omitted.
- Respect
QDRANT_API_KEY when probing Qdrant and instantiating the Qdrant client during initialization.
Describe the Bug
When running
supamem init(with or without--qdrant-url), the Greenfield bootstrap ignores theQDRANT_API_KEYand fallbackQDRANT_URLenvironment variables.Specifically, inside
supamem/init.py, the Qdrant client is instantiated via:which defaults to
api_key=""(unauthorized). Consequently, if Qdrant requires authentication/API keys,supamem initfails with:even if
QDRANT_API_KEYis present in the environment.Additionally,
probe_qdrantfails to probe/healthzsuccessfully if the endpoint requires authorization, since it doesn't include theapi-keyheader in the probe request.To Reproduce
QDRANT_API_KEYin the environment.supamem init --yes --qdrant-url "https://authorized-qdrant-instance.com" --force.Expected Behavior
supamem initshould:QDRANT_URLenvironment variable if--qdrant-urlis omitted.QDRANT_API_KEYwhen probing Qdrant and instantiating the Qdrant client during initialization.