@@ -13,7 +13,7 @@ language queries or symbol name lookups.
1313
14141 . Fetches source files from configured GitHub repositories
15152 . Parses code symbols (functions, classes, methods, components) using Tree-sitter
16- 3 . Generates embeddings via Jina Code V2 (served by HuggingFace TEI)
16+ 3 . Generates embeddings via a pluggable provider — Jina Code V2 (TEI) by default, or Voyage / OpenAI / Ollama
17174 . Stores vectors in Qdrant for fast semantic search
18185 . Optionally indexes commit history into a separate Qdrant collection
19196 . Exposes search and indexing tools through the MCP protocol (and a small HTTP API)
@@ -97,7 +97,7 @@ chunk with a vector embedding and a rich payload.
9797- **Change detection** — compares the file's Git blob SHA to the last indexed value; unchanged files are skipped
9898- **Parsing** — Tree-sitter walks the AST and emits `CodeSymbol` objects per language
9999- **Embedding text** — built from signature, docstring, annotations, parent name, and source (truncated at ~6000 chars)
100- - **Batching** — symbols are embedded in batches of 32 against the TEI server
100+ - **Batching** — batched per-provider (32 for Jina/TEI and Ollama, 128 for Voyage and OpenAI)
101101- **Upsert** — vectors stored in Qdrant under deterministic UUIDs (per service / file / symbol / line)
102102- **Cleanup** — entries for files no longer in the repo are deleted
103103
@@ -158,19 +158,51 @@ any context where observing indexing progress matters.
158158
159159# # Environment variables
160160
161- | Variable | Default | Description |
162- |-----------------------------|---------------------------------------|--------------------------------------------|
163- | `GITHUB_TOKEN` | *(required)* | GitHub token with repo read access |
164- | `QDRANT_URL` | `http://localhost:6333` | Qdrant connection URL |
165- | `QDRANT_COLLECTION` | `code_symbols` | Collection name for code symbol vectors |
166- | `QDRANT_COMMITS_COLLECTION` | `git_commits` | Collection name for commit message vectors |
167- | `EMBEDDINGS_URL` | `http://localhost:8087` | Jina TEI URL |
168- | `EMBEDDINGS_MODEL` | `jinaai/jina-embeddings-v2-base-code` | Embedding model ID |
169- | `EMBEDDINGS_DIMENSIONS` | `768` | Vector dimensions |
170- | `GIT_HISTORY_MAX_COMMITS` | `500` | Max commits indexed per service |
171- | `MCP_TRANSPORT` | `streamable-http` | One of `streamable-http`, `sse`, `stdio` |
172- | `MCP_HOST` / `MCP_PORT` | `0.0.0.0` / `8090` | Server bind address |
173- | `CONFIG_PATH` | `./config.yaml` | Path to the services config file |
161+ | Variable | Default | Description |
162+ |-----------------------------|-------------------------|--------------------------------------------|
163+ | `GITHUB_TOKEN` | *(required)* | GitHub token with repo read access |
164+ | `QDRANT_URL` | `http://localhost:6333` | Qdrant connection URL |
165+ | `QDRANT_COLLECTION` | `code_symbols` | Collection name for code symbol vectors |
166+ | `QDRANT_COMMITS_COLLECTION` | `git_commits` | Collection name for commit message vectors |
167+ | `EMBEDDINGS_PROVIDER` | `jina` | One of `jina`, `voyage`, `openai`, `ollama` — see *Embedding providers* below |
168+ | `GIT_HISTORY_MAX_COMMITS` | `500` | Max commits indexed per service |
169+ | `MCP_TRANSPORT` | `streamable-http` | One of `streamable-http`, `sse`, `stdio` |
170+ | `MCP_HOST` / `MCP_PORT` | `0.0.0.0` / `8090` | Server bind address |
171+ | `CONFIG_PATH` | `./config.yaml` | Path to the services config file |
172+
173+ # # Embedding providers
174+
175+ The embedding backend is selectable via `EMBEDDINGS_PROVIDER`. Default is `jina` so existing
176+ deployments keep working unchanged. Each provider derives its own vector dimensions from the
177+ configured model — no need to set dimensions manually unless you want to override.
178+
179+ | Variable | Default | Applies to | Description |
180+ |--------------------------|---------------------------------------|------------|-----------------------------------------------------------------------------------|
181+ | `JINA_URL` | `http://localhost:8087` | `jina` | TEI base URL |
182+ | `JINA_MODEL` | `jinaai/jina-embeddings-v2-base-code` | `jina` | Model ID served by TEI (informational — the running TEI container chooses) |
183+ | `JINA_DIMENSIONS` | `768` | `jina` | Vector dimensions of the TEI model |
184+ | `VOYAGE_API_KEY` | *(required if provider=voyage)* | `voyage` | Voyage AI API key |
185+ | `VOYAGE_MODEL` | `voyage-code-3` | `voyage` | Voyage embedding model |
186+ | `VOYAGE_DIMENSIONS` | *(native)* | `voyage` | Optional override — Voyage code-3 supports `256` / `512` / `1024` / `2048` |
187+ | `OPENAI_API_KEY` | *(required if provider=openai)* | `openai` | OpenAI API key |
188+ | `OPENAI_EMBEDDING_MODEL` | `text-embedding-3-large` | `openai` | OpenAI embedding model |
189+ | `OPENAI_DIMENSIONS` | *(native)* | `openai` | Optional override (text-embedding-3-* models support shrinking) |
190+ | `OLLAMA_URL` | `http://localhost:11434` | `ollama` | Ollama base URL |
191+ | `OLLAMA_MODEL` | `nomic-embed-text` | `ollama` | Ollama embedding model |
192+ | `OLLAMA_DIMENSIONS` | *(native)* | `ollama` | Required if using a model not in the built-in dimensions table |
193+
194+ ` voyage-code-3` outperforms `jinaai/jina-embeddings-v2-base-code` on most code retrieval benchmarks,
195+ so switching to Voyage is also a quality lever, not just a flexibility one.
196+
197+ **Switching providers against an existing index:** if the new provider's vector size differs from
198+ the existing Qdrant collection, the server fails fast at startup with a clear error pointing at the
199+ offending collection. To switch, drop both collections (`code_symbols` and `git_commits`) via the
200+ Qdrant UI or API, then reindex. There is no automatic migration.
201+
202+ **Hosted-only setup (no local TEI container):** in `docker-compose.yaml`, comment out the entire
203+ ` jina-embeddings` service block, the `jina-embeddings` entry under `semcode.depends_on`, and the
204+ ` JINA_URL` line under `semcode.environment`. Then set `EMBEDDINGS_PROVIDER` and the relevant API
205+ key in `.env`.
174206
175207# # Qdrant collections
176208
0 commit comments