forked from phoenix/litellm-mirror
fix(proxy_server.py): fix master key reset, to preserve key from env
This commit is contained in:
parent
40c974999e
commit
d45101b652
1 changed files with 4 additions and 4 deletions
|
@ -856,10 +856,6 @@ def initialize(
|
||||||
llm_router, llm_model_list, general_settings = load_router_config(
|
llm_router, llm_model_list, general_settings = load_router_config(
|
||||||
router=llm_router, config_file_path=config
|
router=llm_router, config_file_path=config
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
# reset auth if config not passed, needed for consecutive tests on proxy
|
|
||||||
master_key = None
|
|
||||||
user_custom_auth = None
|
|
||||||
if headers: # model-specific param
|
if headers: # model-specific param
|
||||||
user_headers = headers
|
user_headers = headers
|
||||||
dynamic_config[user_model]["headers"] = headers
|
dynamic_config[user_model]["headers"] = headers
|
||||||
|
@ -991,6 +987,10 @@ async def startup_event():
|
||||||
global prisma_client, master_key, use_background_health_checks
|
global prisma_client, master_key, use_background_health_checks
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
### LOAD MASTER KEY ###
|
||||||
|
# check if master key set in environment - load from there
|
||||||
|
master_key = litellm.get_secret("LITELLM_MASTER_KEY", None)
|
||||||
|
|
||||||
### LOAD CONFIG ###
|
### LOAD CONFIG ###
|
||||||
worker_config = litellm.get_secret("WORKER_CONFIG")
|
worker_config = litellm.get_secret("WORKER_CONFIG")
|
||||||
print_verbose(f"worker_config: {worker_config}")
|
print_verbose(f"worker_config: {worker_config}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue