Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

(DB fix) don't run apply_db_fixes on startup (#6604)

Ishaan Jaff0fe8cde7c78d
diff --git a/db_scripts/create_views.py b/db_scripts/create_views.py
index 2b6a28ccbb9..7a913c7f8fd 100644
--- a/db_scripts/create_views.py
+++ b/db_scripts/create_views.py
@@ -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
diff --git a/db_scripts/update_unassigned_teams.py b/db_scripts/update_unassigned_teams.py
index dc65e4c208e..bf2cd207524 100644
--- a/db_scripts/update_unassigned_teams.py
+++ b/db_scripts/update_unassigned_teams.py
@@ -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"
diff --git a/litellm/proxy/proxy_config.yaml b/litellm/proxy/proxy_config.yaml
index 23834f75970..f3edf79d019 100644
--- a/litellm/proxy/proxy_config.yaml
+++ b/litellm/proxy/proxy_config.yaml
@@ -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/