Phase 2A: Response Adapter Consolidation #600
Merged
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.
Summary
pinecone/adapters/module for OpenAPI response transformationsparse_query_responsefunctions from 4+ files into singleadapt_query_response()adapt_upsert_response()andadapt_fetch_response()adaptersTest plan
Resolves: SDK-274
Made with Cursor
Note
Medium Risk
Touches core data-plane response transformation for
query,fetch, and async upsert results; behavior should be unchanged but any mismatch in adapter logic could affect returned dataclasses or response metadata across clients.Overview
Consolidates OpenAPI→SDK response parsing into a new
pinecone/adapterslayer. Addsadapt_query_response,adapt_fetch_response, andadapt_upsert_response, plus anUpsertResponseTransformerwrapper for asyncApplyResult.Updates sync/async index and vector resources to use these shared adapters and replaces duplicated parsing code, while keeping existing
parse_query_responseas deprecated pass-through wrappers for backward compatibility.Adds unit test coverage and new OpenAPI response fixtures to validate adapter behavior (namespace handling, usage, deprecated field cleanup, and response metadata extraction).
Written by Cursor Bugbot for commit 716b744. This will update automatically on new commits. Configure here.