Skip to content

[BUG] File index dimension setting not consistently applied (1536 vs 1024) #8102

@hannesrudolph

Description

@hannesrudolph

Type

Bug

Problem / Value

When a user sets an embedding dimension (for example, 1536), the system still produces vectors of a different size (for example, 1024) while the vector database creates a collection with the configured size. This mismatch causes a vector dimension error and blocks indexing and search.

Context

This affects anyone configuring a non-default embedding dimension or switching models with different default dimensions. The problem shows up during index creation and embedding, resulting in a dimension mismatch error reported by the vector database.

Reproduction

  1. Steps: Set the "Embedding Dimension" to 1536 in Code Index settings and start indexing
  2. Expected result: Both the collection and embeddings use the same dimension (no errors)
  3. Actual result: Collection is created at 1536 but embeddings are generated at 1024, resulting in a dimension mismatch error
  4. Variations tried: Setting dimension to 1024 works as expected

Constraints/Preferences

  • Respect the user-configured dimension as the single source of truth across the entire indexing flow
  • If the dimension or model changes, safely handle index reinitialization (or prompt to clear/recreate) before embedding
  • Avoid silent fallbacks; provide clear, actionable guidance if a change is required
  • Keep error messages user-friendly and specific to the mismatch

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - Unassigned / ActionableClear and approved. Available for contributors to pick up.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Issue [Unassigned]

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions