OpenAI embedder
The default embedder, calling the OpenAI embeddings API. Selected via EMBEDDING_PROVIDER=openai.
Enable it
bash
EMBEDDING_PROVIDER=openai
OPENAI_API_KEY=sk-...
OPENAI_EMBEDDING_MODEL=text-embedding-3-small
EMBEDDING_DIMS=1536Configuration
| Variable | Default | Description |
|---|---|---|
EMBEDDING_PROVIDER | openai | Set to openai. |
OPENAI_API_KEY | none | Bearer token for the embeddings API. Calls fail at runtime if unset. |
OPENAI_EMBEDDING_MODEL | text-embedding-3-small | Embedding model to call. |
EMBEDDING_DIMS | 1536 | Vector dimension; must match the embedding model. |
Notes
- Requests hit
https://api.openai.com/v1/embeddingsover httpx with a 30 second timeout. - Transient failures (429 rate limit, 5xx, network, timeout) are retried up to four times with exponential backoff so a burst does not hard fail an add or search.
- A hard
insufficient_quota429 is not retried and fails fast; any final failure raises so callers surface a clean 503. - Token usage is recorded per call for cost attribution.