From d93cdec5bff42ebc4bebdf112c91d4c24a7653b3 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2026 21:49:20 +0000 Subject: [PATCH] fix(proxy): accept all supported credential headers on the archive route Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../discovery_endpoints/agent_skills_endpoints.py | 12 ++++++++++-- .../test_agent_skills_endpoints.py | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/litellm/proxy/discovery_endpoints/agent_skills_endpoints.py b/litellm/proxy/discovery_endpoints/agent_skills_endpoints.py index b346f8d624f..b7cd5268a47 100644 --- a/litellm/proxy/discovery_endpoints/agent_skills_endpoints.py +++ b/litellm/proxy/discovery_endpoints/agent_skills_endpoints.py @@ -22,7 +22,7 @@ import litellm from litellm._logging import verbose_proxy_logger from litellm.caching.in_memory_cache import InMemoryCache from litellm.models.skills import LiteLLM_SkillsTable -from litellm.proxy._types import UserAPIKeyAuth +from litellm.proxy._types import SpecialHeaders, UserAPIKeyAuth from litellm.proxy.discovery_endpoints.agent_skills_archive import SkillArchive, build_skill_archive from litellm.types.proxy.discovery_endpoints.agent_skills_endpoints import ( MAX_SKILL_DESCRIPTION_LENGTH, @@ -70,7 +70,15 @@ async def archive_caller(request: Request) -> UserAPIKeyAuth | None: return None from litellm.proxy.auth.user_api_key_auth import user_api_key_auth - return await user_api_key_auth(request=request, api_key=request.headers.get("Authorization", "")) + return await user_api_key_auth( + request=request, + api_key=request.headers.get(SpecialHeaders.openai_authorization.value, ""), + azure_api_key_header=request.headers.get(SpecialHeaders.azure_authorization.value), + anthropic_api_key_header=request.headers.get(SpecialHeaders.anthropic_authorization.value), + google_ai_studio_api_key_header=request.headers.get(SpecialHeaders.google_ai_studio_authorization.value), + azure_apim_header=request.headers.get(SpecialHeaders.azure_apim_authorization.value), + custom_litellm_key_header=request.headers.get(SpecialHeaders.custom_litellm_api_key.value), + ) async def stored_skill( diff --git a/tests/test_litellm/proxy/discovery_endpoints/test_agent_skills_endpoints.py b/tests/test_litellm/proxy/discovery_endpoints/test_agent_skills_endpoints.py index 47af4bcefb8..420302360f4 100644 --- a/tests/test_litellm/proxy/discovery_endpoints/test_agent_skills_endpoints.py +++ b/tests/test_litellm/proxy/discovery_endpoints/test_agent_skills_endpoints.py @@ -183,7 +183,7 @@ def authenticated_client_for( app.include_router(router) - seen: list[UserAPIKeyAuth | None] = [] + seen: list[UserAPIKeyAuth | None] = [] # mutable-ok: test spy recording the resolved caller def _skill( skill_id: str,