Skip to content

bug(memory): Qdrant collection recreation incomplete for main conversation store #1951

@bug-ops

Description

@bug-ops

Summary

PR #1815 fixed dimension mismatch by recreating Qdrant collections when embedding model changes. However, the fix is incomplete:

Collections recreated:

  • zeph_skills
  • zeph_mcp_tools

Collections NOT recreated:

  • zeph_conversations (main conversation store) ✗
  • zeph_sessions (session summaries) ✗
  • zeph_graph_entities (graph memory) ✗

Impact

When embedding model changes (e.g., qwen3-embedding 4096-dim → text-embedding-3-small 1536-dim):

  • Main conversation semantic search fails
  • Session summary storage fails
  • Graph entity embeddings fail
  • Fallback to SQLite mitigates but degrades performance

Test Case

Run with:

  1. Previous session using qwen3-embedding (creates 4096-dim collections)
  2. New session using text-embedding-3-small (tries to use 1536-dim vectors with 4096-dim collection)
  3. Result: Vector dimension mismatch errors on all Qdrant operations

Error:

Related

Expected Behavior

All Qdrant collections should be recreated when:

  1. Embedding model changes
  2. Dimension mismatch detected on any collection
  3. Session startup with mismatched embedding dims

Actual Behavior

Only skill/MCP tool collections recreated. Main conversation collections persist with old dimensions.

Solution

Extend collection recreation logic to cover:

  • zeph_conversations
  • zeph_sessions
  • zeph_graph_entities
  • Any other user-data collections

Or: Implement automatic migration when dimension mismatch detected on access.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmemoryzeph-memory crate (SQLite)qdrantQdrant vector database integration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions