Conversation
|
@sk7n4k3d, heads up that I've opened #187 as a draft doing the same thing, so a duplicate doesn't catch you by surprise. #111 has gone stale against master and hasn't had a review since February. My read is that the blocker on all of these is a mix of review bandwidth and scope. In #55 @kacperlukawski asked for a PR with "just OpenAI embeddings, but nothing else," and the 417 deleted lines here are probably more than he wants to work through in one pass. Mine is additive only for that reason. Not trying to get ahead of you though. If you'd rather rebase #111 and slim it down, I'll close mine and back yours instead. |
|
Thanks for the heads-up and for writing this up properly — the #55 quote is the context I was missing, and you're right on both counts. #111 is stale against master (mergeable_state is Go ahead with #187. I'm closing #111. Two notes that might save you a round-trip:
Happy to be a second pair of eyes on the tests or the settings table if that helps. Good luck with the review. |
|
Closed in favour of #187 — @castlenthesky's version is additive, matches the #55 brief, and isn't stale. Piling a rebase on top of four existing PRs wasn't going to get the feature merged faster. For anyone landing here looking for an OpenAI-compatible embedding provider: follow #187. It covers OpenAI, Ollama, vLLM, LM Studio and OpenRouter via |
Summary
Adds a new
openaiembedding provider that supports any OpenAI-compatible embedding API endpoint (/v1/embeddings). This enables using local inference servers, Azure OpenAI, LiteLLM, Ollama, vLLM, or any other service exposing the standard OpenAI Embeddings API.Motivation
Currently
mcp-server-qdrantonly supports FastEmbed for embeddings. Many users already run dedicated embedding servers (for hardware acceleration, model flexibility, or centralized deployment) and would benefit from a generic provider that can call any OpenAI-compatible endpoint.Configuration
EMBEDDING_PROVIDER=openai EMBEDDING_MODEL=your-model-name OPENAI_BASE_URL=http://your-server:8080/v1 OPENAI_API_KEY=optional-api-key # defaults to "not-needed"Changes
embeddings/openai.py—OpenAIEmbeddingProviderclassembeddings/factory.py— AddedOPENAIbranchembeddings/types.py— AddedOPENAIenum valuesettings.py— Addedopenai_base_urlandopenai_api_keyfieldsDesign Decisions
urllib.request)run_in_executor— wraps synchronous urllib calls to avoid blocking the event loopopenai-{model-slug}prefix to avoid collisions with FastEmbed vectors