-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
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
if log.isEnabledFor(logging.DEBUG): | |
log.debug("Request options: %s", model_dump(options, exclude_unset=True)) |
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
tekumara, artdent and abaerptcdluc
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working