forked from phoenix/litellm-mirror
(DB fix) don't run apply_db_fixes on startup (#6604)
* fix don't apply_db_fixes on startup * fix remove unused import
This commit is contained in:
parent
305821902d
commit
0fe8cde7c7
3 changed files with 9 additions and 4 deletions
|
@ -4,7 +4,6 @@ python script to pre-create all views required by LiteLLM Proxy Server
|
|||
|
||||
import asyncio
|
||||
import os
|
||||
from update_unassigned_teams import apply_db_fixes
|
||||
|
||||
# Enter your DATABASE_URL here
|
||||
|
||||
|
@ -205,7 +204,6 @@ async def check_view_exists(): # noqa: PLR0915
|
|||
|
||||
print("Last30dTopEndUsersSpend Created!") # noqa
|
||||
|
||||
await apply_db_fixes(db=db)
|
||||
return
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue