Support for OpenAI-compatible embedding endpoints
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 83
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Several self-hosted embedding servers expose OpenAI-compatible /embeddings endpoints:
The current OpenAI provider has a hardcoded API_BASE_URL. A configurable base_url
would make all these work without needing separate provider implementations.
Possible API
client = Client()
response = client.embed(
model="BAAI/bge-small-en-v1.5",
inputs=["Hello world"],
base_url="http://localhost:7997" # or via env var
)
Since the request format is already OpenAI-compatible, only the URL routing would change.
Thanks for catsu, the unified API and model metadata catalog are really useful!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the OpenAI provider and its hardcoded API_BASE_URL, then inspect how embedding requests receive configuration. Confirm how the client currently handles environment variables and existing embedding tests. Done means a configurable base_url can route the same request format to OpenAI-compatible endpoints such as Infinity, vLLM, or Ollama.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ollama, rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100