Skip to content
This page was generated and translated with the assistance of AI. If you spot any inaccuracies, feel free to help improve it. Edit on GitHub

Supported Embedding Models

PRX-Memory supports three embedding provider families. Each provider connects through the prx-memory-embed crate's unified adapter interface.

OpenAI-Compatible

Any API that follows the OpenAI embedding endpoint format (/v1/embeddings) can be used. This includes OpenAI itself, Azure OpenAI, and local inference servers.

bash
PRX_EMBED_PROVIDER=openai-compatible
PRX_EMBED_API_KEY=your_openai_key
PRX_EMBED_MODEL=text-embedding-3-small
PRX_EMBED_BASE_URL=https://api.openai.com  # optional
ModelDimensionsNotes
text-embedding-3-small1536Good balance of quality and cost
text-embedding-3-large3072Highest quality, higher cost
text-embedding-ada-0021536Legacy model

Local Inference

For privacy-sensitive deployments, point PRX_EMBED_BASE_URL to a local inference server running an open-source embedding model (e.g., via Ollama, vLLM, or text-embeddings-inference).

Jina AI

Jina provides high-quality multilingual embedding models optimized for retrieval tasks.

bash
PRX_EMBED_PROVIDER=jina
PRX_EMBED_API_KEY=your_jina_key
PRX_EMBED_MODEL=jina-embeddings-v3
ModelDimensionsNotes
jina-embeddings-v31024Latest multilingual model
jina-embeddings-v2-base-en768English-optimized
jina-embeddings-v2-base-code768Code-optimized

Fallback Key

If PRX_EMBED_API_KEY is not set, the system checks JINA_API_KEY as a fallback.

Google Gemini

Gemini embedding models are available through the Google AI API.

bash
PRX_EMBED_PROVIDER=gemini
PRX_EMBED_API_KEY=your_gemini_key
PRX_EMBED_MODEL=text-embedding-004
ModelDimensionsNotes
text-embedding-004768Current recommended model
embedding-001768Legacy model

Fallback Key

If PRX_EMBED_API_KEY is not set, the system checks GEMINI_API_KEY as a fallback.

Choosing a Model

PriorityRecommended ModelProvider
Best qualitytext-embedding-3-largeOpenAI-compatible
Best for codejina-embeddings-v2-base-codeJina
Multilingualjina-embeddings-v3Jina
Privacy / localAny local model via openai-compatibleSelf-hosted
Cost-effectivetext-embedding-3-smallOpenAI-compatible

Switching Models

When switching embedding models, existing vectors become incompatible with the new model's vector space. Use the memory_reembed tool to re-embed all stored memories with the new model:

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "memory_reembed",
    "arguments": {}
  }
}

WARNING

Re-embedding requires API calls for every stored memory. For large databases, this may take significant time and incur API costs. Plan re-embedding during low-usage periods.

Next Steps

Released under the Apache-2.0 License.