Skip to content

Conversation

@lunika
Copy link
Member

@lunika lunika commented Jan 8, 2026

Purpose

We want to monitor AI actions. For this we choose to use langfuse. As this usage is optional, we load langfuse sdk only if settings are configured. Also, the openai client from langfuse is a dropin replacement of openai client, so we only have to change how openai is imported.

Proposal

  • ✨(backend) use langfuse to monitor AI actions

Fixes #1672

@lunika lunika requested a review from qbey January 8, 2026 16:36
@lunika lunika self-assigned this Jan 8, 2026
@lunika lunika added the AI label Jan 8, 2026
@socket-security
Copy link

socket-security bot commented Jan 8, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm entities is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: ?npm/@blocknote/server-util@0.45.0npm/i18next-parser@9.3.0npm/entities@6.0.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/entities@6.0.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm vite is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: ?npm/vitest@4.0.15npm/vite@7.1.12

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/vite@7.1.12. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@lunika lunika added the preview label Jan 9, 2026
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

🚀 Preview will be available at https://1776-docs.ppr-docs.beta.numerique.gouv.fr/

You can use the existing account with these credentials:

  • username: docs
  • password: docs

You can also create a new account if you want to.

Once this Pull Request is merged, the preview will be destroyed.

@lunika lunika requested a review from AntoLC January 9, 2026 09:38
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

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

Easy ^^

We want to monitor AI actions. For this we choose to use langfuse. As
this usage is optional, we load langfuse sdk only if settings are
configured. Also, the openai client from langfuse is a drop-in
replacement of openai client, so we only have to change how openai is
imported.
@lunika lunika enabled auto-merge (squash) January 9, 2026 14:23
@lunika lunika merged commit 55fe73d into main Jan 9, 2026
27 of 28 checks passed
@lunika lunika deleted the feat/langfuse branch January 9, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants