Skip to content

Threads endpoints: credentials fetching refactoring#223

Closed
nishika26 wants to merge 9 commits intomainfrom
enhancement/creds_fetching
Closed

Threads endpoints: credentials fetching refactoring#223
nishika26 wants to merge 9 commits intomainfrom
enhancement/creds_fetching

Conversation

@nishika26
Copy link
Copy Markdown
Collaborator

@nishika26 nishika26 commented Jun 12, 2025

Summary

Target issue is #210
Explain the motivation for making this change. What existing problem does the pull request solve?
for #210 -
-Langfuse credentials are now optional, allowing the endpoint to function even if Langfuse keys are not configured.

-This change provides more flexibility in the API by making OpenAI credentials the only required ones, while still supporting Langfuse if it’s available.

###NOTES

  • Added explicit tracing enabling and disabling of Langfuse configuration during setup. This ensures that Langfuse is correctly configured only for users with valid credentials, preventing it from remaining active and showing traces when switched to users without Langfuse credentials - referred this from here

@nishika26 nishika26 marked this pull request as ready for review June 12, 2025 17:43
@nishika26 nishika26 changed the title credentials fetching refactoring Threads endpoint: credentials fetching refactoring Jun 12, 2025
@nishika26 nishika26 changed the title Threads endpoint: credentials fetching refactoring Threads endpointS: credentials fetching refactoring Jun 12, 2025
@nishika26 nishika26 changed the title Threads endpointS: credentials fetching refactoring Threads endpoints: credentials fetching refactoring Jun 12, 2025
@nishika26 nishika26 self-assigned this Jun 12, 2025
@nishika26 nishika26 added the enhancement New feature or request label Jun 12, 2025
@nishika26 nishika26 moved this to In Progress in Kaapi-dev Jun 12, 2025
@AkhileshNegi
Copy link
Copy Markdown
Collaborator

@nishika26 did you test it? It should work like this:

  1. With both Langfuse and OpenAI creds: it runs and you see traces in Langfuse.
  2. With only OpenAI creds: it runs, but no traces in langfuse
  3. With neither set: it fails and throws error missing OpenAI credentials.

@AkhileshNegi
Copy link
Copy Markdown
Collaborator

Also fetching credentials from database, is this implemented across modules? Like even with collections endpoint and file upload?

@nishika26 nishika26 linked an issue Jun 16, 2025 that may be closed by this pull request
@AkhileshNegi AkhileshNegi removed the status in Kaapi-dev Jun 20, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 24, 2025

Codecov Report

Attention: Patch coverage is 20.00000% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
backend/app/api/routes/threads.py 25.00% 6 Missing ⚠️
backend/app/core/util.py 14.28% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

@nishika26 nishika26 moved this to In Progress in Kaapi-dev Jun 25, 2025
@nishika26 nishika26 requested a review from vijay-T4D June 26, 2025 06:19
@avirajsingh7
Copy link
Copy Markdown
Collaborator

@nishika26 @AkhileshNegi will be closing this PR due to #249,
As I am working on langfuse for thread/response and changing the way it is implemented will take of this also when raising a MR.

@github-project-automation github-project-automation bot moved this from In Progress to Closed in Kaapi-dev Jun 27, 2025
@AkhileshNegi AkhileshNegi deleted the enhancement/creds_fetching branch October 13, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

Langfuse Required for /threads

3 participants