ModelsAgree
← All leaderboards
🤖

Best code embedding APIs for repository search

4 models · updated 2026-08-10

The verdict

Voyage Code 3 leads — 3 of 4 models rank Voyage Code 3 the top pick.

Not unanimous: ChatGPT picks Codestral Embed.

As of 2026-08-10, ChatGPT, Claude, Gemini and Grok collectively rank Voyage Code 3 #1 for code embedding apis for repository search on ModelsAgree by aggregate score. The models' case: Purpose-built for code retrieval and consistently at or near the top of code-search benchmarks. The models' main caveat: Commercial hosted API only with no self-host or open weights, and now tied to MongoDB's roadmap — a non-starter for air-gapped or fully on-prem code. The strongest alternative is Codestral Embed — Best overall for chunked repository search: excellent real-world issue-to-file retrieval, flexible dimensions and int8 output, and strong value at. Not unanimous: ChatGPT picks Codestral Embed. Source: https://modelsagree.com/best/best-code-embedding-apis-for-repository-search (modelsagree.com, CC BY 4.0).

Grade any brand's AI visibility →See how ChatGPT, Claude, Gemini & Grok rate any product, or your own.

Combined ranking

  1. 1
    GPT #2Claude #1Gemini #1Grok #1

    Purpose-built for code retrieval and consistently at or near the top of code-search benchmarks; long context, Matryoshka-style adjustable dimensions and int8/binary quantization let you trade recall for index cost, which matters at whole-repo scale; mature reranker pairing (rerank-2) and clean API. Near-tie with Codestral Embed at the top.

    + model takes & fixes

    Claude Purpose-built for code retrieval and consistently at or near the top of code-search benchmarks; long context, Matryoshka-style adjustable dimensions and int8/binary quantization let you trade recall for index cost, which matters at whole-repo scale; mature reranker pairing (rerank-2) and clean API. Near-tie with Codestral Embed at the top.

    Gemini Top-tier code retrieval accuracy specifically fine-tuned for syntax, function call graphs, and technical documentation, featuring a large context window to ingest entire modules. Assumes cloud API usage is permitted.

    Grok Specialized code retrieval model with consistent double-digit gains over general embeddings on large suites of code datasets (functions, docs, real repos); 32k context, Matryoshka dims + quantization for practical large-repo indexing cost/storage; proven in production code RAG/agents. Assumption: practitioner prioritizes measurable retrieval quality on actual code over pure price.

    GPT Near-tie for first, with consistently elite code-retrieval quality, a 32K context window, flexible 256–2048 dimensions, mature API, and a generous 200M-token free allowance.

    Where it falls short

    per GPT At $0.18/M tokens, it costs more than Codestral while lacking a clear quality advantage on repository issue-to-file retrieval.

    per Claude Commercial hosted API only with no self-host or open weights, and now tied to MongoDB's roadmap — a non-starter for air-gapped or fully on-prem code that can't leave the building.

    per Gemini Closed-source proprietary API with no self-hostable open weights, making it unsuitable for air-gapped or strict zero-data-retention environments.

    per Grok Highest per-token cost among specialists; overkill (and expensive) for tiny repos or pure keyword needs.

  2. 2
    GPT #1Claude #2Gemini Grok #2

    Best overall for chunked repository search: excellent real-world issue-to-file retrieval, flexible dimensions and int8 output, and strong value at $0.15/M tokens; narrowly beats Voyage assuming normal code-aware chunking.

    + model takes & fixes

    GPT Best overall for chunked repository search: excellent real-world issue-to-file retrieval, flexible dimensions and int8 output, and strong value at $0.15/M tokens; narrowly beats Voyage assuming normal code-aware chunking.

    Claude Code-specialized embedding from a strong code-model lineage, competitive with or ahead of voyage-code-3 on several code-retrieval evals, with configurable output dimension and precision for cost/quality tuning; benefits from Mistral's broader code tooling ecosystem. Near-tie with #1.

    Grok Purpose-built code embedder that beats prior SOTA (including voyage-code-3 and OpenAI large) on SWE-Bench-style real GitHub issue/fix retrieval and Text2Code tasks; flexible output dims/precision down to 256/int8 while retaining lead; strong for agentic repo search.

    Where it falls short

    per GPT Its 8K context and closed weights make it a poor fit for whole-file embedding or self-hosting without an enterprise arrangement.

    per Claude Newer with a shorter production track record and API-only access; less third-party tooling/integration battle-testing than the incumbents.

    per Grok Newer specialist with thinner independent long-term production track record outside Mistral ecosystem.

  3. 3
    GPT #3Claude Gemini Grok #4

    Essentially tied with Voyage across a broad 25-benchmark code suite, with 32K context, task-specific query/document modes, multilingual and cross-language search, Matryoshka dimensions, and hosted or self-deployed paths.

    + model takes & fixes

    GPT Essentially tied with Voyage across a broad 25-benchmark code suite, with 32K context, task-specific query/document modes, multilingual and cross-language search, Matryoshka dimensions, and hosted or self-deployed paths.

    Grok Compact yet SOTA-competitive on 25+ code retrieval tasks

    Where it falls short

    per GPT The CC-BY-NC license restricts commercial self-hosting unless separately licensed.

  4. 4
    GPT Claude #4Gemini #4Grok

    Not code-specialized but a dependable, ubiquitous default — good enough retrieval on mixed code+doc corpora, dimension shortening, and the widest ecosystem/vendor-DB integration, making it the lowest-friction path to a working repo search.

    + model takes & fixes

    Claude Not code-specialized but a dependable, ubiquitous default — good enough retrieval on mixed code+doc corpora, dimension shortening, and the widest ecosystem/vendor-DB integration, making it the lowest-friction path to a working repo search.

    Gemini Ubiquitous ecosystem integration, high semantic strength across mixed text/code docs, and Matryoshka dimension shortening to optimize vector storage costs.

    Where it falls short

    per Claude A general-purpose model that measurably trails dedicated code embedders on pure code-to-code and NL-to-code retrieval; the wrong pick if search quality on code specifically is the priority.

    per Gemini General-purpose text focus causes lower precision on fine-grained syntax and exact symbol lookups compared to dedicated code models.

  5. 5
    GPT Claude Gemini #2Grok

    Best open-source option for repository search because it natively combines dense, sparse, and multi-vector retrieval for unmatched exact symbol and function name matching. Assumes team can host local vector pipelines.

    + model takes & fixes

    Gemini Best open-source option for repository search because it natively combines dense, sparse, and multi-vector retrieval for unmatched exact symbol and function name matching. Assumes team can host local vector pipelines.

    Where it falls short

    per Gemini Significant infrastructure complexity and storage footprint required to serve multi-vector representations at scale compared to single-vector APIs.

  6. 6
    GPT #4Claude #5Gemini Grok

    Strong CodeSearchNet results, fully released weights, training data and evaluation code under Apache 2.0, and excellent control for teams willing to deploy their own embedding endpoint.

    + model takes & fixes

    GPT Strong CodeSearchNet results, fully released weights, training data and evaluation code under Apache 2.0, and excellent control for teams willing to deploy their own embedding endpoint.

    Claude Fully open, code-specialized weights with transparent training and an easy local/self-host story; a credible privacy-preserving option when data residency rules out hosted APIs and you want something purpose-built for code rather than a generic open model.

    Where it falls short

    per GPT The 7B model is costly to serve and officially targets only six programming languages.

    per Claude Smaller ecosystem and generally a step behind the top commercial code models on quality; you still carry all the serving/ops burden.

  7. 7
    GPT Claude Gemini #3Grok

    Dedicated open-weights code embedding model with 8k context support and explicit task instruction-tuning for high retrieval precision at low hosting cost. Near-tie with text-embedding-3-large on general repository RAG.

    + model takes & fixes

    Gemini Dedicated open-weights code embedding model with 8k context support and explicit task instruction-tuning for high retrieval precision at low hosting cost. Near-tie with text-embedding-3-large on general repository RAG.

    Where it falls short

    per Gemini Reduced model capacity compared to large proprietary endpoints, leading to occasional degradation on complex cross-file architectural reasoning.

  8. 8
    GPT Claude #3Gemini Grok

    Open-weight, code-first model that punches above its parameter count on code retrieval, so you can self-host, fine-tune, and keep source private while getting near-frontier quality; sensible small (1.5B-class) footprint.

    + model takes & fixes

    Claude Open-weight, code-first model that punches above its parameter count on code retrieval, so you can self-host, fine-tune, and keep source private while getting near-frontier quality; sensible small (1.5B-class) footprint.

    Where it falls short

    per Claude You own the serving infrastructure, GPU capacity, and eval work — no managed SLA, batching, or reranker bundled in, so it's not for teams that want a turnkey endpoint.

  9. 9
    GPT Claude Gemini Grok #3

    Tops recent code NDCG@10 benches while remaining competitive or leading across other domains; 32k context, asymmetric query/document modes, highly flexible dims (down to 40); available as managed API plus open weights for hybrid use.

    + model takes & fixes

    Grok Tops recent code NDCG@10 benches while remaining competitive or leading across other domains; 32k context, asymmetric query/document modes, highly flexible dims (down to 40); available as managed API plus open weights for hybrid use.

    Where it falls short

    per Grok Newer entrant whose strongest numbers come from vendor-curated evals; less battle-tested at massive multi-repo scale than Voyage.

  10. 10
    GPT Claude Gemini #5Grok

    Provides dedicated searchcode input type tuning that improves intent alignment between developer queries and repository chunks within enterprise RAG systems.

    + model takes & fixes

    Gemini Provides dedicated searchcode input type tuning that improves intent alignment between developer queries and repository chunks within enterprise RAG systems.

    Where it falls short

    per Gemini Fully proprietary API model subject to per-token pricing without open-weights deployment flexibility for custom codebases.

  11. 11
    GPT #5Claude Gemini Grok

    A practical managed fallback with an 8K context, flexible 128–3072 dimensions, batch pricing, broad language coverage, and straightforward Gemini or Vertex AI integration.

    + model takes & fixes

    GPT A practical managed fallback with an 8K context, flexible 128–3072 dimensions, batch pricing, broad language coverage, and straightforward Gemini or Vertex AI integration.

    Where it falls short

    per GPT It is general-purpose rather than code-specialized, with weaker public evidence on repository-level retrieval than the four leaders.

Rank history

1234567808-0308-10Voyage Code 3Codestral EmbedJina Code Embeddings 1.5BOpenAI text-embedding-3-largeBGE-M3Nomic Embed CodeJina Embeddings v2 Base CodeQodo Embed 1
Voyage Code 3#1Codestral Embed#2Jina Code Embeddings 1.5B#4OpenAI text-embedding-3-large#3BGE-M3#4Nomic Embed Code#6Jina Embeddings v2 Base Code#8Qodo Embed 1#5

Just missed the top 5

GPT OpenAI text-embedding-3-largeeasy, mature API but materially behind specialized code models and unchanged since 2024 · Cohere Embed 4excellent long-context enterprise retrieval, but its multimodal strengths add little to source-code search and Codestral beats it on code-focused evaluations

Claude Google gemini-embedding-001very strong general embedder with long context and a solid managed API, but not code-specialized, so it loses to dedicated code models on pure repo retrieval

Gemini CodeSage-Largestrong benchmark results for code understanding but lacks turnkey API infrastructure and deployment tooling · Nomic Embed Codefully open and auditable model, but trails BGE-M3 and Voyage on complex multi-language retrieval benchmarks

By model

ChatGPT

  1. 1.Codestral Embed
  2. 2.Voyage Code 3
  3. 3.Jina Code Embeddings 1.5B
  4. 4.Nomic Embed Code
  5. 5.Google Gemini Embedding 2

Claude

  1. 1.Voyage Code 3
  2. 2.Codestral Embed
  3. 3.Qodo Embed 1
  4. 4.OpenAI text-embedding-3-large
  5. 5.Nomic Embed Code

Gemini

  1. 1.Voyage Code 3
  2. 2.BGE-M3
  3. 3.Jina Embeddings v2 Base Code
  4. 4.OpenAI text-embedding-3-large
  5. 5.Cohere Embed v3

Grok

  1. 1.Voyage Code 3
  2. 2.Codestral Embed
  3. 3.ZeroEntropy zembed-1
  4. 4.Jina Code Embeddings 1.5B

Common questions

What is the best code embedding apis for repository search according to AI models?

Voyage Code 3 leads. 3 of 4 models rank Voyage Code 3 the top pick. The current top 3: Voyage Code 3, Codestral Embed, Jina Code Embeddings 1.5B. Ranked by asking ChatGPT, Claude, Gemini, Grok the same buying question and merging their top-5 picks, updated 2026-08-10. Source: modelsagree.com.

Which code embedding apis for repository search did each AI model pick first?

ChatGPT: Codestral Embed. Claude: Voyage Code 3. Gemini: Voyage Code 3. Grok: Voyage Code 3.

Do the AI models agree on the best code embedding apis for repository search?

Not unanimous. ChatGPT picks Codestral Embed.

What changed in the latest code embedding apis for repository search ranking?

In the latest poll (2026-08-10): Jina Code Embeddings 1.5B climbed 4 spots, Jina Embeddings v2 Base Code climbed 1 spot; OpenAI text-embedding-3-large dropped 1 spot, BGE-M3 dropped 1 spot, Qodo Embed 1 dropped 3 spots; ZeroEntropy zembed-1 entered the ranking. The models are re-polled on demand, so this ranking moves.

How is this code embedding apis for repository search ranking made?

ChatGPT, Claude, Gemini, Grok are each asked the same buying question in a fresh session with no system steering. Their top-5 answers are merged (rank 1 = 5 pts … rank 5 = 1 pt) into the consensus ranking, re-polled on demand and tracked over time.

More on how polling works: full methodology →

Cite this ranking

ModelsAgree, “Best code embedding APIs for repository search” — merged ranking from ChatGPT, Claude, Gemini & Grok, polled 2026-08-10. https://modelsagree.com/best/best-code-embedding-apis-for-repository-search (CC BY 4.0)

Tracked by ModelsAgree · rank 1 = 5 pts … rank 5 = 1 pt · re-polled on demand