PineconeVector not assignable to MastraVector<VectorFilter> in Mastra configuration

Hi, I’m not sure if this is intended or a bug, but passing a PineconeVector instance into the main Mastra instance under vectors throws this TypeScript error:
Type 'PineconeVector' is not assignable to type 'MastraVector<VectorFilter>'.
Type 'PineconeVector' is not assignable to type 'MastraVector<VectorFilter>'.
Original Code:
import { Mastra } from "@mastra/core/mastra";
import { PineconeVector } from "@mastra/pinecone";

import { supervisorAgent } from "#/mastra/agents/supervisor-agent";

const pineconeVector = new PineconeVector({
apiKey: process.env.PINECONE_API_KEY || "",
});

export const mastra = new Mastra({
agents: { supervisorAgent },
vectors: { pineconeVector }, // Error here
});
import { Mastra } from "@mastra/core/mastra";
import { PineconeVector } from "@mastra/pinecone";

import { supervisorAgent } from "#/mastra/agents/supervisor-agent";

const pineconeVector = new PineconeVector({
apiKey: process.env.PINECONE_API_KEY || "",
});

export const mastra = new Mastra({
agents: { supervisorAgent },
vectors: { pineconeVector }, // Error here
});
Right now, the only way I got it working was by forcing a type assertion. It works at runtime and the queryVectorTool doesn’t complain, but the whole thing feels hacky and I’m not sure if this is actually correct or if PineconeVector is just missing something. Workaround:
import { Mastra } from "@mastra/core/mastra";
import { type MastraVector } from "@mastra/core/vector";
import { PineconeVector } from "@mastra/pinecone";

import { supervisorAgent } from "#/mastra/agents/supervisor-agent";

const pineconeVector = new PineconeVector({
apiKey: process.env.PINECONE_API_KEY || "",
}) as MastraVector;

export const mastra = new Mastra({
agents: { supervisorAgent },
vectors: { pineconeVector },
});
import { Mastra } from "@mastra/core/mastra";
import { type MastraVector } from "@mastra/core/vector";
import { PineconeVector } from "@mastra/pinecone";

import { supervisorAgent } from "#/mastra/agents/supervisor-agent";

const pineconeVector = new PineconeVector({
apiKey: process.env.PINECONE_API_KEY || "",
}) as MastraVector;

export const mastra = new Mastra({
agents: { supervisorAgent },
vectors: { pineconeVector },
});
Question: Is this just a typing mismatch on the @mastra/pinecone side (i.e., PineconeVector not implementing MastraVector properly), or is the expected usage different? Package Versions:
"@mastra/core": "^0.24.1"
"@mastra/pinecone": "^0.11.16"
"@mastra/core": "^0.24.1"
"@mastra/pinecone": "^0.11.16"
4 Replies
Mastra Triager
GitHub
PineconeVector not assignable to MastraVector<VectorFilter> in Mast...
This issue was created from Discord post 1439505969091711098: Hi, I’m not sure if this is intended or a bug, but passing a PineconeVector instance into the main Mastra instance under vectors throws...
Abhi Aiyer
Abhi Aiyer4w ago
Hi @kareulo, we had an issue in the vector type. PR here https://github.com/mastra-ai/mastra/issues/10144 Thanks for reporting this!
GitHub
PineconeVector not assignable to MastraVector<VectorFilter> in Mast...
This issue was created from Discord post 1439505969091711098: Hi, I’m not sure if this is intended or a bug, but passing a PineconeVector instance into the main Mastra instance under vectors throws...
kareulo
kareuloOP4w ago
Thank you! When is the expected date this will be released if you don't mind me asking?
Abhi Aiyer
Abhi Aiyer4w ago
Should be released today in 0.x and 1.0.0-beta versions

Did you find this page helpful?