Repository navigation
Python: fix VectorSearch.search overloads advertising vector_field_name - #14743
Open
alexcastgonz (pcbeingused333) wants to merge 1 commit into
Open
alexcastgonz (pcbeingused333) wants to merge 1 commit into
alexcastgonz (pcbeingused333) wants to merge 1 commit into
Conversation
The overloads declared a vector_field_name keyword while the implementation and the hybrid/keyword overloads use vector_property_name, so type checkers and IDEs suggested an argument that ends up ignored in **kwargs. Rename the overload parameter and docstrings, and add a signature test.
alexcastgonz (pcbeingused333)
deployed
to
github-app-auth
November 7, 2026 13:06 — with
GitHub Actions
Active
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the overload parameter-name correction and accompanying regression test.
No open issues 🎉
What changed in this PR
Corrects the advertised VectorSearch.search() signatures to match the existing vector_property_name runtime parameter, addressing the overload mismatch reported in #14740 without changing runtime behavior.
Changes:
- Renames the parameter and its documentation in both search overloads.
- Adds a regression test checking overload parameter names against the implementation.
| File | Description |
|---|---|
python/tests/unit/data/test_vector_search_base.py |
Adds overload-to-implementation parameter checks. |
python/semantic_kernel/data/vector.py |
Corrects both overload signatures and corresponding docstrings. |
Review effort: Balanced
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #14740
Root cause
The two
VectorSearch.search()@overloads declared avector_field_namekeyword, but the implementation (and the hybrid/keyword overloads) usevector_property_name. Callers following the advertised signature passedvector_field_name=..., which silently fell into**kwargsand was ignored, so the default vector field was used.Fix
Rename the parameter and docstrings in both overloads to
vector_property_name.Test
test_search_overloads_match_implementation_parametersinspects the overloads viatyping.get_overloads(fails before, passes after).Disclosure: this change was prepared with the assistance of an AI coding agent (Claude) and submitted by the account owner.