Skip to content

fix(qdrant): send raw api key without Bearer prefix#1707

Open
ankit25bcs10610 wants to merge 1 commit into
Portkey-AI:mainfrom
ankit25bcs10610:fix/qdrant-api-key-header
Open

fix(qdrant): send raw api key without Bearer prefix#1707
ankit25bcs10610 wants to merge 1 commit into
Portkey-AI:mainfrom
ankit25bcs10610:fix/qdrant-api-key-header

Conversation

@ankit25bcs10610

Copy link
Copy Markdown

What

The Qdrant provider builds its auth header as:

return { 'api-key': `Bearer ${providerOptions.apiKey}` };

Qdrant authenticates via the api-key header, which must contain the raw key — it does not use the Bearer scheme. With the Bearer prefix, Qdrant receives api-key: Bearer <key> and rejects every request with 401/403.

For reference, the sibling milvus provider correctly uses Authorization: Bearer <key> — the two schemes got crossed here.

Fix

Send the raw key in the api-key header, and add a unit test asserting the header shape.

$ npx jest src/providers/qdrant/api.test.ts
PASS  ✓ sends the raw api key without a Bearer prefix

npm run format:check passes.

Qdrant authenticates via the `api-key` header, which must contain the
raw key. The header was built as `api-key: Bearer <key>`, so Qdrant
rejected every request with 401/403. (The sibling `milvus` provider
correctly uses `Authorization: Bearer <key>`.)

Send the raw key in `api-key` and add a unit test for the header.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant