diff --git a/litellm/llms/chatgpt/db_authenticator.py b/litellm/llms/chatgpt/db_authenticator.py index e1abed66b84..9d823120516 100644 --- a/litellm/llms/chatgpt/db_authenticator.py +++ b/litellm/llms/chatgpt/db_authenticator.py @@ -147,6 +147,10 @@ async def persist_credential_to_db(item: CredentialItem) -> None: login endpoint (which can ``await`` it directly on the request event loop). """ + # Inline imports: proxy_server transitively imports this module via + # the OAuth router (avoids circular), and prisma_client is a + # module-level global mutated at proxy startup — a top-level import + # would bind the stale None reference rather than the live client. from litellm.proxy.common_utils.encrypt_decrypt_utils import encrypt_value_helper from litellm.proxy.proxy_server import prisma_client diff --git a/litellm/llms/github_copilot/db_authenticator.py b/litellm/llms/github_copilot/db_authenticator.py index 866ec3f3d31..a2470f4320d 100644 --- a/litellm/llms/github_copilot/db_authenticator.py +++ b/litellm/llms/github_copilot/db_authenticator.py @@ -159,6 +159,10 @@ def _persist_item_sync(item: CredentialItem) -> None: async def persist_credential_to_db(item: CredentialItem) -> None: + # Inline imports: proxy_server transitively imports this module via + # the OAuth router (avoids circular), and prisma_client is a + # module-level global mutated at proxy startup — a top-level import + # would bind the stale None reference rather than the live client. from litellm.proxy.common_utils.encrypt_decrypt_utils import encrypt_value_helper from litellm.proxy.proxy_server import prisma_client