diff --git a/libs/agent/embed/qdrant.rs b/libs/agent/embed/qdrant.rs index 0c254ca..76d516c 100644 --- a/libs/agent/embed/qdrant.rs +++ b/libs/agent/embed/qdrant.rs @@ -89,6 +89,16 @@ impl QdrantClient { return Ok(()); } + // Reject empty vectors — they cause Qdrant to reject the entire batch + let empty_vectors = points.iter().filter(|p| p.vector.is_empty()).count(); + if empty_vectors > 0 { + tracing::error!(empty_count = empty_vectors, total = points.len(), "upsert_points: REJECTING points with empty vectors"); + return Err(crate::AgentError::Qdrant(format!( + "refusing to upsert {} points with empty vectors", + empty_vectors + ))); + } + let collection_name = Self::collection_name(&points[0].payload.entity_type); self.upsert_to_collection(&collection_name, points).await }