From d5421486d8596957ed07a8d5e25de630775cb64f Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Sat, 18 Apr 2026 22:53:45 +0200 Subject: [PATCH] fix(litellm): add prisma generate and use venv binary directly (#13835) --- ct/litellm.sh | 8 +++++++- install/litellm-install.sh | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ct/litellm.sh b/ct/litellm.sh index 391a4acd1..fc871a340 100644 --- a/ct/litellm.sh +++ b/ct/litellm.sh @@ -38,12 +38,18 @@ function update_script() { msg_info "Updating LiteLLM" $STD "$VENV_PATH/bin/python" -m pip install --upgrade litellm[proxy] prisma + $STD "$VENV_PATH/bin/prisma" generate msg_ok "LiteLLM updated" msg_info "Updating DB Schema" - $STD uv --directory=/opt/litellm run litellm --config /opt/litellm/litellm.yaml --use_prisma_db_push --skip_server_startup + $STD /opt/litellm/.venv/bin/litellm --config /opt/litellm/litellm.yaml --use_prisma_db_push --skip_server_startup msg_ok "DB Schema Updated" + msg_info "Updating Service" + sed -i 's|ExecStart=uv --directory=/opt/litellm run litellm|ExecStart=/opt/litellm/.venv/bin/litellm|' /etc/systemd/system/litellm.service + systemctl daemon-reload + msg_ok "Updated Service" + msg_info "Starting Service" systemctl start litellm msg_ok "Started Service" diff --git a/install/litellm-install.sh b/install/litellm-install.sh index f86ce9d79..c36c79180 100644 --- a/install/litellm-install.sh +++ b/install/litellm-install.sh @@ -30,6 +30,7 @@ $STD uv venv --clear /opt/litellm/.venv $STD /opt/litellm/.venv/bin/python -m ensurepip --upgrade $STD /opt/litellm/.venv/bin/python -m pip install --upgrade pip $STD /opt/litellm/.venv/bin/python -m pip install litellm[proxy] prisma +$STD /opt/litellm/.venv/bin/prisma generate msg_ok "Installed LiteLLM" msg_info "Configuring LiteLLM" @@ -40,7 +41,7 @@ general_settings: database_url: postgresql://$PG_DB_USER:$PG_DB_PASS@127.0.0.1:5432/$PG_DB_NAME store_model_in_db: true EOF -uv --directory=/opt/litellm run litellm --config /opt/litellm/litellm.yaml --use_prisma_db_push --skip_server_startup +$STD /opt/litellm/.venv/bin/litellm --config /opt/litellm/litellm.yaml --use_prisma_db_push --skip_server_startup msg_ok "Configured LiteLLM" msg_info "Creating Service" @@ -50,7 +51,7 @@ Description=LiteLLM [Service] Type=simple -ExecStart=uv --directory=/opt/litellm run litellm --config /opt/litellm/litellm.yaml +ExecStart=/opt/litellm/.venv/bin/litellm --config /opt/litellm/litellm.yaml Restart=always [Install]