Skip to content

Release v9.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 05 Nov 19:16

Same 2026-07 API as v9.1.0. Nothing removed or renamed, so existing code keeps working.

What's new

  • Per-search embedding parameters: choose how a query is embedded for one document search.
  • Cross-region restore: restore a serverless backup into another region of the same cloud.
  • US processing location: keep integrated embedding in the US.
  • ModelInfo.supportedOn: see where each hosted model can be used.
  • Fix: Assistant streams no longer drop their last event.

Per-search embedding parameters

An embed clause in documents.search takes a new parameters option. It overrides the field's readParameters for that search only, so you can embed a query for a task such as fact checking without changing the index. (guide, 3bf07fa)

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

const pc = new Pinecone();
const index = pc.index({ name: 'fact-checks', namespace: 'claims' });

// The body field embeds with gemini-embedding-2, which accepts task_type.
const results = await index.documents.search({
  scoreBy: [
    {
      type: 'embed',
      field: 'body',
      query: 'Is the Eiffel Tower taller than 300 m?',
      parameters: { task_type: 'fact_verification' },
    },
  ],
  topK: 5,
});
  • Only task_type can be set, and only on a model that accepts it, such as gemini-embedding-2. The default llama-text-embed-v2 takes none.
  • Allowed values: (await pc.inference.getModel(name)).supportedParameters.find((p) => p.parameter === 'task_type')?.allowedValues.
  • Must match the field's write task (embed.writeParameters.task_type, shown by pc.indexes.describe):
    • retrieval_document fields accept retrieval_query, question_answering, fact_verification, and code_retrieval_query.
    • classification, clustering, and sentence_similarity fields accept only the same task.
  • Validated by the API, not the SDK. Unknown keys, an incompatible task_type, or parameters on a non-embed clause (including sparse_embed) throw Errors.PineconeBadRequestError; error.message says why.

Restore a backup into another region

pc.backups.createIndex (and the deprecated pc.createIndexFromBackup) takes a new deployment option. (guide, 3bf07fa)

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

const pc = new Pinecone();
const backupId = '11450b9f-96e5-47e5-9186-03f346b1f385';

const { restoreJobId, indexId } = await pc.backups.createIndex(backupId, {
  name: 'articles-us-west-2',
  deployment: { deploymentType: 'managed', cloud: 'aws', region: 'us-west-2' },
});
  • Omit deployment to restore where the backup was taken, as before.
  • Not every source region supports it yet. Those throw Errors.PineconeFailedPreconditionError (HTTP 412).
  • No cross-cloud or serverless-to-BYOC restores. A BYOC backup restores only into its own environment: { deploymentType: 'byoc', environment: '...' }.
  • Bad deploymentType (not managed or byoc) throws Errors.PineconeArgumentError before any request is sent.
  • Type exported: RestoreDeploymentRequest.

Keep integrated embedding in the US

embed on a string field takes a new processingLocation option, such as 'us'. (guide, 3bf07fa)

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

const pc = new Pinecone();

await pc.indexes.create({
  name: 'articles',
  schema: {
    fields: {
      body: {
        type: 'string',
        embed: { model: 'text-embedding-3-large', processingLocation: 'us' },
      },
    },
  },
});
  • Applies to writes and queries, and is fixed when the index is created.
  • Reported by pc.indexes.describe and pc.indexes.list.
  • Omit it to use the model's default location.
  • Only some models and plans can choose. See Processing locations.
  • Not available on sparseEmbed or pc.indexes.createForModel.

See where each hosted model can be used

ModelInfo, from pc.inference.getModel and pc.inference.listModels, has a new supportedOn field (undefined when the API doesn't report it). (guide, 594d400)

  • standalone_inference: pc.inference.embed and pc.inference.rerank.
  • integrated_index: a legacy integrated index from pc.indexes.createForModel.
  • document_index: an embed or sparseEmbed field in a document index schema.
import { Pinecone } from '@pinecone-database/pinecone';

const pc = new Pinecone();

const model = await pc.inference.getModel('gemini-embedding-2');
if (model.supportedOn?.includes('document_index')) {
  console.log('usable in a document index schema');
}

Fixes

  • Assistant streams keep their last event. assistant.chatStream and assistant.chatCompletionStream dropped the final event when the server sent it without a trailing newline. Thanks to @OsamaAnsar for #446.

Upgrading

npm install @pinecone-database/pinecone@^9.2.0

What's Changed

Full Changelog: v9.1.0...v9.2.0