Remove deprecated rerank models #566
Draft
+9
−15
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.
Remove Deprecated Rerank Models
Problem
Support for two rerank models (
cohere-rerank-3.5andpinecone-rerank-v0) is being removed from the Pinecone Inference API. These models are no longer available and should be removed from the SDK to prevent confusion and ensure users only see supported models.Solution
Removed the deprecated rerank models from the SDK by:
Cohere_Rerank_3_5andPinecone_Rerank_V0enum values from theRerankModelenumbge-reranker-v2-m3)Changes
pinecone/inference/inference_request_builder.pyCohere_Rerank_3_5 = "cohere-rerank-3.5"fromRerankModelenumPinecone_Rerank_V0 = "pinecone-rerank-v0"fromRerankModelenumpinecone/inference/inference.pyrerank()docstring example to use"bge-reranker-v2-m3"instead of"pinecone-rerank-v0"rerank()enum example to useRerankModel.Bge_Reranker_V2_M3instead ofRerankModel.PINECONE_RERANK_V0get_model()docstring example to use"bge-reranker-v2-m3"instead of"pinecone-rerank-v0"pinecone/inference/inference_asyncio.pyrerank()docstring example to use"bge-reranker-v2-m3"instead of"pinecone-rerank-v0"rerank()enum example to useRerankModel.Bge_Reranker_V2_M3instead ofRerankModel.PINECONE_RERANK_V0docs/upgrading.md"bge-reranker-v2-m3"instead of"pinecone-rerank-v0"pyproject.tomltarget-version = "8.0.0"totarget-version = "py310"[tool.black]section (ruff handles formatting)Impact
User-Facing Impact
BREAKING CHANGE: Code that uses
RerankModel.Cohere_Rerank_3_5orRerankModel.PINECONE_RERANK_V0will fail with anAttributeError. Users must migrate toRerankModel.Bge_Reranker_V2_M3or pass the model name as a string.Migration Path:
RerankModel.Cohere_Rerank_3_5withRerankModel.Bge_Reranker_V2_M3or"bge-reranker-v2-m3"RerankModel.PINECONE_RERANK_V0withRerankModel.Bge_Reranker_V2_M3or"bge-reranker-v2-m3""cohere-rerank-3.5"and"pinecone-rerank-v0") will still work if passed directly, but these models are deprecated and may not be available on the APIExample Usage
Before (will break):
After (correct):
Breaking Changes
YES - This is a breaking change. The following enum values have been removed:
RerankModel.Cohere_Rerank_3_5RerankModel.PINECONE_RERANK_V0Code using these enum values will raise
AttributeErrorat runtime. Users must update their code to useRerankModel.Bge_Reranker_V2_M3or pass model names as strings.