Skip to content

Release v7.0.0

Choose a tag to compare

@austin-denoble austin-denoble released this 01 Feb 00:15

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

Documentation Refactor

The README has been refactored into a comprehensive guides structure:

  • Index Management: Serverless indexes, pod indexes, collections, backups, shared operations
  • Data Operations: Working with vectors, namespaces, metadata filtering, bulk import
  • Inference: Inference API, integrated inference
  • Assistant: Getting started, chat operations, file management
  • TypeScript Features: Type safety, async patterns, error handling

All guides include improved code examples and links to relevant documentation.

What's Changed

  • Regenerate core for 2025-10 by @austin-denoble in #357
  • Implement Dedicated Read Nodes and BYOC Indexes by @austin-denoble in #358
  • Implement index metadata schema, fetch by metadata, update by metadata, and create namespace by @austin-denoble in #361
  • chore: Add some configuration for cursor bugbot by @jhamon in #365
  • Refactor Release Workflows to Use npm Trusted Publishing by @jhamon in #367
  • Add branch/SHA support to release workflow by @jhamon in #368
  • Add caller configuration to User-Agent header by @jhamon in #359
  • Adjust node version in release workflow by @jhamon in #369
  • Fix: Release workflow tagging and docs by @jhamon in #370
  • Create draft release notes by @jhamon in #371
  • Refactor RetryOnServerFailure -> createRetryingFetch, Remove strict ValidateObjectProperties utility by @austin-denoble in #366
  • Update to node v20.x / typescript v5.6.3 by @austin-denoble in #372
  • Unify operations around object shaped arguments, allow operation-level namespace arguments for data plane by @austin-denoble in #373
  • [2025-10][Assistant] Expose evaluate, add multimodal support in uploadFile, context, and chat by @austin-denoble in #374
  • Refactor README.md for 2025-10, fix build-and-publish-docs workflow by @austin-denoble in #375
  • Small tweak to top-level README by @austin-denoble in #376

Full Changelog: v6.1.3...v7.0.0

Contributors