Commit Graph

1 Commits

Author SHA1 Message Date
Rob Colbert
a7a6a91a13 fix: pass requested vector dimension to embedding API (Ollama + OpenAI)
The qwen3-embedding:4b model defaults to 2560-d vectors. Both
Ollama (client.embed()) and OpenAI support a dimensions parameter
to request a specific output size. This change threads the configured
qdrant.vectorSize through the AI provider layer so the model returns
vectors matching the Qdrant collection dimensions.

- AiApi.embeddings() now accepts optional dimensions parameter
- Ollama provider: switched from client.embeddings() to client.embed()
- OpenAI provider: passes dimensions to embeddings.create()
- VectorStoreService.getEmbedding() passes env.qdrant.vectorSize
- Added unit tests for dimension mismatch detection, collection
  creation, and search guards
2026-05-19 16:21:04 -04:00