Skip to content

Release v6.0.0

Compare
Choose a tag to compare
@austin-denoble austin-denoble released this 10 May 01:00
· 6 commits to main since this release

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