Skip to content

fix(librechat): pass the search key to the application - #4948

Closed
tang-vu wants to merge 1 commit into
Osmantic:public-betafrom
tang-vu:fix/beta-librechat-search-key-20260914
Closed

tang-vu wants to merge 1 commit into
Osmantic:public-betafrom
tang-vu:fix/beta-librechat-search-key-20260914

Conversation

@tang-vu

@tang-vu tang-vu commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Ready for independent review (2026-09-15). Candidate 9568f2b3d45cdc31c7daa5c678f7f611696fdbbf has a successful GitHub check rollup and no base-branch conflict at this review snapshot. This supersedes earlier draft-status wording only. All validation gaps, migration requirements, live gates and independent human review requirements below remain in force; this is not a merge-ready approval.

Summary

ODS enables LibreChat search and starts an authenticated Meilisearch sidecar, but only the sidecar receives the generated search key. Pass LIBRECHAT_MEILI_KEY to LibreChat as MEILI_MASTER_KEY, so its indexing client can actually initialize.

Why this matters

The production path is the existing setup hook ? persisted LIBRECHAT_MEILI_KEY ? Compose ? LibreChat's conversation/message indexing plugin ? Meilisearch. The shipped LibreChat v0.7.7 plugin requires SEARCH, MEILI_HOST, and MEILI_MASTER_KEY before enabling indexing. ODS currently omits the third field, so an apparently healthy installation never enables that client.

The invariant is that client and server receive the same search key; SEARCH=false continues to disable indexing. Existing required-secret guards remain in effect.

Overlap check

Searched open and closed upstream PRs for librechat meili and the current Compose path in the 3,000-PR file index. Inspected #568: it generates and declares the key but does not pass it into the application. #1033 fixes MongoDB's URI guard; #387 isolates sidecars and authenticates Meilisearch; #716 changes the validation environment. #3882 and #3980 concern masking secret fields in settings responses. No existing PR completes this search-client handoff.

Validation

  • python3 ods/tests/test-librechat-search-env.py: 2 tests pass, including custom/punctuation-containing keys and explicit search opt-out. Both enabled-search scenarios fail on the base commit.
  • Tests exercise the actual rendered docker compose config --format json plan with an isolated environment, are wired into make test, and do not require a daemon.
  • Scoped pre-commit hooks and git diff --check: pass.
  • Candidate make gate reproduces the baseline no-sudo fixture failure on this root WSL host. Baseline API: 2,849 passed, 1 skipped; dashboard lint/build pass. Whole-repo private-key scan flags two existing key fixtures; changed files pass.
  • Exact candidate 9568f2b against Meilisearch v1.12.8: unauthenticated requests were denied; the rendered application key authenticated index creation, document ingestion, and search. The fixture container and volume were removed. The v0.7.7 production plugin enablement contract was inspected; full LibreChat registration/login and chat UI were not exercised. Remote CI remains pending.

Compatibility and rollback

All Docker platforms consume the same manifest. No database migration, secret regeneration, mount change, or port change is introduced. Operators who rotate the key must recreate LibreChat and its Meilisearch sidecar together. Reverting disables the previously uninitialized client again; existing search storage is retained. This PR has no runtime dependency on the batch's Paperless change; both Makefile additions will be retained and tested on the final integration head.

Final candidate 9568f2b3d45cdc31c7daa5c678f7f611696fdbbf: 32 successful CI checks, 4 conditionally skipped; no pending or failed checks.

Batch integration receipt

This is one of 30 independently branched public-beta PRs. The published synthetic integration head is 61f4c6fccc81bea697f4941683fefb5089ba77f4, built from baseline d49ad4bbc760be319de7f4c9b9a93b1f18fe3922 in this reproducible order:

#4946 → #4948 → #4951 → #4954 → #4972 → #4960 → #4961 → #4957 → #4964 → #4967 → #4968 → #4971 → #4975 → #4976 → #4984 → #4982 → #4990 → #4988 → #4989 → #4997 → #5003 → #5006 → #5007 → #5009 → #5012 → #5011 → #5013 → #5014 → #5020 → #5021

Reconciliation preserved all 146 files owned by a single PR byte-for-byte against their exact candidate heads. The eight shared paths preserve both CLI STT/TTS commands and help, every added Makefile test, both environment schema additions and all Extensions UI behavior. LanguageTool and Kroki both remain headless API entries. Canonical regeneration yields 76 catalog entries and 47 library manifests; all README rows are retained. Shared-file changes need these additive resolutions when merged independently.

Combined validation: 2,852 API tests passed / 1 skipped; 1,082 UI tests passed; 47 manifests passed; all 12 added Makefile commands passed; 12 catalog boundary tests passed / 12 opt-in runtime tests skipped in this combined run. Individual exact-image results remain documented above. UI lint/build, scoped secret hooks, diff checks, four platform smoke tests and installer simulation passed. Compose plans for NVIDIA/AMD/Apple each contain 20 services and no duplicate published bindings across the core plus 12 new recipes; this is static plan evidence, not simultaneous startup or GPU inference.

The first unrestricted UI run timed out in two tests under concurrent load; the complete rerun used --maxWorkers=2 with unchanged assertions and timeouts and passed. ESLint reports zero errors and 603 warnings, including the existing JSX usage-detection pattern. Full local make gate still fails the no-sudo Docker baseline covered by #3158. BATS records 416 passed / 5 failed on this root/WSL host (platform detection, root preflight and a 15 GiB versus 20 GiB free-space expectation). Neither full local gate nor BATS is described as green.

This integration receipt supplements each PR's own regression and does not waive its independent review, live hardware/browser/upgrade gates or rollback requirements. The PRs remain drafts; none was merged upstream.

This was referenced Sep 14, 2026
@tang-vu
tang-vu marked this pull request as ready for review September 15, 2026 01:33
@Lightheartdevs

Copy link
Copy Markdown
Collaborator

Thanks for this contribution. public-beta was promoted into main on 2026-09-24 and no longer receives changes, so we're closing pull requests that target it. This isn't a judgment on the change itself. If it's still needed, please rebase onto main and open a focused PR. See #7253 for details and the contribution policy.

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.

2 participants