Skip to content

Fix breaking changes from v3.7.0 release #321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jul 23, 2025
Merged

Conversation

bevzzz
Copy link
Collaborator

@bevzzz bevzzz commented Jul 21, 2025

We've made a number of breaking changes in the v3.7.0 release, which we're going to deprecate in favor of v3.8.0.
This PR brings back removed exports and deprecates vectorizeCollectionName parameter for all vectorizer modules where it has previously been accepted. See comment on legacyVectors for more details.

Copy link

@orca-security-eu orca-security-eu bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

Comment on lines +878 to +892
/** Legacy export, maintained for backwards compatibility.
* See the comment for `legacyVectors`.
* @deprecated Use `vectors` instead. */
export const vectorizer = legacyVectors;
Copy link
Collaborator Author

@bevzzz bevzzz Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we revert this breaking change: vectorizer was an exported member, and even though we advertise its usage via configure.vectorizer, renaming it in this module is likely breaking.

*
* */
// eslint-disable-next-line @typescript-eslint/naming-convention
const __vectors_shaded = {
Copy link
Collaborator Author

@bevzzz bevzzz Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously I tried doing some smart type hocus-pocus, but couldn't pull it off at the end: ModuleConfig part of ConfigureNonTextVectorizerOptions was loosing part of its generic type information.

I went with a simpler, albeit more verbose, solution. Keeping all pre-existing types intact, this simply overrides a selection of functions in vectors.

@bevzzz bevzzz changed the title wip: exclude 'vectorizeCollectionName' from arguments Exclude 'vectorizeCollectionName' from configure.vectors factories Jul 21, 2025
@bevzzz bevzzz force-pushed the chore/vector-syntax-amendments branch from 58a846f to dabfd0e Compare July 21, 2025 14:59
@bevzzz bevzzz marked this pull request as ready for review July 21, 2025 15:05
@bevzzz bevzzz force-pushed the chore/vector-syntax-amendments branch from ffd923f to 339dba7 Compare July 21, 2025 16:18
? {
...config,
// Only create modelId key if either config.model or config.modelId are defined.
...(config?.modelId || config?.model ? { modelId: config?.model ?? config?.model } : undefined),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This syntax is fairly dense. My intention was to copy the model name into the modelId variable (for b/c) but preserve the previous behavior for config === undefined

@bevzzz bevzzz changed the title Exclude 'vectorizeCollectionName' from configure.vectors factories Fix breaking changes from v3.7.0 release Jul 21, 2025
Copy link

@malgamves malgamves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I need to look a little more into the vectorizeCollectionName issue but we should be good to go.

Minor release on the branch?

@bevzzz bevzzz requested a review from a team as a code owner July 21, 2025 16:57
@bevzzz bevzzz force-pushed the chore/vector-syntax-amendments branch from 977c2c3 to 98aefb1 Compare July 22, 2025 11:47
@bevzzz bevzzz force-pushed the chore/vector-syntax-amendments branch from ea53dd2 to 39c6572 Compare July 22, 2025 13:40
@bevzzz bevzzz merged commit 7d68378 into main Jul 23, 2025
18 checks passed
@bevzzz bevzzz deleted the chore/vector-syntax-amendments branch July 23, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants