Repository navigation
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_typecan be set, and only on a model that accepts it, such asgemini-embedding-2. The defaultllama-text-embed-v2takes 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 bypc.indexes.describe):retrieval_documentfields acceptretrieval_query,question_answering,fact_verification, andcode_retrieval_query.classification,clustering, andsentence_similarityfields accept only the same task.
- Validated by the API, not the SDK. Unknown keys, an incompatible
task_type, orparameterson a non-embedclause (includingsparse_embed) throwErrors.PineconeBadRequestError;error.messagesays 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
deploymentto 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(notmanagedorbyoc) throwsErrors.PineconeArgumentErrorbefore 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.describeandpc.indexes.list. - Omit it to use the model's default location.
- Only some models and plans can choose. See Processing locations.
- Not available on
sparseEmbedorpc.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.embedandpc.inference.rerank.integrated_index: a legacy integrated index frompc.indexes.createForModel.document_index: anembedorsparseEmbedfield 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.chatStreamandassistant.chatCompletionStreamdropped 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.0What's Changed
- fix: parse the final streamed event when it has no trailing newline by @OsamaAnsar in #446
- Regenerate core off of
2026-07to pull in latest changes by @austin-denoble in 594d400 - feat(documents): Support per-search
parameterson embedscore_byclauses, cross-region restore, andembed.processingLocationby @austin-denoble in 3bf07fa - Add
AGENTS.mdto repo by @austin-denoble in f77bf6a - build(deps-dev): dev dependency updates by @dependabot in b7765e2, 1ca3595, a046c75
Full Changelog: v9.1.0...v9.2.0