fix: support QDRANT_API_KEY and QDRANT_URL in supamem init - #2
Open
raphaelbahat wants to merge 3 commits into
Open
fix: support QDRANT_API_KEY and QDRANT_URL in supamem init#2raphaelbahat wants to merge 3 commits into
raphaelbahat wants to merge 3 commits into
Conversation
Support QDRANT_API_KEY and QDRANT_URL environment variables in Greenfield bootstrap (supamem init). Without this, supamem init ignores QDRANT_API_KEY and tries to connect to Qdrant without authentication, resulting in 401 Unauthorized, even if QDRANT_API_KEY is present in the env. Co-Authored-By: Oz <oz-agent@warp.dev>
Ensure the QDRANT_API_KEY is supplied when probing Qdrant reachability inside supamem doctor. This prevents false unreachable reports if Qdrant requires authorization. Also updated test mock signatures in test_doctor.py. Co-Authored-By: Oz <oz-agent@warp.dev>
raphaelbahat
force-pushed
the
fix/init-env-qdrant-auth
branch
from
July 27, 2026 17:35
60938e7 to
e4aae45
Compare
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.
This PR resolves the issue where
supamem initfails to authenticate with Qdrant even whenQDRANT_API_KEYis set in the environment, causing a401 (Unauthorized)error.Changes:
src/supamem/init.py:probe_qdrantto support passing an optionalapi_keyand setting theapi-keyheader in the health-probe request.run_initto readQDRANT_API_KEYfrom the environment and pass it to bothprobe_qdrantand_get_clientwhen creating the Qdrant client.QDRANT_URLenvironment variable if--qdrant-urloption is omitted.tests/test_init.py:probe_qdrantto support the updated function signature.test_run_init_respects_qdrant_env_varsto assert that environment variables are correctly resolved and passed to Qdrant.Closes #1
Co-Authored-By: Oz oz-agent@warp.dev