⛴️ fix: Stop Double-Wrapping configYamlContent in Helm ConfigMap#13198
Merged
danny-avila merged 1 commit intoMay 19, 2026
Merged
Conversation
danny-avila
approved these changes
May 19, 2026
Owner
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
danny-avila
approved these changes
May 19, 2026
fuuuzzy
pushed a commit
to fuuuzzy/LibreChat
that referenced
this pull request
May 22, 2026
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.
Fixes #13197.
Summary
Fix double-wrapped YAML in the
configYamlContentConfigMap so LibreChat actually reads the user'slibrechat.yamlinstead of silently falling back to internal defaults.The bug
templates/configmap.yamlpiped.Values.librechat.configYamlContentthroughtoYamlbefore indenting. Because the value is documented as — and used as — a YAML literal string,toYamlre-wrapped it in another|block scalar. The mounted/app/librechat.yamlended up like this:Before (broken):
The first character of the file is a literal
|, which is not a valid top-level YAML document.js-yaml(LibreChat's parser) "recovers" by returning the body as a string rather than throwing — so everyconfig.<block>lookup downstream returnsundefined.After (fixed):
The fix is one line —
| toYamlwas redundant and harmful.| indent 4is correct and stays.User-visible impact
Anywhere
configYamlContentis set via Helm values, the file was being parsed to astring, so the application fell back to compiled-in defaults for every config-driven feature, with no error logged. Things that silently broke:endpoints.agents— Agents endpoint not registered.interface.*— interface customizations ignored (privacyPolicy, termsOfService, modelSelect toggles, etc.).modelSpecs— custom model specs not surfaced.registration/OPENID_ADMIN_ROLE_*role mapping — skipped.mcpServers,webSearch,memory,balance,fileConfig,rateLimits, …Users who set
configYamlContentgot a working pod that quietly behaved as if the config was empty.Repro
Before this PR the rendered
librechat.yamlstarts with|on the line afterlibrechat.yaml: |. After this PR it starts withversion: 1.3.11.Confirm the broken vs. fixed YAML parses differently with
js-yaml:Regression test
Added
helm/librechat/tests/configmap_render_test.sh. It renders the ConfigMap with a sampleconfigYamlContent, asserts the renderedlibrechat.yamlbody does not start with|, and (when a YAML parser is available locally) confirms it parses to an object withendpoints.agentspreserved. The chart has no existing unit-test framework (only the in-clusterhelm testPod hook), so this is a portable bash + optionalpython3/nodescript with zero new runtime dependencies. Run it directly:I verified the test fails against the pre-fix template and passes against the post-fix template.
Risk / migration
None. The
configYamlContentvalues-schema is unchanged. Users who already had a workingconfigYamlContentcontinue to work — they'll just start getting the actual configuration they wrote, instead of internal defaults. There is no downgrade path concern because the broken behavior was always a silent no-op.Chart version
I left
Chart.yamlat2.0.3. Happy to bump to2.0.4if the maintainers prefer per-PR patch bumps for bugfixes — recent history is mixed.Test plan
helm lint helm/librechat— clean.helm template … --show-only templates/configmap.yamlshows a single|(thedata:key's block scalar header) and no inner|.helm/librechat/tests/configmap_render_test.sh— PASS on this branch.| toYamlis reintroduced (confirms it actually catches the regression).node+js-yamlparse of the rendered body yields an object withendpoints.agents.disableBuilder = false.