Skip to content

🪢 feat: Langfuse Connection Configuration#94

Open
dustinhealy wants to merge 18 commits into
mainfrom
langfuse-connection-ui
Open

🪢 feat: Langfuse Connection Configuration#94
dustinhealy wants to merge 18 commits into
mainfrom
langfuse-connection-ui

Conversation

@dustinhealy

@dustinhealy dustinhealy commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

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 langfuse schema 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.

  • Reads and writes through LibreChat's dedicated Langfuse connection API.
  • Uses deployment-approved destination keys rather than arbitrary URLs.
  • Shows masked public and secret keys without returning the stored secret.
  • Uses Save & enable for new or edited credentials, with implicit verification before persistence.
  • Shows one Enable or Disable action for a saved connection; these actions preserve the stored secret and skip credential verification.
  • Tests saved credentials on load and preserves in-progress edits across shared query refreshes.
  • Supports broad config admins and section-scoped manage:configs:langfuse admins.
  • Includes dedicated connection state in configured counts and Show configured only filtering.

Validation

  • Full suite: 775 tests passing
  • TypeScript, ESLint, and Prettier checks
  • Coordinated correctness reviews with Opus and Cursor across this PR and LibreChat #14108

Change Type

  • New feature (non-breaking change which adds functionality)

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes work

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.
@upman upman self-assigned this Jul 10, 2026
@upman

upman commented Jul 10, 2026

Copy link
Copy Markdown
Screen.Recording.2026-07-10.at.18.02.00.mov

@CLAassistant

CLAassistant commented Jul 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@upman
upman marked this pull request as ready for review July 10, 2026 15:00
@upman

upman commented Jul 10, 2026

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/server/langfuse.ts Outdated
Comment thread src/components/configuration/sections/LangfuseRenderer.tsx
Comment thread src/components/configuration/sections/LangfuseRenderer.tsx
Comment thread src/components/configuration/sections/LangfuseRenderer.tsx
Comment thread src/server/langfuse.ts Outdated
Comment thread src/components/configuration/sections/LangfuseRenderer.tsx Outdated
Comment thread src/server/langfuse.ts Outdated
Comment thread src/server/config.ts
Comment thread src/components/configuration/sections/LangfuseRenderer.tsx
Comment thread src/components/configuration/sections/LangfuseRenderer.tsx
Comment thread src/components/configuration/ConfigPage.tsx
Comment thread src/components/configuration/sections/LangfuseRenderer.tsx
Comment thread src/components/configuration/sections/LangfuseRenderer.tsx
Comment thread src/components/configuration/sections/LangfuseRenderer.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

There are 4 total unresolved issues (including 3 from previous reviews).

Fix All in Cursor

❌ 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 5e07d87. Configure here.

Comment thread src/components/configuration/sections/LangfuseRenderer.tsx
Comment thread src/components/configuration/sections/LangfuseRenderer.tsx
Comment thread src/components/configuration/sections/LangfuseRenderer.tsx
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.

3 participants