Skip to content

[AI Bundle] Qdrant store: Invalid constructor argument with missing optional parameters #841

@jvancoillie

Description

@jvancoillie

When configuring a Qdrant store under ai.store.qdrant, optional parameters (dimensions, distance, async) are conditionally added to the service arguments.

If some options like dimensions and distance are not defined but async is present (or defaults to false), the container generates a sparse argument array, for example:

[0 => ..., 1 => ..., 2 => ..., 3 => ..., 6 => false]

This results in a container compilation error:

"Invalid constructor argument X: argument Y must be defined before."

Expected behavior: the service should compile without errors even when optional parameters are omitted.

Steps to reproduce:

  1. Configure a Qdrant store with endpoint, api_key, and collection_name, but leave out dimensions and distance.
  2. Run bin/console cache:clear.

Minimal reproducer: configure any Qdrant store with only required options as above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI BundleIssues & PRs about the AI integration bundleBugSomething isn't workingStatus: Needs Review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions