BerriAI/litellm · error · Exception
Unable to find Prisma binaries. Please run 'prisma generate'
Error message
Unable to find Prisma binaries. Please run 'prisma generate' first.
What it means
Import-time failure inside PrismaClient.__init__: the prisma package is installed but its generated client binaries are missing — the environment hasn't run 'prisma generate' (normally done via 'prisma db push' on the proxy database). The client cannot start without the generated engine, so proxy startup aborts.
Source
Thrown at litellm/proxy/utils.py:3139
PLANNED_ENGINE_REPLACEMENT_SETTLE_SECONDS: ClassVar[float] = 5.0
def __init__(
self,
database_url: str,
proxy_logging_obj: ProxyLogging,
http_client: "HttpConfig | None" = None,
):
## init logging object
self.proxy_logging_obj = proxy_logging_obj
self.iam_token_db_auth: bool | None = str_to_bool(os.getenv("IAM_TOKEN_DB_AUTH"))
verbose_proxy_logger.debug("Creating Prisma Client..")
try:
from prisma import Prisma
except Exception as e:
verbose_proxy_logger.error("Failed to import Prisma client: %s", e)
verbose_proxy_logger.error("This usually means 'prisma generate' hasn't been run yet.")
verbose_proxy_logger.error("Please run 'prisma generate' to generate the Prisma client.")
raise Exception("Unable to find Prisma binaries. Please run 'prisma generate' first.")
iam_flag: Final = self.iam_token_db_auth if self.iam_token_db_auth is not None else False
# When read-replica routing is on, tag log lines with [writer]/[reader]
# so the two wrappers' interleaved IAM refresh logs can be told apart.
# Single-DB deployments get an empty prefix (logs unchanged).
read_replica_url = os.getenv("DATABASE_URL_READ_REPLICA")
writer_log_prefix: Final = "[writer]" if read_replica_url else ""
if http_client is not None:
writer_wrapper = PrismaWrapper(
original_prisma=Prisma(http=http_client),
iam_token_db_auth=iam_flag,
log_prefix=writer_log_prefix,
)
else:
writer_wrapper = PrismaWrapper(
original_prisma=Prisma(),
iam_token_db_auth=iam_flag,
log_prefix=writer_log_prefix,
)View on GitHub (pinned to 77b7c6c40c)
Solutions
- Run 'prisma generate' (e.g., via litellm --config or prisma CLI) to generate Prisma binaries before starting the proxy.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/utils.py:3139 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/412966ecf6970409.
Report an issue: GitHub.