Skip to content

refactor: replace ai library with a lightweight implem#6880

Merged
aymeric-giraudet merged 5 commits intomasterfrom
refactor/replace-ai-lib
Jan 30, 2026
Merged

refactor: replace ai library with a lightweight implem#6880
aymeric-giraudet merged 5 commits intomasterfrom
refactor/replace-ai-lib

Conversation

@aymeric-giraudet
Copy link
Member

@aymeric-giraudet aymeric-giraudet commented Jan 28, 2026

Summary

Result

Implemented as a lighter drop-in replacement.

instantsearch.js's getting-started bundle size was reduced from 343kb to 170kb !

One downside is, as the ai lib was also used for types in instantsearch-ui-components, we have to copy the types there as well to avoid circular dependencies.

fixes #6798

@aymeric-giraudet aymeric-giraudet requested review from a team, Haroenv and shaejaz and removed request for a team January 28, 2026 16:32
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 28, 2026

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7855833:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration

Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

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

we can lower the bundlesize limits again

@Haroenv
Copy link
Contributor

Haroenv commented Jan 30, 2026

@aymeric-giraudet looks like we had some tests that ensured chat was not enabled in UMD that now need to be updated

@aymeric-giraudet aymeric-giraudet merged commit bdcb2b1 into master Jan 30, 2026
14 checks passed
@aymeric-giraudet aymeric-giraudet deleted the refactor/replace-ai-lib branch January 30, 2026 14:04
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.

React Native build issues due to ai dependency

2 participants