Listing Thumbnail

    voyage-code-4 Embedding Model

     Info
    Deployed on AWS
    Free Trial
    Code embedding model purpose-built for coding agents and code search, with state-of-the-art agentic code retrieval quality. 32K context length.

    Overview

    Text embedding models are neural networks that transform texts into numerical vectors. They are a foundational building block for semantic search/retrieval systems and retrieval-augmented generation (RAG) and directly determine retrieval quality.

    voyage-code-4 is the next generation of Voyage AI's code embedding model, purpose-built to improve performance and reduce cost for coding agents. Coding agents now issue many of the code retrieval queries served in production: they explore, backtrack, and re-query across multiple steps, often starting from a goal as vague as a bug report rather than a known identifier. Most agents rely entirely on full-text search (grep), which works well when the agent already knows the symbol it is looking for, but returns no useful hits when the query describes a symptom rather than syntax. Semantic retrieval with voyage-code-4 complements full-text search and significantly reduces wasted token usage.

    voyage-code-4 is trained on an entirely new corpus mined from completed, issue-fixing pull requests spanning tens of thousands of repositories and hundreds of programming languages - substantially larger than the corpus used for voyage-code-3. Conventional code embedding corpora pair source files with docstrings, comments, or synthetic questions, which teach a model what code says. They do not teach a model what code does wrong, which is the context an agent needs when it starts from a bug report.

    voyage-code-4 outperforms Cohere Embed v4 and Gemini Embedding 2 by an average of 28.25% and 31.03% on agentic code retrieval, a new benchmark suite of 19 datasets built from issue-fixing pull requests, and by 19.21% and 16.01% across the 28 code retrieval datasets used to evaluate voyage-code-3. It surpasses voyage-code-3 itself by 27.54% and 13.98% on those two suites respectively, and OpenAI v3 large by 48.58% and 40.06%. Enabled by Matryoshka representation learning and quantization-aware training, voyage-code-4 supports embeddings in 2048, 1024, 512, and 256 dimensions, with multiple quantization options.

    Learn more about voyage-code-4 here: https://blog.voyageai.com/2026/07/30/voyage-code-4/ 

    Highlights

    • Code embedding model purpose-built for coding agents, trained on a new corpus mined from issue-fixing pull requests across tens of thousands of repositories and hundreds of programming languages - so it can locate the code that needs to change given only a symptom.
    • Outperforms Cohere Embed v4 and Gemini Embedding 2 by an average of 28.25% and 31.03% on agentic code retrieval, and by 19.21% and 16.01% across the 28 code retrieval datasets used to evaluate voyage-code-3.
    • Supports embeddings of 2048, 1024, 512, and 256 dimensions and offers multiple embedding quantization, including float (32-bit floating point), int8 (8-bit signed integer), uint8 (8-bit unsigned integer), binary (bit-packed int8), and ubinary (bit-packed uint8).

    Details

    Delivery method

    Latest version

    Deployed on AWS
    New

    Introducing multi-product solutions

    You can now purchase comprehensive solutions tailored to use cases and industries.

    Multi-product solutions

    Features and programs

    Financing for AWS Marketplace purchases

    AWS Marketplace now accepts line of credit payments through the PNC Vendor Finance program. This program is available to select AWS customers in the US, excluding NV, NC, ND, TN, & VT.
    Financing for AWS Marketplace purchases

    Pricing

    Free trial

    Try this product free for 7 days according to the free trial terms set by the vendor.

    voyage-code-4 Embedding Model

     Info
    Pricing is based on actual usage, with charges varying according to how much you consume. Subscriptions have no end date and may be canceled any time.
    Additional AWS infrastructure costs may apply. Use the AWS Pricing Calculator  to estimate your infrastructure costs.

    Usage costs (18)

     Info
    Dimension
    Description
    Cost/host/hour
    ml.g6.xlarge Inference (Real-Time)
    Recommended
    Model inference on the ml.g6.xlarge instance type, real-time mode
    $2.25
    ml.g6.2xlarge Inference (Batch)
    Recommended
    Model inference on the ml.g6.2xlarge instance type, batch mode
    $2.44
    ml.g5.xlarge Inference (Real-Time)
    Model inference on the ml.g5.xlarge instance type, real-time mode
    $2.82
    ml.g5.2xlarge Inference (Real-Time)
    Model inference on the ml.g5.2xlarge instance type, real-time mode
    $3.03
    ml.g5.4xlarge Inference (Real-Time)
    Model inference on the ml.g5.4xlarge instance type, real-time mode
    $4.06
    ml.g5.8xlarge Inference (Real-Time)
    Model inference on the ml.g5.8xlarge instance type, real-time mode
    $6.12
    ml.g6.2xlarge Inference (Real-Time)
    Model inference on the ml.g6.2xlarge instance type, real-time mode
    $2.44
    ml.g6.4xlarge Inference (Real-Time)
    Model inference on the ml.g6.4xlarge instance type, real-time mode
    $3.31
    ml.g6.8xlarge Inference (Real-Time)
    Model inference on the ml.g6.8xlarge instance type, real-time mode
    $5.04
    ml.g7e.2xlarge Inference (Real-Time)
    Model inference on the ml.g7e.2xlarge instance type, real-time mode
    $4.49

    Vendor refund policy

    Refunds are processed according to the EULA. For assistance, contact aws-marketplace@mongodb.com 

    How can we make this page better?

    Tell us how we can improve this page, or report an issue with this product.
    Tell us how we can improve this page, or report an issue with this product.

    Legal

    Vendor terms and conditions

    Upon subscribing to this product, you must acknowledge and agree to the terms and conditions outlined in the vendor's End User License Agreement (EULA) .

    Content disclaimer

    Vendors are responsible for their product descriptions and other product content. AWS does not warrant that vendors' product descriptions or other product content are accurate, complete, reliable, current, or error-free.

    Usage information

     Info

    Delivery details

    Amazon SageMaker model

    An Amazon SageMaker model package is a pre-trained machine learning model ready to use without additional training. Use the model package to create a model on Amazon SageMaker for real-time inference or batch processing. Amazon SageMaker is a fully managed platform for building, training, and deploying machine learning models at scale.

    Deploy the model on Amazon SageMaker AI using the following options:
    Deploy the model as an API endpoint for your applications. When you send data to the endpoint, SageMaker processes it and returns results by API response. The endpoint runs continuously until you delete it. You're billed for software and SageMaker infrastructure costs while the endpoint runs. AWS Marketplace models don't support Amazon SageMaker Asynchronous Inference. For more information, see Deploy models for real-time inference  .
    Deploy the model to process batches of data stored in Amazon Simple Storage Service (Amazon S3). SageMaker runs the job, processes your data, and returns results to Amazon S3. When complete, SageMaker stops the model. You're billed for software and SageMaker infrastructure costs only during the batch job. Duration depends on your model, instance type, and dataset size. AWS Marketplace models don't support Amazon SageMaker Asynchronous Inference. For more information, see Batch transform for inference with Amazon SageMaker AI  .
    Version release notes

    MongoDB is excited to announce the initial release of voyage-code-4, a code embedding model purpose-built for coding agents, delivering state-of-the-art agentic code retrieval quality at a third below the price of voyage-code-3.

    Additional details

    Inputs

    Summary

    Supply one or more texts to vectorise, with optional input type, truncation, dimension, and dtype controls.

    Limitations for input type
    Max 1,000 strings per request; max 32,000 total tokens.
    Input MIME type
    application/json
    https://github.com/voyage-ai/voyageai-aws/blob/main/sample_embedding_input.json
    https://github.com/voyage-ai/voyageai-aws/blob/main/sample_batch_input_embedding.jsonl

    Input data descriptions

    The following table describes supported input data fields for real-time inference and batch transform.

    Field name
    Description
    Constraints
    Required
    input
    A single string or a list of strings to embed.
    Maximum 1,000 items.
    Yes
    input_type
    The role of the input: query, document, or null.
    Default: null
    No
    truncation
    Whether to truncate inputs to fit context limits.
    Default: true
    No
    output_dimension
    Number of dimensions for the output embeddings. Supported values: 2048, 1024, 512, 256.
    Default: null
    No
    output_dtype
    Data type for the output embeddings.
    Default: float. Options: float, int8, uint8, binary, ubinary
    No
    encoding_format
    Format in which the embeddings are encoded.
    Default: null. Options: base64
    No
    id
    Batch transform request ID; returned in the output if specified.
    Default: null
    No

    Support

    Vendor support

    Please email us at aws-marketplace@mongodb.com  for inquiries and customer support.

    AWS infrastructure support

    AWS Support is a one-on-one, fast-response support channel that is staffed 24x7x365 with experienced and technical support engineers. The service helps customers of all sizes and technical abilities to successfully utilize the products and features provided by Amazon Web Services.

    Customer reviews

    Ratings and reviews

     Info
    0 ratings
    5 star
    4 star
    3 star
    2 star
    1 star
    0%
    0%
    0%
    0%
    0%
    0 reviews
    No customer reviews yet
    Be the first to review this product . We've partnered with PeerSpot to gather customer feedback. You can share your experience by writing or recording a review, or scheduling a call with a PeerSpot analyst.