{"record":{"id":"412966ecf6970409","repo":"BerriAI/litellm","slug":"unable-to-find-prisma-binaries-please-run-prisma","errorCode":null,"errorMessage":"Unable to find Prisma binaries. Please run 'prisma generate' first.","messagePattern":"Unable to find Prisma binaries\\. Please run 'prisma generate' first\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/proxy/utils.py","lineNumber":3139,"sourceCode":"    PLANNED_ENGINE_REPLACEMENT_SETTLE_SECONDS: ClassVar[float] = 5.0\n\n    def __init__(\n        self,\n        database_url: str,\n        proxy_logging_obj: ProxyLogging,\n        http_client: \"HttpConfig | None\" = None,\n    ):\n        ## init logging object\n        self.proxy_logging_obj = proxy_logging_obj\n        self.iam_token_db_auth: bool | None = str_to_bool(os.getenv(\"IAM_TOKEN_DB_AUTH\"))\n        verbose_proxy_logger.debug(\"Creating Prisma Client..\")\n        try:\n            from prisma import Prisma\n        except Exception as e:\n            verbose_proxy_logger.error(\"Failed to import Prisma client: %s\", e)\n            verbose_proxy_logger.error(\"This usually means 'prisma generate' hasn't been run yet.\")\n            verbose_proxy_logger.error(\"Please run 'prisma generate' to generate the Prisma client.\")\n            raise Exception(\"Unable to find Prisma binaries. Please run 'prisma generate' first.\")\n        iam_flag: Final = self.iam_token_db_auth if self.iam_token_db_auth is not None else False\n        # When read-replica routing is on, tag log lines with [writer]/[reader]\n        # so the two wrappers' interleaved IAM refresh logs can be told apart.\n        # Single-DB deployments get an empty prefix (logs unchanged).\n        read_replica_url = os.getenv(\"DATABASE_URL_READ_REPLICA\")\n        writer_log_prefix: Final = \"[writer]\" if read_replica_url else \"\"\n        if http_client is not None:\n            writer_wrapper = PrismaWrapper(\n                original_prisma=Prisma(http=http_client),\n                iam_token_db_auth=iam_flag,\n                log_prefix=writer_log_prefix,\n            )\n        else:\n            writer_wrapper = PrismaWrapper(\n                original_prisma=Prisma(),\n                iam_token_db_auth=iam_flag,\n                log_prefix=writer_log_prefix,\n            )","sourceCodeStart":3121,"sourceCodeEnd":3157,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/utils.py#L3121-L3157","documentation":"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.","triggerScenarios":"Thrown at litellm/proxy/utils.py:3139 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run 'prisma generate' (e.g., via litellm --config or prisma CLI) to generate Prisma binaries before starting the proxy."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}