Repository navigation
Add configurable AI search with a BM-backed Gateway auth client - #4086
Draft
chintandesai-cimulate wants to merge 6 commits into
Draft
chintandesai-cimulate wants to merge 6 commits into
chintandesai-cimulate wants to merge 6 commits into
Conversation
|
Git2Gus App is installed but the |
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
chintandesai-cimulate
force-pushed
the
codex/configurable-ai-search
branch
from
November 3, 2026 03:23
96f9ff4 to
5adb464
Compare
This branch has not been 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.
Description
Make AI-assisted storefront search configurable globally or per site, with product-first results, streamed overviews, grounded follow-ups, and Commerce Agent context handoff. All sites default to the existing search experience. Overview copy presents highlighted products as examples and invites shoppers to browse the full results below, without announcing a fixed number of options.
Use Business Manager as the ECA credential owner.
LLM_GATEWAY_AUTH_MODE=ecanow selects a server-only consumer of an ECOM token broker. PWA authenticates as a dedicated Account Manager machine client and receives only a short-lived Gateway JWT; the ECA client ID, secret, and My Domain remain in BM. The workingapi_keypath remains the default. Local ECA secrets require the expliciteca_directdevelopment mode.Required platform dependency: this PR implements the PWA consumer and documents the companion ECOM broker contract. The proposed native endpoint and
sfcc.llm-authscope are not currently shipped capabilities and are not implemented by this PR. They must be implemented/deployed and authorized before BM-backed ECA can be enabled. Cartridge scripts cannot access the internal BM credential, and no credential-export or shopper-accessible token route is introduced.Types of Changes
Changes
app.searchSummarydefaults andapp.sites[].searchSummaryoverrides for enablement, header search, homepage hero/copy/artwork, follow-ups, and agent handoff. Enforce site flags server-side before paid work; feature-off startup requires no Gateway credentials.packages/template-retail-react-app/docs/BM-ECA-TOKEN-BROKER.md. Setup examples remain indocs/README-SEARCH-SUMMARY.md.Preview limits
BM-backed ECA cannot be enabled until the companion ECOM API and scope are available and live-tested. No live BM credential exchange is claimed by the mocked provider tests. Direct ECA is also not live-enabled in this draft.
Conversation/result storage and concurrency limits remain process-local. Shared TTL storage, distributed quotas/abuse controls, and streaming validation are required before scaled MRT rollout. Current custom endpoints use bearer-token shopper mode; HttpOnly-cookie stores need a cookie-aware adapter. Upstream ECA output limits, widget cold starts, accessibility, and translations require rollout validation.
How to Test-Drive This PR
searchSummary.enabled: truewhile site B stays disabled. Optionally configure site-specific hero copy/artwork/suggestions; verify disabled-site endpoints are rejected before paid work.agentHandoffto verify context plus a single automatically queued query. Configure the existingapp.embeddedAgentsettings separately for PDP questions.LLM_GATEWAY_AUTH_MODE=eca,LLM_GATEWAY_BM_TOKEN_URL,LLM_GATEWAY_BM_AM_CLIENT_ID, andLLM_GATEWAY_BM_AM_CLIENT_SECRET. Keep the ECA credentials only in BM. Missing broker configuration fails closed; API key remains a separate explicit mode.eca_directand supply the existing direct ECA environment settings.Validation:
git diff --check.main.js114,491 / 114,688 bytes;vendor.js415,237 / 421,888 bytes.Checklists
General
Accessibility Compliance
Localization