npm / algoliasearch
algoliasearch
What changed in algoliasearch 4 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
11 breaking2 security2 deprecations28 new APIs and options3 performance7 behavior and defaults1 tooling25 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initalgoliasearch 577 changes
Breaking changes 11
AlgoliaDisplayResultsToolConfig was renamed to AlgoliaGroupedResultsToolConfig.
AlgoliaRecommendToolConfigInput and AlgoliaRecommendToolConfigOutput were merged into AlgoliaRecommendToolConfig.
The body type changed from AgentCompletionRequest to AgentCompletionRequestUnion.
This memory request model was removed from the Agent Studio specs.
pValue is now optional in A/B test models, so code must not assume it is always present.
ToolConfig was renamed to ToolConfigOrBooleanUnion.
The migratedAbTestID field is removed from the A/B Testing V3 API, which may require changes to code using it.
Removed from Recommend fallback parameters because the API ignores it; code setting this field must be updated.
Removed from the Recommend request because the API ignores it; code setting this field must be updated.
The type field can no longer be updated through AuthenticationUpdate.
The baseRecommendRequest property was removed from the TrendingFacets model to reflect the API response.
Security 2
API keys are masked in ApiError stack traces, reducing the risk of exposing credentials.
Fixes an ingestion configuration leak.
Deprecations 2
The /2 A/B testing endpoints are deprecated; developers should use the newer A/B Testing API.
An empty-objects warning was added to replaceAllObjects, alerting developers when they call it with empty objects.
New APIs and options 28
External sources support algoliaDefined ordering.
Composition run requests support per-feed params.
The abtesting-v3 timeseries enum adds user metrics.
A/B test settings endpoints were added to abtesting-v3.
externalProvider was added as a source for the CompAPI client.
A/B testing hypothesis was added to the API.
resultCard was added to renderingContent widgets.
Agentic analytics support was added to the insights spec.
Analytics v3 pattern endpoints were added to the specs.
The ABTest schema in abtesting-v3 now includes decision (declared winner).
Support was added for Request-ID and Correlation-ID.
WithHTTPInfo methods are added to the JavaScript client, allowing developers to access HTTP information.
Agent Studio v1 was added to the clients.
A third fallback type was added to the search response union for responses without hits or facets.
Adds Algolia Index as a native connector in the ingestion client.
Adds feedsOrder to composition run parameters.
Adds query categorization support.
Introduces recommend as a source in the Composition API client.
Adds transformationOptions for configuring transformations.
An optional feedID was added to the composition result set.
Insights API event models now allow additional properties.
The code field can now be set in the AuthOAuth model.
The code field can now be set in the AuthOAuthPartial model.
Introduces multifeed composition behavior as a beta release.
Adds scope to rules.
Adds tags to rules.
Adds the useImagesObjects property to the commercetools source input.
The facets query parameter is now available at run time.
Performance 2
Caching performance was improved.
Responses are decompressed by the clients.
Behavior and default changes 7
The JavaScript client waits and retries after 429 responses according to the Retry-After header.
The default maxRetries value for replaceAllObjects increases from 100 to 800.
The default number of retries increased for customers with huge indices, and the number is now configurable for those who prefer to fail early.
Increases the default maximum retry count.
The clientId field is now optional in the AuthOAuth model.
The clientId field is now optional in the AuthOAuthPartial model.
The conditions field is no longer required in composition rules.
Tooling 1
CompositionBehavior is now a union type for more accurate typing.
Fixes and other changes 24
Clarifies that maxHitsPerQuery is a per-page limit, helping developers understand how the limit applies.
Requests send bodies with Content-Length instead of chunked encoding.
facetFilters is restored to recommend fallbackParameters, so developers can use it as a fallback parameter.
Fixed forwarding of batchSize in chunked push polling.
Fixed pagination for browseSynonyms.
Fixed forwarding of the polling offset in chunked push polling.
The getObjects response type now allows null records, matching API responses that can include them.
Agent Studio package updates were released.
Required parameters are checked for null instead of truthiness, so valid falsey values are not treated as missing.
The listIndices response schema now documents the abTest field.
The JavaScript HTTP requester now handles response stream errors.
The Ingestion API destination payload was updated, which may affect the payload developers send.
Fixes the push helper to smooth traffic.
Corrected package export paths for consistency, which may affect how developers import the package.
Removes a query parameter that the Composition API does not accept.
The deprecated condition field is included in rule schemas.
Corrects the generated getObject type so it has no generic type.
The invalid API format for multi-feed composition was fixed.
The rule consequence schema now includes the redirect property.
The params field is now optional because it is not always returned by the API.
The query field is now optional because it is not always returned by the API.
Fields in the Composition Run search response are no longer required in the client types because they are optional on the API side.
searchForHits now forwards requestOptions, allowing those options to be applied to the request.
Corrected the specifications for required ingestion search parameters.
algoliasearch 42 changes
Performance 1
Fixed caching performance issues.
Fixes and other changes 1
Always deletes the temporary index when replaceAllObjects runs.