Skip to content

Built-in Providers

Lucerna ships several embedding and reranking providers. You can select them with CLI flags (no config file needed) or instantiate them in lucerna.config.ts.

Pass --embedder <name> to any command, or use new ProviderClass() in your config file:

NameClassNotes
cloudflareCloudflareEmbeddingsRequires CLOUDFLARE_ACCOUNT_ID + CLOUDFLARE_API_TOKEN
local / hfHFEmbeddingsLocal ONNX via @huggingface/transformers, no API key
bge-smallBGESmallEmbeddingsLocal BGE-small model
nomicNomicCodeEmbeddingsLocal Nomic code model (default when no env vars set)
Terminal window
lucerna mcp-server /path/to/project --embedder cloudflare
lucerna index /path/to/project --embedder local
lucerna.config.ts
import { CloudflareEmbeddings } from '@upstart.gg/lucerna';
export default {
embeddingFunction: new CloudflareEmbeddings(),
};
Terminal window
lucerna mcp-server /path/to/project --no-semantic # BM25 only

Pass --reranker <name> or use new RerankerClass() in your config:

NameClassNotes
cloudflareCloudflareRerankerRequires CLOUDFLARE_ACCOUNT_ID + CLOUDFLARE_API_TOKEN
jinaJinaRerankerRequires JINA_API_KEY
voyageVoyageRerankerRequires VOYAGE_API_KEY
Terminal window
lucerna mcp-server /path/to/project --reranker voyage
lucerna search /path/to/project "auth middleware" --reranker jina
lucerna.config.ts
import { VoyageReranker } from '@upstart.gg/lucerna';
export default {
rerankingFunction: new VoyageReranker(),
};
Terminal window
lucerna mcp-server /path/to/project \
--embedder cloudflare \
--reranker voyage

Or in lucerna.config.ts:

import { CloudflareEmbeddings, VoyageReranker } from '@upstart.gg/lucerna';
export default {
embeddingFunction: new CloudflareEmbeddings(),
rerankingFunction: new VoyageReranker(),
};