You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Omit Authorization header when api_key is empty (#795)
* Omit Authorization header when api_key is empty
* Resolve the api_key supplier once per request
patched_get_headers called _get_token() a second time, after get_headers()
had already called it. For the documented callable api_key form this invoked
the supplier twice per request, and a supplier whose value changed between the
two calls produced the wrong header: returning "real-token" then "" stripped
the Authorization header despite a valid token, and the reverse sent
"Bearer " while a valid token was available. Both yield a 401.
Inspect the header get_headers() already built instead, matching what
patched_async_get_headers has been doing.
Co-Authored-By: Claude <noreply@anthropic.com>
* bump sdk version
---------
Co-authored-by: will.kendall <will.kendall@postman.com>
Co-authored-by: Will Kendall <will.kendall@buildwithfern.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Jason Ozuzu <jasonozuzu@cohere.com>
0 commit comments