diff --git a/litellm/llms/chatgpt/authenticator.py b/litellm/llms/chatgpt/authenticator.py index 244083e92e9..eb8a8aabdbc 100644 --- a/litellm/llms/chatgpt/authenticator.py +++ b/litellm/llms/chatgpt/authenticator.py @@ -74,8 +74,8 @@ class Authenticator: "ChatGPT device-code login needs a human and cannot run inside a running event loop " "(for example the LiteLLM proxy). Log in once outside the proxy with " '`python -c "from litellm.llms.chatgpt.authenticator import Authenticator; ' - 'Authenticator().get_access_token()"` and mount the resulting ' - f"{self.auth_file} into the proxy, or set CHATGPT_TOKEN_DIR to a directory that already holds it." + 'Authenticator().get_access_token()"` and mount the resulting auth.json into the proxy, ' + "or set CHATGPT_TOKEN_DIR to a directory that already holds it." ), status_code=401, ) diff --git a/litellm/llms/github_copilot/authenticator.py b/litellm/llms/github_copilot/authenticator.py index 269eaaa88b6..1a51fd88608 100644 --- a/litellm/llms/github_copilot/authenticator.py +++ b/litellm/llms/github_copilot/authenticator.py @@ -64,9 +64,8 @@ class Authenticator: "GitHub Copilot device-code login needs a human and cannot run inside a running event loop " "(for example the LiteLLM proxy). Log in once outside the proxy with " '`python -c "from litellm.llms.github_copilot.authenticator import Authenticator; ' - 'Authenticator().get_access_token()"` and mount the resulting ' - f"{self.access_token_file} into the proxy, or set GITHUB_COPILOT_TOKEN_DIR to a directory " - "that already holds it." + 'Authenticator().get_access_token()"` and mount the resulting access-token file into ' + "the proxy, or set GITHUB_COPILOT_TOKEN_DIR to a directory that already holds it." ), status_code=401, ) diff --git a/tests/test_litellm/llms/chatgpt/test_chatgpt_authenticator.py b/tests/test_litellm/llms/chatgpt/test_chatgpt_authenticator.py index 982d4807caf..6c3c8adc948 100644 --- a/tests/test_litellm/llms/chatgpt/test_chatgpt_authenticator.py +++ b/tests/test_litellm/llms/chatgpt/test_chatgpt_authenticator.py @@ -87,6 +87,7 @@ class TestChatGPTAuthenticator: assert exc.value.status_code == 401 assert "event loop" in str(exc.value) + assert authenticator.auth_file not in str(exc.value) mock_login.assert_not_called() mock_wait.assert_not_called() @@ -104,6 +105,7 @@ class TestChatGPTAuthenticator: assert exc.value.status_code == 401 assert "event loop" in str(exc.value) + assert authenticator.auth_file not in str(exc.value) mock_login.assert_not_called() mock_wait.assert_not_called() diff --git a/tests/test_litellm/llms/github_copilot/test_github_copilot_authenticator.py b/tests/test_litellm/llms/github_copilot/test_github_copilot_authenticator.py index a1f72b541f7..98914fa4840 100644 --- a/tests/test_litellm/llms/github_copilot/test_github_copilot_authenticator.py +++ b/tests/test_litellm/llms/github_copilot/test_github_copilot_authenticator.py @@ -100,6 +100,7 @@ class TestGitHubCopilotAuthenticator: assert exc.value.status_code == 401 assert "event loop" in str(exc.value) + assert authenticator.access_token_file not in str(exc.value) mock_login.assert_not_called() def test_get_access_token_failure(self, authenticator):