diff --git a/litellm/proxy/litellm_pre_call_utils.py b/litellm/proxy/litellm_pre_call_utils.py index 152438d0573..d91d987fab6 100644 --- a/litellm/proxy/litellm_pre_call_utils.py +++ b/litellm/proxy/litellm_pre_call_utils.py @@ -3506,6 +3506,7 @@ _ANTHROPIC_API_HEADER_PROVIDERS: Final = ",".join( LlmProviders.ANTHROPIC.value, LlmProviders.BEDROCK.value, LlmProviders.BEDROCK_MANTLE.value, + LlmProviders.GITHUB_COPILOT.value, LlmProviders.VERTEX_AI.value, ) ) diff --git a/tests/unit/proxy/test_litellm_pre_call_utils.py b/tests/unit/proxy/test_litellm_pre_call_utils.py index c97a5d1337f..04650cc2f32 100644 --- a/tests/unit/proxy/test_litellm_pre_call_utils.py +++ b/tests/unit/proxy/test_litellm_pre_call_utils.py @@ -7613,7 +7613,7 @@ def test_oauth_credential_entry_is_scoped_to_anthropic_alone(): assert [entry["custom_llm_provider"] for entry in credential_entries] == ["anthropic"] -@pytest.mark.parametrize("custom_llm_provider", ["anthropic", "bedrock", "bedrock_mantle", "vertex_ai"]) +@pytest.mark.parametrize("custom_llm_provider", ["anthropic", "bedrock", "bedrock_mantle", "github_copilot", "vertex_ai"]) def test_client_anthropic_api_headers_reach_every_anthropic_messages_provider(custom_llm_provider): client_headers = { "anthropic-beta": "claude-code-20250219,interleaved-thinking-2025-05-14", diff --git a/tests/unit/proxy/test_proxy_utils.py b/tests/unit/proxy/test_proxy_utils.py index 44ab2155734..aae31ee2a4b 100644 --- a/tests/unit/proxy/test_proxy_utils.py +++ b/tests/unit/proxy/test_proxy_utils.py @@ -2004,7 +2004,7 @@ def test_provider_specific_header(): ) # Verify multi-provider support: anthropic headers work across multiple providers assert data["provider_specific_header"] == { - "custom_llm_provider": "anthropic,bedrock,bedrock_mantle,vertex_ai", + "custom_llm_provider": "anthropic,bedrock,bedrock_mantle,github_copilot,vertex_ai", "extra_headers": { "anthropic-beta": "prompt-caching-2024-07-31", }, @@ -2076,7 +2076,7 @@ def test_provider_specific_header_multi_provider(): assert "provider_specific_header" in data assert ( data["provider_specific_header"]["custom_llm_provider"] - == "anthropic,bedrock,bedrock_mantle,vertex_ai" + == "anthropic,bedrock,bedrock_mantle,github_copilot,vertex_ai" ) assert data["provider_specific_header"]["extra_headers"] == { "anthropic-beta": "context-1m-2025-08-07",