From 559d06a55cd298de889ca5d4c88e27680404de30 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Tue, 8 Jul 2025 09:07:08 -0700 Subject: [PATCH] Fix API base url for Github Copilot provider (#12418) --- litellm/llms/github_copilot/chat/transformation.py | 2 +- .../llms/github_copilot/test_github_copilot_transformation.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/llms/github_copilot/chat/transformation.py b/litellm/llms/github_copilot/chat/transformation.py index 395eb81c5ba..b104749e1ce 100644 --- a/litellm/llms/github_copilot/chat/transformation.py +++ b/litellm/llms/github_copilot/chat/transformation.py @@ -8,7 +8,7 @@ from ..common_utils import GetAPIKeyError class GithubCopilotConfig(OpenAIConfig): - GITHUB_COPILOT_API_BASE = "https://api.github.com/copilot/v1" + GITHUB_COPILOT_API_BASE = "https://api.githubcopilot.com/" def __init__( self, api_key: Optional[str] = None, diff --git a/tests/test_litellm/llms/github_copilot/test_github_copilot_transformation.py b/tests/test_litellm/llms/github_copilot/test_github_copilot_transformation.py index 0e5a149f042..7f61248c09d 100644 --- a/tests/test_litellm/llms/github_copilot/test_github_copilot_transformation.py +++ b/tests/test_litellm/llms/github_copilot/test_github_copilot_transformation.py @@ -54,7 +54,7 @@ def test_github_copilot_config_get_openai_compatible_provider_info(): custom_llm_provider="github_copilot", ) - assert api_base == "https://api.github.com/copilot/v1" + assert api_base == "https://api.githubcopilot.com/" assert dynamic_api_key == mock_api_key assert custom_llm_provider == "github_copilot"