Repository navigation
Description
Observed Behavior
QdrantStore and QdrantCollection reject URL, API-key, and .env options when async_client is injected. They also allow managed_client=True to make the framework close a caller-supplied client.
Affected file: python/packages/qdrant/agent_framework_qdrant/_vector_store.py.
Expected Behavior
An injected AsyncQdrantClient should take precedence over all client-construction settings. Those settings should not be read or validated, and the injected client should always remain caller-owned. Collection schema and operation options continue to apply normally.
Steps to Reproduce
- Create a caller-owned
AsyncQdrantClient. - Pass it to
QdrantStorewithurl,api_key, or.envoptions and observe the conflict error. - Pass
managed_client=True, close the store, and observe cleanup of the injected client.
Minimal Reproduction
from unittest.mock import AsyncMock
from qdrant_client import AsyncQdrantClient
from agent_framework_qdrant import QdrantStore
client = AsyncMock(spec=AsyncQdrantClient)
QdrantStore(async_client=client, url="https://ignored.example")Error Messages and Stack Traces
ValueError: Pass async_client or connection settings, not both.
Package Versions
agent-framework-qdrant: 1.0.0a261030; main at 93c346f
Python Version
Python 3.13.1
Operating System
macOS
Regression
Unknown
Additional Context
Compatibility impact: alpha behavior would stop raising for redundant settings, and injected-client ownership transfer through managed_client=True would be removed or deprecated.
Focused acceptance tests:
- Injected clients bypass URL, API-key, and
.envsettings. - Invalid ambient Qdrant settings cannot block construction.
- No client factory is called.
- Store/collection cleanup never closes an injected client.
- No-client explicit > environment > SDK-default behavior remains unchanged.
AI assistance: I used an AI coding assistant to audit and reproduce the behavior.
Acknowledgements
- I searched existing issues and did not find a duplicate.
- I personally verified this behavior and the reproduction details are authentic.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
ZedingZhang commentedon Nov 2, 2026
I'll take this one, making injected AsyncQdrantClient take precedence over connection settings and remain caller-owned (ignore url/api_key/.env conflict; never close injected client on store/collection cleanup).
Python: Prefer injected Qdrant clients over connection settings (micr…