Skip to content

[Bug]: API Keys shown in debug mode #7603

@bansal-ankita

Description

@bansal-ankita

What happened?

I have implemented a custom logger to write all debug logs to a log file. Upon reviewing the log file, I noticed that it contains sensitive information such as LiteLLM API keys and LLM model API keys. After checking the code, it appears that all parameters (including kwargs and LiteLLM-specific parameters) are being logged in their raw form without any key masking.

image image

Relevant log output

No response

Are you a ML Ops Team?

Yes

What LiteLLM version are you on ?

v1.53.1

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions