Skip to content

Conversation

@Grogdunn
Copy link
Contributor

This should fix the issue #2097 .

Copy link
Member

@chemicL chemicL left a comment

Choose a reason for hiding this comment

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

Hey! Since I've been summoned here by @tzolov, here's my view: The approach using a ThreadLocal is not appropriate. I don't know what the solution should be (most probably an architectural decision or some usage guidelines), but I can say that ThreadLocal will cause issues, e.g. if the client is shared across Threads. Also, resubscribing to the Flux of ChatResponse is most probably not permitted and actually would probably end up exercising the LLM call twice as well. I do not see any tests here either validating the approach, I think that would be necessary to make progress, but best to tackle the question of the intended usage and design. Implementing caching in any way might as well be unexpected in most scenarios regardless if it relies on ThreadLocal or some other mechanism.

@Grogdunn
Copy link
Contributor Author

Ok fine, the ThreadLocal is not the way to acheve this, we will continue to discuss on Issue, maybe only a renaming is needed to avoid confusion.

@markpollack
Copy link
Member

thoughts @chemicL ?

@chemicL
Copy link
Member

chemicL commented Sep 29, 2025

@markpollack my view is that this PR should be closed. The actual issue or source of misunderstanding is addressed in #2097 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants