Skip to content

When qdrant opens apikey, wren ai reports an error #2106

@Hwting

Description

@Hwting

Describe the bug
1.When qdrant opens apikey, wren ai reports an error
ValueError: Cannot serialize token-based secret. Use an alternative secret type like environment variables.

To Reproduce
Steps to reproduce the behavior:

  1. QDrant enables apikey
  2. Configure environment variables
    QDRANT_API_KEY=o/xxxxxxx/mlPeB
    3.modeling->Deploy

Expected behavior
1.Support QDrant to enable APIKEY

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. k8s]
  • Browser [chrome, safari]

Wren AI Information

  • Version: [e.g, 0.29.1]

Additional context

Relevant log output

  • Please share config.yaml with us, it should be located at ~/.wrenai/config.yaml.
QDRANT_API_KEY=o/xxxxxxx/mlPeB
  • Please share your logs with us with the following command:
5362+08:00   File "/src/pipelines/indexing/__init__.py", line 46, in run
2026-01-14T13:54:14.056166598+08:00     await asyncio.gather(
2026-01-14T13:54:14.056168083+08:00   File "/src/pipelines/indexing/__init__.py", line 31, in _clear_documents
2026-01-14T13:54:14.056169898+08:00     store.to_dict().get("init_parameters", {}).get("index", "unknown")
2026-01-14T13:54:14.056171101+08:00     ^^^^^^^^^^^^^^^
2026-01-14T13:54:14.056172867+08:00   File "/app/.venv/lib/python3.12/site-packages/haystack_integrations/document_stores/qdrant/document_store.py", line 427, in to_dict
2026-01-14T13:54:14.056174221+08:00     init_params["api_key"] = self.api_key.to_dict() if self.api_key else None
2026-01-14T13:54:14.056175810+08:00                              ^^^^^^^^^^^^^^^^^^^^^^
2026-01-14T13:54:14.056177151+08:00   File "/app/.venv/lib/python3.12/site-packages/haystack/utils/auth.py", line 84, in to_dict
2026-01-14T13:54:14.056178473+08:00     inner = self._to_dict()
2026-01-14T13:54:14.056179697+08:00             ^^^^^^^^^^^^^^^
2026-01-14T13:54:14.056181447+08:00   File "/app/.venv/lib/python3.12/site-packages/haystack/utils/auth.py", line 150, in _to_dict
2026-01-14T13:54:14.056183487+08:00     raise ValueError(
2026-01-14T13:54:14.056186040+08:00 ValueError: Cannot serialize token-based secret. Use an alternative secret type like environment variables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions