feat: client should handle 307 redirects
Is your feature request related to a problem? Please describe. Currently when I stand up an sse client against a server that redirects I get
[2024-12-17 16:40:04,008][ERROR] Error in post_writer: Redirect response '307 Temporary Redirect' for url 'http://localhost:7860/api/v1/mcp?session_id=430eaa669c7a484a892dbd82c805249d' Redirect location: 'http://localhost:7860/api/v1/mcp/?session_id=430eaa669c7a484a892dbd82c805249d' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307
Describe the solution you'd like I ended up implementing an OPTIONS check before I establish the sse client so that no redirect is necessary but it would be nice for this to be handled automatically.
Hey guys, any news about this?
Thanks very much for raising this.
I've addressed the issue for the bind_tools hot path specifically in https://github.com/langchain-ai/langchain/pull/29015 (we should not be using deprecated functions there anyway).
To correct the underlying issue, we need to address the latency of the underlying @deprecated decorator. I have a PR for that in https://github.com/langchain-ai/langchain/pull/29016.