openai-go
openai-go copied to clipboard
Missing rate limit headers in response API
Hey there! I'm missing the rate limit headers from the new Responses API, they used to be returned from the request with the Completions API.
Here is what I call:
var respInfo *http.Response
chatCompletion, err :=client.Responses.New(
ctx,
req,
option.WithResponseInto(&respInfo),
option.WithRequestTimeout(1*time.Minute),
)
Logging respInfo.Header only gives me:
{
"headers": {
"Alt-Svc": [...],
"Cf-Cache-Status": [...],
"Cf-Ray": [...],
"Content-Type": [...],
"Date": [...],
"Openai-Organization": [...],
"Openai-Processing-Ms": [...],
"Openai-Version": [...],
"Server": [...],
"Set-Cookie": [...],
"Strict-Transport-Security": [...],
"X-Content-Type-Options": [...],
"X-Request-Id": [... ]
}
}
Is this a limitation of the new Responses API, or an issue with the library?
Thanks for the report, this is almost definitely an API issue. I've forwarded this to the team.