# ADR-0010: Generic OpenAI-compatible embeddings with model/dimension guarding **Status:** Accepted (2026-08-08) ## Context The design doc specified embeddings generated locally via LM Studio on an RTX 3060. Hard-coding that makes the entire memory subsystem depend on one service and one GPU box being up. Separately, the choice of embedding model **pins the vector dimensionality** of a Qdrant collection — changing models silently corrupts a collection or forces a full reindex, and neither should happen by accident. ## Decision Target a **generic OpenAI-compatible embeddings endpoint**, configured by `EMBEDDING_URL`, `EMBEDDING_MODEL`, and `EMBEDDING_DIM`. LM Studio, Ollama, and text-embeddings-inference all satisfy this. Record `{model, dim, created_at}` in each Qdrant collection's metadata. On any write, compare the configured model and dimension against the collection's recorded values; on mismatch, **refuse the write** and flag that a reindex is required. ## Consequences - The 3060 is no longer a hard single point of failure; users may point at whatever they run. - Changing embedding models becomes a loud, explicit reindex rather than silent corruption. - Slightly more configuration surface than hard-coding LM Studio. - Bundling a small CPU embedding container as a compose profile default remains available later to improve the out-of-box experience for new adopters.