Skip to content

LM Studio embedder

Embeds through a local LM Studio server over its OpenAI-compatible endpoint, with no API key. Selected via EMBEDDING_PROVIDER=lmstudio.

Enable it

bash
EMBEDDING_PROVIDER=lmstudio
LMSTUDIO_BASE_URL=http://localhost:1234/v1
EMBEDDING_DIMS=768

Configuration

VariableDefaultDescription
EMBEDDING_PROVIDERopenaiSet to lmstudio.
LMSTUDIO_BASE_URLhttp://localhost:1234/v1Base URL of the local LM Studio server.
EMBEDDING_DIMS768Vector dimension; must match the embedding model.

Notes

  • Runs against a local LM Studio server; it ignores the API key, but the OpenAI SDK convention still sends one, so a placeholder lm-studio value is used.
  • The default model is text-embedding-nomic-embed-text-v1.5.
  • Shares the OpenAI-compatible request loop: 429 and 5xx and network errors retry with backoff, other 4xx fail fast, and a final failure raises for a clean 503.

The memory layer for AI agents.