Skip to content

Releases: pinecone-io/pinecone-ts-client

Release v7.1.0

19 Feb 19:39

Choose a tag to compare

This release adds support for creating and configuring index readCapacity for BYOC indexes.

// Create a BYOC index with dedicated read capacity
await pinecone.createIndex({
  name: 'my-byoc-index',
  dimension: 1536,
  metric: 'cosine',
  spec: {
    byoc: {
      environment: 'aws-us-east-1-b921',
      readCapacity: {
        mode: 'Dedicated',
        nodeType: 'b1',
        manual: { replicas: 1, shards: 1 },
      },
    },
  },
});

It also includes support for maxCandidates and scanFactor in the Index.query operation. This parameter is only supported for dedicated (DRN) dense indexes:

const results = await index.query({
  vector:[0.6, 0.2, 0.4, 0.7, 0.9],
  topK: 10,
  scanFactor: 2.0,
  maxCandidates: 500,
});

What's Changed

Full Changelog: v7.0.0...v7.1.0

Release v7.0.0

01 Feb 00:15

Choose a tag to compare

Release v7.0.0

This version of the Pinecone Node SDK depends on version 2025-10 of the Pinecone API. You can read more about versioning here. This v7 SDK release line should continue to receive fixes as long as the 2025-10 API version is in support.

Breaking Changes

Index Targeting

The preferred way to target an index has changed. You must now pass an options object to pc.index() instead of string arguments.

Old (v6):

const index = pc.index('my-index');
// or
const index = pc.index('my-index', 'https://my-index-abc123.svc.pinecone.io');

New (v7):

// Recommended: Target by host (most explicit)
const indexModel = await pc.describeIndex('my-index');
const index = pc.index({ host: indexModel.host });

// Alternative: Target by name (requires additional lookup)
const index = pc.index({ name: 'my-index' });

// Legacy string syntax still works but is deprecated
const index = pc.index('my-index'); // Will be removed in v8

Operation-Level Namespace Arguments

Many data plane operations now accept namespace as an operation-level parameter, allowing you to override the default namespace:

const index = pc.index({ host: indexModel.host });

// Override namespace per operation
await index.upsert({
  namespace: 'ns1',
  records: [{ id: '1', values: [0.1, 0.2] }],
});

await index.query({
  namespace: 'ns2',
  vector: [0.1, 0.2],
  topK: 10,
});

Object-Shaped Arguments

Most operations now use object-shaped arguments for better clarity and extensibility. Methods now accept an options object instead of positional parameters.

Method Signature Changes

Control Plane:

  • configureIndex(indexName, options)configureIndex({ name, podReplicas?, podType?, readCapacity?, deletionProtection?, tags?, embed? })

Data Plane:

  • index.upsert(records[])index.upsert({ records, namespace? })
  • index.upsertRecords(records[])index.upsertRecords({ records, namespace? })
  • index.deleteOne(id)index.deleteOne({ id, namespace? })
  • index.deleteMany(ids[] | filter)index.deleteMany({ ids?, filter?, namespace? })
  • index.deleteAll()index.deleteAll({ namespace? })
  • index.startImport(uri, errorMode?, integration?)index.startImport({ uri, errorMode?, integration? })
  • index.listNamespaces(limit?, paginationToken?)index.listNamespaces({ limit?, paginationToken? })

Migration Example

// v6
await pc.configureIndex('my-index', { spec: { pod: { replicas: 2 } } });
await index.upsert([{ id: '1', values: [0.1, 0.2] }]);
await index.deleteOne('record-1');
await index.deleteMany(['id-1', 'id-2']);
await index.startImport('s3://bucket/data', 'continue', 's3');

// v7
await pc.configureIndex({ name: 'my-index', podReplicas: 2 });
await index.upsert({ records: [{ id: '1', values: [0.1, 0.2] }] });
await index.deleteOne({ id: 'record-1' });
await index.deleteMany({ ids: ['id-1', 'id-2'] });
await index.startImport({ uri: 's3://bucket/data', errorMode: 'continue', integration: 's3' });

Node.js and TypeScript Version Requirements

  • Node.js: Minimum version increased from >=18.0.0 to >=20.0.0
  • TypeScript: Updated from ^4.9.5 to ~5.6.3
  • The SDK is now compatible with TypeScript >=5.2.0 (previously >=4.x)

Strict Validation Removed

The SDK no longer performs strict validation of object properties and enum values:

  • Unknown properties in request objects are no longer rejected
  • Enum values are provided for convenience but string values are accepted
  • This improves forward compatibility with API changes

Features

Dedicated Read Nodes (Read Capacity)

Serverless indexes now support dedicated read nodes for improved read performance. Configure read capacity when creating or updating an index:

await pc.createIndex({
  name: 'my-index',
  dimension: 1536,
  metric: 'cosine',
  spec: {
    serverless: {
      cloud: 'gcp',
      region: 'us-central1',
      readCapacity: {
        mode: 'Dedicated',
        nodeType: 't1',
        manual: {
          shards: 2,
          replicas: 2,
        },
      },
    },
  },
});

// Update read capacity on existing index
await pc.configureIndex({
  name: 'my-index',
  readCapacity: {
    mode: 'Dedicated',
    nodeType: 't1',
    manual: {
      shards: 4,
      replicas: 3,
    },
  },
});

Learn more in the Dedicated Read Nodes documentation.

BYOC (Bring Your Own Cloud) Support

Create indexes in your own cloud infrastructure:

await pc.createIndex({
  name: 'byoc-index',
  dimension: 1536,
  spec: {
    byoc: {
      environment: 'us-east-1-aws',
    },
  },
});

See the Bring Your Own Cloud documentation for more information.

Index Metadata Schema

Configure which metadata fields are indexed for filtering, improving performance for large-scale deployments:

await pc.createIndex({
  name: 'my-index',
  dimension: 1536,
  spec: {
    serverless: {
      cloud: 'aws',
      region: 'us-east-1',
      schema: {
        fields: {
          genre: { filterable: true },
          year: { filterable: true },
          // Other fields won't be indexed for filtering
        },
      },
    },
  },
});

Fetch by Metadata

Retrieve records based on metadata filters without providing vector IDs:

const results = await index.fetchByMetadata({
  filter: { genre: { $eq: 'drama' } },
  limit: 100,
});

console.log(results.records);
// Paginate through results
if (results.pagination?.next) {
  const nextPage = await index.fetchByMetadata({
    filter: { genre: { $eq: 'drama' } },
    paginationToken: results.pagination.next,
  });
}

Update by Metadata Filter

The update() method now supports updating multiple records at once using metadata filters. You can update metadata for all records matching a filter:

// Update metadata for all records matching a filter
await index.update({
  filter: { genre: { $eq: 'drama' } },
  metadata: { reviewed: true, lastUpdated: '2026-01-31' },
});

// Update metadata for records in a specific year range
await index.update({
  filter: { year: { $gte: 2020 } },
  metadata: { category: 'recent' },
});

Note: When using filter, you cannot also specify id. Use either id for single record updates or filter for bulk updates.

Create Namespace

Explicitly create namespaces with optional metadata schemas:

await index.createNamespace({
  name: 'my-namespace',
  schema: {
    fields: {
      category: { filterable: true },
      price: { filterable: true },
    },
  },
});

// List namespaces with pagination
const namespaces = await index.listNamespaces({ limit: 100 });
if (namespaces.pagination?.next) {
  const nextPage = await index.listNamespaces({
    paginationToken: namespaces.pagination.next,
  });
}

Assistant Multimodal Support

Pinecone Assistant now supports multimodal processing for PDF files. When enabled, the assistant can extract and understand images, charts, and diagrams embedded within PDFs:

const assistant = pc.assistant({ name: 'my-assistant' });

// Upload a PDF with multimodal processing enabled
await assistant.uploadFile({
  path: 'quarterly-report-with-charts.pdf',
  multimodal: true, // Extract and process images from the PDF
  metadata: {
    document_type: 'financial_report',
    quarter: 'Q4',
    year: 2024,
  },
});

// Chat with the assistant - it can now reference visual content
const response = await assistant.chat({
  messages: [
    {
      role: 'user',
      content: 'What trends are shown in the revenue chart?',
    },
  ],
  contextOptions: {
    multimodal: true, // Include image-related context snippets
    includeBinaryContent: true, // Include base64 image data
  },
});

// Request context with image-related snippets
const context = await assistant.context({
  query: 'revenue trends',
  multimodal: true,
  includeBinaryContent: true,
});

When multimodal: true is set during upload, the assistant will:

  • Extract images, charts, and diagrams from the PDF
  • Generate captions for visual content
  • Enable answering questions about visual elements
  • Allow retrieval of image-related context snippets

Assistant Evaluate Operation

Evaluate assistant responses for quality and relevance:

const evaluation = await pc.evaluate({
  question: 'What is the capital of France?',
  answer: 'The capital of France is Paris.',
  groundTruth: 'Paris is the capital and most populous city of France.',
});

console.log(evaluation);
// Returns alignment metrics for the answer quality

Improvements

Automatic Retry Logic

All operations now include retry logic by default with exponential backoff. Retries are automatically performed for server errors (5xx) and can be configured:

const pc = new Pinecone({
  apiKey: 'your-api-key',
  maxRetries: 5, // Default is 3 (1 initial request + 3 retries)
});

// Disable retries entirely
const pcNoRetry = new Pinecone({
  apiKey: 'your-api-key',
  maxRetries: 0, // Only initial request, no retries
});

Enhanced Testing

  • Significantly improved integration test performance and organization
  • Added local integration test runner for easier development: npm run test:integration:local
  • Expanded unit test coverage across control plane and data plane operations
  • Improved test setup and teardown utilities

...

Read more

Release v6.1.4

22 Jan 20:19

Choose a tag to compare

What's changed

This patch release adds an optional configuration that can allow AI coding agents working with the SDK to identify themselves. This information is incorporated into request User-Agent headers to help us track how our product is being used.

const pc = new Pinecone({
   apiKey: 'your-api-key',
   caller: {
     provider: 'google',
     model: 'gemini'
   }
});

Full Changelog: v6.1.3...v6.1.4

v6.1.3

03 Nov 20:34

Choose a tag to compare

This release fixes a bug in Assistant.listFiles() when using a filter - there's no need to provide a top-level metadata key inside of the filter object.

What's Changed

New Contributors

Full Changelog: v6.1.2...v6.1.3

Release v6.1.2

22 Jul 18:09

Choose a tag to compare

Assistant.describeFile now exposes includeUrl as an optional argument, and it will default to true if not provided. sourceCollection is also now exposed on CreateIndexServerlessSpec and IndexModel.

What's Changed

  • Expose includeUrl in Assistant.describeFile, add sourceCollection for serverless by @austin-denoble in #349

Full Changelog: v6.1.1...v6.1.2

Release v6.1.1

14 Jun 20:28

Choose a tag to compare

What's Changed

  • Regenerate core, expose privateHost on IndexModel, and temperature on ChatOptions and ChatCompletionOptions by @austin-denoble in #348

Full Changelog: v6.1.0...v6.1.1

Release v6.1.0

01 Jun 18:54

Choose a tag to compare

This release adds a new ChatContextOptions type which allows passing contextOptions in ChatOptions when calling chat or chatStream. ChatContextOptions supports passing topK and snippetSize. There have also been fixes made to context and chat methods to fix issues with argument parameters not being properly passed with the requests.

What's Changed

Full Changelog: v6.0.1...v6.1.0

Release v6.0.1

20 May 05:11

Choose a tag to compare

This patch fixes an issue with the listBackups method not applying pagination to project-level operations. There have also been additional types exported from the top of the package for working with backups and inference models.

What's Changed

Full Changelog: v6.0.0...v6.0.1

Release v6.0.0

10 May 01:00

Choose a tag to compare

This version of the Pinecone Node SDK depends on version 2025-04 of the Pinecone API. You can read more about versioning here. This v6 SDK release line should continue to receive fixes as long as the 2025-04 API version is in support.

Features

Namespaces

You now have the ability to work more explicitly with namespaces that are associated with an index. There have been several namespace methods added to the Index class:

import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone();
const index = pc.index('my-index');

// list all namespaces
const namespacesResp = await index.listNamespaces();

// describe a namespace
const namespace = await index.describeNamespace('ns1');

// delete a namespace (including all record data)
await index.deleteNamespace('ns1');

Backups and Restore Jobs

You can now create and manage backups of serverless indexes. It is a static, non-queryable copy of an index that represents a set of records. You can create a backup of a serverless index, and you can create a new serverless index from a backup. You can read more about backups here.

import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone();

// create a backup of an existing index
const backup = await pc.createBackup({
  indexName: 'my-index',
  name: 'my-index-backup-1',
  description: 'weekly backup',
});

// describe a backup
const backupDesc = await pc.describeBackup(backup.backupId);
console.log(backupDesc);
// {
//   backupId: '11450b9f-96e5-47e5-9186-03f346b1f385',
//   sourceIndexName: 'my-index',
//   sourceIndexId: 'b480770b-600d-4c4e-bf19-799c933ae2bf',
//   name: 'my-index-backup-1',
//   description: 'weekly backup',
//   status: 'Initializing',
//   cloud: 'aws',
//   region: 'us-east-1',
//   dimension: 1024,
//   metric: 'cosine',
//   recordCount: 500,
//   namespaceCount: 4,
//   sizeBytes: 78294,
//   tags: {},
//   createdAt: '2025-05-07T03:11:11.722238160Z'
// }

// list all existing backups for the project
const projectBackups = await pc.listBackups();

// list all existing backups for a specific index in the project
const indexBackups = await pc.listBackups({ indexName: 'my-index' });

// create a new index from a backup, which initiates a restore job
const response = await pc.createIndexFromBackup({
  backupId: backup.backupId,
  name: 'my-index-restore-1',
});
console.log(response);
// {
//   restoreJobId: '4d4c8693-10fd-4204-a57b-1e3e626fca07',
//   indexId: 'deb7688b-9f21-4c16-8eb7-f0027abd27fe'
// }

// check on the progress of your index restoration
const restoreJob = await pc.describeRestoreJob(response.restoreJobId);
console.log(restoreJob);
//     {
//       restoreJobId: '4d4c8693-10fd-4204-a57b-1e3e626fca07',
//       backupId: '11450b9f-96e5-47e5-9186-03f346b1f385',
//       targetIndexName: 'my-index-restore-1',
//       targetIndexId: 'deb7688b-9f21-4c16-8eb7-f0027abd27fe',
//       status: 'Completed',
//       createdAt: 2025-05-07T03:38:37.107Z,
//       completedAt: 2025-05-07T03:40:23.687Z,
//       percentComplete: 100
//     }

Inference Models

You can now use the Inference class to browse models hosted by Pinecone, including detailed configuration options for each model.

List all available models:

const models = await pc.inference.listModels();
console.log(models);
// {
//   models: [
//     {
//       model: 'llama-text-embed-v2',
//       shortDescription: 'A high performance dense embedding model optimized for multilingual and cross-lingual text question-answering retrieval with support for long documents (up to 2048 tokens) and dynamic embedding size (Matryoshka Embeddings).',
//       type: 'embed',
//       vectorType: 'dense',
//       defaultDimension: 1024,
//       modality: 'text',
//       maxSequenceLength: 2048,
//       maxBatchSize: 96,
//       providerName: 'NVIDIA',
//       supportedDimensions: [Array],
//       supportedMetrics: [Array],
//       supportedParameters: [Array]
//     },
//     ...
//     {
//       model: 'pinecone-rerank-v0',
//       shortDescription: 'A state of the art reranking model that out-performs competitors on widely accepted benchmarks. It can handle chunks up to 512 tokens (1-2 paragraphs)',
//       type: 'rerank',
//       vectorType: undefined,
//       defaultDimension: undefined,
//       modality: 'text',
//       maxSequenceLength: 512,
//       maxBatchSize: 100,
//       providerName: 'Pinecone',
//       supportedDimensions: undefined,
//       supportedMetrics: undefined,
//       supportedParameters: [Array]
//     }
//   ]
// }

Check details for a single model:

const model = await pc.inference.getModel('pinecone-sparse-english-v0');
console.log(model);
// {
//   model: 'pinecone-sparse-english-v0',
//   shortDescription: 'A sparse embedding model for converting text to sparse vectors for keyword or hybrid semantic/keyword search. Built on the innovations of the DeepImpact architecture.',
//   type: 'embed',
//   vectorType: 'sparse',
//   defaultDimension: undefined,
//   modality: 'text',
//   maxSequenceLength: 512,
//   maxBatchSize: 96,
//   providerName: 'Pinecone',
//   supportedDimensions: undefined,
//   supportedMetrics: [ 'DotProduct' ],
//   supportedParameters: [
//     {
//       parameter: 'input_type',
//       type: 'one_of',
//       valueType: 'string',
//       required: true,
//       allowedValues: [Array],
//       min: undefined,
//       max: undefined,
//       _default: undefined
//     },
//     {
//       parameter: 'truncate',
//       type: 'one_of',
//       valueType: 'string',
//       required: false,
//       allowedValues: [Array],
//       min: undefined,
//       max: undefined,
//       _default: 'END'
//     },
//     {
//       parameter: 'return_tokens',
//       type: 'any',
//       valueType: 'boolean',
//       required: false,
//       allowedValues: undefined,
//       min: undefined,
//       max: undefined,
//       _default: false
//     }
//   ]
// }

What's Changed

Full Changelog: v5.1.2...v6.0.0

v5.1.2

23 Apr 21:21

Choose a tag to compare

This patch corrects an issue with runtime validation and TypeScript types not allowing the embed parameter in ConfigureIndexRequest. Several dev dependencies for jest have also been updated, along with some tweaks to the integration test suite to prevent hangs in CI.

What's Changed

Full Changelog: v5.1.1...v5.1.2