fix don't apply_db_fixes on startup

This commit is contained in:
Ishaan Jaff 2024-11-05 11:33:29 -08:00
parent f3071161ad
commit db89155068
3 changed files with 9 additions and 3 deletions

View file

@ -205,7 +205,6 @@ async def check_view_exists(): # noqa: PLR0915
print("Last30dTopEndUsersSpend Created!") # noqa
await apply_db_fixes(db=db)
return

View file

@ -1,7 +1,14 @@
from prisma import Prisma
from litellm._logging import verbose_logger
async def apply_db_fixes(db: Prisma):
"""
Do Not Run this in production, only use it as a one-time fix
"""
verbose_logger.warning(
"DO NOT run this in Production....Running update_unassigned_teams"
)
try:
sql_query = """
UPDATE "LiteLLM_SpendLogs"

View file

@ -1,7 +1,7 @@
model_list:
- model_name: gpt-4o
- model_name: fake-openai-endpoint
litellm_params:
model: openai/gpt-5
model: openai/fake
api_key: os.environ/OPENAI_API_KEY
api_base: https://exampleopenaiendpoint-production.up.railway.app/