Closed
Description
Confirm this is an issue with the Python library and not an underlying OpenAI API
- This is an issue with the Python library
Describe the bug
When debug logging is enabled, FinalRequestOptions
is entirely dumped because of the following code:
openai-python/src/openai/_base_client.py
Lines 436 to 437 in 3d61ed4
This includes the api-key
header that would be great to avoid logging
To Reproduce
- Enable debug logging
- Get a AsyncAzureOpenAI client and execute any kind of request against the service
- See the api-key getting logged as part of the headers
Code snippets
No response
OS
WSL
Python version
Python v3.9.18
Library version
openai v1.7.2