mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
fix(proxy_server.py): redact api keys from proxy load
This commit is contained in:
parent
3db1c79651
commit
c6518b8d0f
1 changed files with 6 additions and 1 deletions
|
@ -421,7 +421,12 @@ def load_router_config(router: Optional[litellm.Router], config_file_path: str):
|
|||
except Exception as e:
|
||||
raise Exception(f"Exception while reading Config: {e}")
|
||||
|
||||
print(f"Loaded config YAML:\n{json.dumps(config, indent=2)}")
|
||||
printed_yaml = copy.deepcopy(config)
|
||||
printed_yaml.pop("environment_variables")
|
||||
for model in printed_yaml["model_list"]:
|
||||
model["litellm_params"].pop("api_key", None)
|
||||
|
||||
print(f"Loaded config YAML (api_key and environment_variables are not shown):\n{json.dumps(printed_yaml, indent=2)}")
|
||||
|
||||
## ENVIRONMENT VARIABLES
|
||||
environment_variables = config.get('environment_variables', None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue