-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Content-Length can't be present with Transfer-Encoding
#474
Comments
Hey @davidfant can you add the stack trace? Are you sure this is not a client error? I've run the code snippet in my local without any exceptions |
Hey! Can you please make sure that you are using the latest version of the gateway. |
Having the same problem with
|
Hey! We have identified the cause for this. Will be pushing a patch soon |
I wonder if you have an ETA? We've parked our integration with Portkey pending on this fix. |
HI. This is still happening with |
Hey @gabrielmontagne - Sorry for the inactivity on this thread. We tried reproducing this on our end with many possible combination but we were not able to reproduce it. Would you be okay with getting on a call to debug this? You can join Portkey's Discord. Once you join, we can send you a meet invite. |
Can you please also specify the version of node that you are using? |
Hi @VisargD , thanks for coming back. Ah, I wasn't aware that you couldn't reproduce. In the meantime, I've tried with all the following node versions,
Perhaps crucially, I'm using the openai lib, using portkey to generate the headers -- I wanted to try the Portkey constructor, but the types went all crazy. I've tried with openai versions I'm using Thanks again! |
Can you try running the gateway locally after pulling this repo? My guess is that you are currently trying the |
@VisargD, you were 300% right! I was using the As you suggested, I cloned this repo and ran it locally, I had also tried the |
Got it. Ideally, the executable which is used by npx command is build from the exact code of version tags. Looks like there is some behaviour differences when its used with npx command. Let me debug it further. |
What Happened?
I'm running the gateway locally using
npx @portkey-ai/gateway
and using the NodeJS SDK I got weird connection errorsThe following CURL request works:
But in node with either fetch, node-fetch or axios I'm always getting the error
"Content-Length can't be present with Transfer-Encoding"
from PortkeyThis works as expected when running using Docker
What Should Have Happened?
The Node SDK should work
Relevant Code Snippet
No response
Your Twitter/LinkedIn
https://twitter.com/da_fant
The text was updated successfully, but these errors were encountered: