#x-ratelimit headers are missing in response when using the new OpenAI Node library

1 messages · Page 1 of 1 (latest)

gloomy sonnet
#

Is anyone succesfully getting the rate limit from the response headers in the new library? I'm using the API with Assistants and none of the x-ratelimit headers are being returned in the response headers. I've tried using the .withResponse() and I've also tried hooking into every fetch call when setting it up...

        apiKey: env.OPENAI_KEY,
        fetch: async (url, init) => {
            const response = await fetch(url, init);
            console.log("response.headers =", response.headers);
            return response;
        },
    })```

In both cases, all of the other headers are there, but just not the x-ratelimit headers.

Can anyone tell me what I'm doing wrong?  Or are the x-ratelimit headers just not available from the assistants api?