import os import subprocess import sys import litellm from litellm.proxy.proxy_cli import run_server # Bypass automated prisma engine checks if needed os.environ["DATABASE_URL"] = os.getenv("DATABASE_URL", "") litellm_pkg_dir = os.path.dirname(litellm.__file__) schema_path = None for root, _, files in os.walk(litellm_pkg_dir): if "schema.prisma" in files: schema_path = os.path.join(root, "schema.prisma") break if schema_path: subprocess.run( [sys.executable, "-m", "prisma", "generate", f"--schema={schema_path}"], check=True, ) if __name__ == "__main__": run_server( args=[ "--host", "0.0.0.0", "--port", "7860", "--config", "config.yaml", "--telemetry", "False" ], standalone_mode=False, )