forked from phoenix/litellm-mirror
fix(proxy_server.py): support cost tracking if general_settings is none
works if database_url is in env
This commit is contained in:
parent
ec79482612
commit
a8bc10170a
1 changed files with 4 additions and 2 deletions
|
@ -1797,8 +1797,6 @@ class ProxyConfig:
|
|||
custom_db_client = DBClient(
|
||||
custom_db_args=database_args, custom_db_type=database_type
|
||||
)
|
||||
## COST TRACKING ##
|
||||
cost_tracking()
|
||||
## ADMIN UI ACCESS ##
|
||||
ui_access_mode = general_settings.get(
|
||||
"ui_access_mode", "all"
|
||||
|
@ -2350,6 +2348,10 @@ async def startup_event():
|
|||
# if not, assume it's a json string
|
||||
worker_config = json.loads(os.getenv("WORKER_CONFIG"))
|
||||
await initialize(**worker_config)
|
||||
|
||||
## COST TRACKING ##
|
||||
cost_tracking()
|
||||
|
||||
proxy_logging_obj._init_litellm_callbacks() # INITIALIZE LITELLM CALLBACKS ON SERVER STARTUP <- do this to catch any logging errors on startup, not when calls are being made
|
||||
|
||||
if use_background_health_checks:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue