Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Inference has new APIs which were made available in
2025-04
. These allow for listing and describing available models hosted by Pinecone.Solution
Inference
class to better align with other classes used in a similar way such asIndex
andPinecone
. I broke out all inference actions into individual files / functions:embed.ts
andrerank.ts
. I think a lot of this was implemented rather quickly initially, so I've done a bunch of cleanup while I was in here adding new methods.getModel.ts
andlistModels.ts
files/functions. These are called and documented insideInference
.embed
andrerank
. Basically just standardized to how we do mocking / testing elsewhere. They were a bit awkward.getModel
,listModels
, along with an integration test file.Type of Change
Test Plan
CI - external test, unit tests, integration tests
To test this you can pull this branch down, and run the repl locally:
from
pinecone-ts-client
root: