Skip to content

Release v9.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Oct 19:34

v9.1.0 lets a document index embed text for you, so Pinecone can embed a field's text on write and your query text on search. Read responses now report billed egress, the client retries transient connection failures, and HTTP 413 has its own error class. It targets the same 2026-07 API as v9.0.0, and nothing is removed or renamed.

What's new

Integrated embedding in document indexes

Declare embed (dense) or sparseEmbed (sparse) on a string field, upsert plain text, and search with query text. Pinecone embeds documents and queries with the same hosted model. (guide, e06adb9)

import { Pinecone } from '@pinecone-database/pinecone';

const pc = new Pinecone();

// Declare a string field that Pinecone embeds for you.
await pc.indexes.create({
  name: 'articles',
  schema: { fields: { body: { type: 'string', embed: {} } } },
  waitUntilReady: true,
});

// Write plain-text documents; Pinecone embeds each body.
const documents = pc.index('articles').namespace('en').documents;
await documents.upsert({
  documents: [
    { _id: 'a1', body: 'Aqueducts carried water by gravity' },
    { _id: 'a2', body: 'The Colosseum seated 50,000 people' },
    { _id: 'a3', body: 'Hypocausts heated the public baths' },
  ],
});

// Search with plain text; Pinecone embeds the query too.
const results = await documents.search({
  scoreBy: [{ type: 'embed', field: 'body', query: 'how did Rome move water' }],
  topK: 2,
});
console.log(results.matches);
  • Choose a model with embed: { model: 'llama-text-embed-v2', dimension: 1024 }. Omitted keys use the model's defaults, and pc.indexes.describe reports the resolved configuration.
  • An embed or sparse_embed clause must be the only clause in scoreBy.
  • Send at most 96 documents per upsert or update, instead of the usual 1,000. Requests over a size limit throw Errors.PineconePayloadTooLargeError (see below).
  • Text is stored and indexed for full-text search by default. Set storeText: false to embed text without storing it. You can't return unstored fields or search them with text/query_string clauses.
  • Responses report embedding tokens in usage.embedTotalTokens.
  • New exported types: IntegratedEmbeddingStringField, CreateEmbedConfig, CreateSparseEmbedConfig, ResponseEmbedConfig, and ResponseSparseEmbedConfig.

Read responses report egress bytes

query, fetch, fetchByMetadata, listPaginated, searchRecords, and documents.search/fetch/list now report usage.egressBytes, the billed size of the response in bytes. The field is omitted when the server doesn't report it. (1e25972)

const result = await index.query({ topK: 5, vector: [0.1, 0.2, 0.3] });
console.log(result.usage?.egressBytes);

HTTP 413 has its own error class

HTTP 413 (Payload Too Large) now throws Errors.PineconePayloadTooLargeError, for example when an upsert sends more than 96 documents to an index with integrated embedding. Split the request into smaller batches and retry. (e40c44b)

Behavior changes

  • A 413 used to surface as Errors.PineconeUnmappedHttpError. If your code checks for that class to catch oversized requests, check for Errors.PineconePayloadTooLargeError instead. (e40c44b)

Fixes

  • Transient connection failures are retried. Requests that fail with TypeError: fetch failed and a cause of UND_ERR_SOCKET, UND_ERR_CONNECT_TIMEOUT, or UND_ERR_HEADERS_TIMEOUT now retry with the same backoff as 5xx responses. If retries run out, you still get PineconeConnectionError with the original error on cause. Other network errors, such as ENOTFOUND, and failures after response headers arrive aren't retried. Fixes #354. Thanks to @OsamaAnsar for #434. (155f537)
  • Legacy getters work with integrated embedding. model.dimension, model.metric, and model.vectorType now read from a string field's embed when it's the index's only dense vector, instead of throwing PineconeIndexPropertyError. (e40c44b)

Documentation

  • Indexes created with pc.indexes.createForModel are now called legacy integrated indexes, used through upsertRecords/searchRecords. They still work. For new projects, we recommend document indexes with embed/sparseEmbed. (466f4d3)
  • The README quickstart now uses integrated embedding on a document index.

Upgrading

npm install @pinecone-database/pinecone@^9.1.0

What's Changed

New Contributors

Full Changelog: v9.0.0...v9.1.0