# Index a codebase for a coding agent

> Index a codebase for a coding agent: 2 companies fully do it, 10 with a limit, 35 carry the tag. Every listing in Embeddings & rerankers with the reason and a source.

- Canonical: https://www.anchorterminal.com/niches/embeddings.code-search/
- Markdown: https://www.anchorterminal.com/niches/embeddings.code-search/index.md (~1,750 tokens)
- Slim: https://www.anchorterminal.com/niches/embeddings.code-search/index.min.md (~480 tokens, same facts, less prose, for token-sensitive contexts)
- JSON: https://www.anchorterminal.com/niches/embeddings.code-search/index.json (this page as data, same URL with Accept: application/json)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-15

Two or three companies' docs show a full fit.

| Companies, full fit | With a limit | Carry the tag | Share of the category's work | First-hand accounts |
| --- | --- | --- | --- | --- |
| 2 | 10 | 35 | 5 | 5 |

## What counts as done

A code-capable model (a code model id, or code retrieval results published) embeds code and natural-language queries into one space, handles code tokens without errors or NaN, and either runs locally or states retention for uploaded code.

Measured, for our own tests: recall@10 on a labelled code query set compared with a grep baseline, and time to re-embed one changed file.

How agents ask for it: semantic search over this repo; find where we handle refunds; index the monorepo for the agent; which function does this

## Does the job

The docs show it meets the test above, and nothing we read says otherwise.

- **EmbeddingGemma 2 (Google LLC (RDAP registrant of gemma.ai; the card names Google DeepMind as author))**: A CodeRetrieval prompt for natural-language queries against code, an MTEB(Code, v1) score of 78.68 on the card, and it runs locally. NaN only in float16, which the card rules out.
- **EmbeddingGemma 300M (Google LLC (RDAP registrant of gemma.ai; the card names Google DeepMind as author))**: A Code Retrieval prompt for natural-language queries against code blocks, MTEB(Code, v1) 68.76 published on the card, and a local route. Code recall against grep unmeasured.
- **Granite Embedding Small English R2 (International Business Machines Corporation)**: Code retrieval results are published (CoIR 53.8 over 10 tasks), it runs locally, and no report of code-token failures was found in the publisher repository's 7 issues. Recall against grep unmeasured.

## Does the job, with a limit

It does the job, but something in the docs or a user's account will get in an agent's way. The limit is named in each row.

- **Gemini Embedding (Google LLC)**: A task: code retrieval prefix embeds natural-language queries against code, and retention is stated, but free-tier inputs are used to improve Google products and may be read by human reviewers; only the paid tier excludes it.
- **Jina Embeddings and Reranker (Jina AI GmbH)**: Code embedding models take nl2code.query and nl2code.passage tasks, but retention of uploaded code wasn't stated on any page read here.
- **Mistral Embed and Codestral Embed (Mistral AI (RCS Paris 952 418 325))**: codestral-embed is a code model for retrieval over code, but it is hosted and retention of uploaded code wasn't confirmed on the pages read; the free tier may train on inputs per the last assessment.
- **Nomic Embed (Nomic, Inc.)**: No code model or code results on the Atlas pages, though an account found Ollama with Nomic fast enough to index a codebase for the Roo agent.
- **OpenAI embeddings (OpenAI OpCo, LLC)**: No code model or code retrieval results; the guide shows code search over Python functions with text-embedding-3-small, and retention for uploaded code wasn't on the pages read.
- **Qwen3-Embedding-0.6B (Alibaba Cloud (the registrant of qwen.ai per RDAP, carried from the Qwen3.8-27B check))**: The card claims code retrieval and support for programming languages, but publishes no code retrieval results; it runs locally, so no code leaves the machine.
- **Qwen3-Embedding-4B (Alibaba Cloud (named in the copyright line of the 8B sibling's Apache 2.0 licence; this repository has no LICENSE file))**: The card claims code retrieval and support for programming languages, but publishes no code retrieval results; it runs locally, so no code leaves the machine.
- **Qwen3-Embedding-8B (Alibaba Cloud (named in the licence's copyright line))**: Code retrieval is claimed without published code results, and an account found any text containing "import" returned an all-NaN vector in float16, a named blocker.
- **Voyage AI embeddings and rerankers (Voyage AI Innovations, Inc.)**: voyage-code-4 is a code retrieval model and retention is stated, but inputs train models by default with a one-way opt-out, and an account benchmarking coding agents went back to ripgrep.
- **ZeroEntropy zerank and zembed (ZeroEntropy, Inc.)**: The zembed-1 card publishes a code retrieval score (0.6452) and runs locally, but needs trust_remote_code.

- not this job: Amazon Nova Multimodal Embeddings (Amazon Web Services, Inc.): No code model or code retrieval results in the guide, schema or model card, and it doesn't run locally.
- not this job: Cohere Embed and Rerank (Cohere Inc.): No code model and no code retrieval results on the models page, and no local route.
- not this job: jina-embeddings-v5-omni-small (Jina AI GmbH, a subsidiary of Elastic N.V. (per the jina-embeddings listing's 2 October 2026 check)): No code task, code model id or code retrieval results on the card.
- not this job: NVIDIA NeMo Retriever Embedding and Reranking NIMs (NVIDIA Corporation): None of the eight models in the support matrix is a code model, and no code retrieval results were found on the pages read.
- not this job: Qwen3-VL-Embedding-2B (Alibaba Cloud (RDAP names Alibaba Cloud (Singapore) Private Limited as the registrant of qwen.ai)): No code retrieval claim, code model id or code results on the card.
- not this job: Qwen3-VL-Embedding-8B (Alibaba Group (Tongyi Lab, named in the copyright line of the GitHub repository's Apache 2.0 licence)): No code retrieval claim, code model id or code results on the card.

## What stops agents finishing

- float16 NaN on common code tokens such as "import" (Qwen3-Embedding-8B)
- indexing too slow for a working repo
- the agent does as well with grep, so the index is not worth its cost

## Around it

Before: code.read-repo. After: vector-search.agent-query-tool.

## Where this comes from

Weight 5 of 100 in Embeddings & rerankers: 5 of 62 accounts (91 account-use-case tags, accounts counted in each use case they fit, scaled to 100 and rounded by hand); Roo, ChunkHound and benchmark accounts; two accounts say grep or BM25 beat embeddings for code

As data: https://www.anchorterminal.com/api/v1/use-cases/embeddings.code-search.json, or the MCP tool get_use_case with id embeddings.code-search. Draft, read 2026-11-15 from public docs and first-hand accounts, not yet reviewed by a person.

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
