🪢 feat: Langfuse Connection Configuration - #94
Conversation
Screen.Recording.2026-07-10.at.18.02.00.mov |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6233bffd3f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
Surface a per-tenant Langfuse connection section (enabled, base URL, public key, secret key) in the admin config UI. It saves through the existing /api/admin/config field API. The pinned librechat-data-provider (0.8.509) predates the langfuse config group, so a forward-compat shim extends configSchema locally until a data-provider version defining langfuse is published and pinned, mirroring the READ_AUDIT_LOG capability shim. The shim no-ops once upstream ships it.
Custom section renderer for the Langfuse config: enable toggle, host, public key, a masked (PasswordInput) secret that is write-only and only sent on change, the configured-key fingerprint returned by the backend, and a Test connection action. Adds an admin-gated testLangfuseConnectionFn that validates credentials against the Langfuse public projects endpoint.
Inject the langfuse section as a SchemaField instead of extending the pinned data-provider schema, which mixed zod v4 (app) with v3 (data-provider) and left the section unintrospected so it fell back to the generic renderer. Read saved values from parentValue (the base config slice) rather than getValue leaf paths, which only resolve edited/scope values, so a configured connection repopulates on reload with the secret redacted and its fingerprint shown.
447ea6c to
dc3d115
Compare
The load-time effect called testLangfuseConnectionFn, which requires manage:configs:langfuse, without checking the section's disabled (read-only) prop, so a read-only viewer would trigger a failing verification on every visit. Guard the effect on disabled and add a regression test.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 21ec9ef. Configure here.
…gured The read-only guard forced the verification state to idle, which renders as "not configured" and misleads viewers who can still see the stored, masked connection. A configured connection viewed read-only now shows as unverified instead, and the in-flight request marker and tested-connection ref are cleared so switching back to an editable view re-verifies from scratch rather than skipping on a stale marker.
The connection-load effect and handleCancel blanked the stored destination when the server dropped it from the allowlist, which set destinationChanged, forced edit mode, and left an enabled connection impossible to disable until a replacement was picked. Preserve the stored destination instead, so disable stays available; a de-allowlisted destination simply shows as unselected in the picker. Also await the read-only "not verified" label in its regression, since that label is set in a follow-up effect and a slower CI run had not painted it yet, and add a regression covering the disable action for an out-of-allowlist stored destination.
|
@dustinhealy The secret key field should show the redacted secret key value
Another piece of feedback I got was to mirror langfuse's API key provisioning screen where it shows secret key first and then public key |


Depends on danny-avila/LibreChat#14107
The LibreChat PR provides the dedicated tenant Langfuse connection API and encrypted secret storage. Until a data-provider release defines the
langfuseschema group, this PR includes a forward-compatible schema shim that self-disables once the dependency is updated.Summary
Adds a tenant Langfuse export section to Configuration -> Features, gated by LibreChat's fanout capability.
manage:configs:langfuseadmins.Validation
Change Type
Checklist