Repository navigation
📡 feat: Add Managed Langfuse Configuration - #13084
danny-avila wants to merge 9 commits into
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 03e21214d0
ℹ️ 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".
There was a problem hiding this comment.
Pull request overview
Adds tenant-level Langfuse tracing configuration plus optional per-agent overrides, including UI editing, API persistence/validation, runtime resolution (tenant + agent merge with env-ref support), and secret redaction behavior.
Changes:
- Introduces
langfusein app config schema/types (and example YAML) and threads it through app config loading. - Persists optional per-agent
langfuseoverrides (schema/types + API validation), with write-onlysecretKeyredaction in responses. - Adds an Agent “Advanced” panel UI for Langfuse settings and expands unit/integration tests for config + agent endpoints + runtime resolution.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/data-schemas/src/types/app.ts | Adds langfuse to AppConfig typing. |
| packages/data-schemas/src/types/agent.ts | Adds per-agent langfuse typing. |
| packages/data-schemas/src/schema/agent.ts | Persists per-agent langfuse in Mongo schema. |
| packages/data-schemas/src/app/service.ts | Includes langfuse in resolved app config object. |
| packages/data-provider/src/types/assistants.ts | Exposes per-agent langfuse type in shared Agent types. |
| packages/data-provider/src/schemas.ts | Adds Langfuse defaults to agent form defaults. |
| packages/data-provider/src/config.ts | Adds langfuse to config schema + bumps config version. |
| packages/data-provider/src/config.spec.ts | Adds configSchema test coverage for langfuse. |
| packages/api/src/agents/validation.ts | Allows langfuse in agent create/update validation. |
| packages/api/src/agents/run.ts | Resolves effective tenant+agent Langfuse config (env refs, overlays, warn/disable). |
| packages/api/src/agents/run.spec.ts | Adds unit tests for effective Langfuse config resolution. |
| librechat.example.yaml | Documents tenant-level langfuse config and bumps version. |
| client/src/locales/en/translation.json | Adds UI strings for Langfuse section. |
| client/src/components/SidePanel/Agents/AgentSelect.tsx | Hydrates Langfuse form values without exposing stored secret. |
| client/src/components/SidePanel/Agents/AgentPanel.tsx | Includes Langfuse in create/update payload composition. |
| client/src/components/SidePanel/Agents/Advanced/AgentLangfuse.tsx | New UI component for Langfuse settings in Advanced panel. |
| client/src/components/SidePanel/Agents/Advanced/AdvancedPanel.tsx | Renders the Langfuse section in the Advanced panel. |
| client/src/components/SidePanel/Agents/tests/AgentPanel.helpers.spec.ts | Adds payload normalization test coverage for Langfuse fields. |
| client/src/common/agents-types.ts | Adds langfuse to the agent form type. |
| api/server/controllers/agents/v1.spec.js | Adds tests for persistence + secret redaction + list behavior. |
| api/server/controllers/agents/v1.js | Normalizes Langfuse config and redacts secretKey in responses. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
GitNexus: 🚀 deployedThe |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c809b7606
ℹ️ 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".
GitNexus: 🚀 deployedThe |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dfc297ce2d
ℹ️ 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".
GitNexus: 🚀 deployedThe |
|
@codex review |
1 similar comment
|
@codex review |
GitNexus: 🚀 deployedThe |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c2fdc92cd
ℹ️ 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".
|
Audit update pushed in bc636c9. Resolved the valid findings from the automated review:
Audited but did not change:
Local verification:
Note: full @codex review |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ 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". |
GitNexus: 🚀 deployedThe |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bc636c9a2e
ℹ️ 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".
|
@codex review |
GitNexus: 🚀 deployedThe |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddb7090d64
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bc2c19d841
ℹ️ 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".
|
@codex review |
GitNexus: 🚀 deployedThe |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 001c3b5401
ℹ️ 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".
GitNexus: 🚀 deployedThe |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ 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". |
|
@codex review |
GitNexus: 🚀 deployedThe |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ 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". |
|
Any chance of this one being completed? |
You don't need this PR to configure langfuse, you can start already: https://www.librechat.ai/docs/configuration/langfuse This PR is to add langfuse from admin panel and/or on a per-agent basis. |
|
Ignore all that, raised PR for what I'm looking for. |
Summary
I implemented tenant-level and UI-managed per-agent Langfuse configuration for Managed LibreChat, covering app config, agent persistence, UI editing, runtime merge behavior, and sensitive secret handling.
langfuseapp config withenabled,publicKey,secretKey, andbaseUrl, plus the env-ref example inlibrechat.example.yaml.langfuseconfig through schema, types, create/update validation, and agent form defaults.Related Linear issue: AI-927
Depends on agents runtime PR: LibreChat-AI/agents#169
Change Type
Testing
npm run build:packagesnpm run build:clientnpm run test:packages:data-provider -- --runInBand src/config.spec.ts --testPathIgnorePatterns=.codexcd client && npm run test:ci -- --runInBand --runTestsByPath src/components/SidePanel/Agents/__tests__/AgentPanel.helpers.spec.tsnpm run test:api -- --runInBand server/controllers/agents/v1.spec.js --testPathIgnorePatterns=.codexcd packages/api && npx jest --coverage=false --runInBand src/agents/run.spec.tsnpm run test:packages:api -- --runInBand src/agents/run.spec.ts --testPathIgnorePatterns=.codexran the package suite: 178 passed, 1 skipped, 4993 tests passedTest Configuration:
danny-avila/langfuse-configChecklist