From b83e6dae2db367979a0336545c8bc6b550b42dbf Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Fri, 17 Apr 2026 17:57:39 -0700 Subject: [PATCH] fix: select projection in registry query + move handler imports to top-level --- litellm/llms/litellm_proxy/skills/handler.py | 7 ++++++- litellm/proxy/anthropic_endpoints/skills_endpoints.py | 9 ++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/litellm/llms/litellm_proxy/skills/handler.py b/litellm/llms/litellm_proxy/skills/handler.py index 191a10e55f4..4c10e143014 100644 --- a/litellm/llms/litellm_proxy/skills/handler.py +++ b/litellm/llms/litellm_proxy/skills/handler.py @@ -275,7 +275,12 @@ class LiteLLMSkillsHandler: take=limit, skip=offset, order={"created_at": "desc"}, - include={}, + select={ + "skill_id": True, + "display_title": True, + "description": True, + "metadata": True, + }, ) result = [] diff --git a/litellm/proxy/anthropic_endpoints/skills_endpoints.py b/litellm/proxy/anthropic_endpoints/skills_endpoints.py index 1ebafc201bb..7e5a6dfaca1 100644 --- a/litellm/proxy/anthropic_endpoints/skills_endpoints.py +++ b/litellm/proxy/anthropic_endpoints/skills_endpoints.py @@ -14,10 +14,12 @@ from litellm.proxy.common_utils.http_parsing_utils import ( convert_upload_files_to_file_data, get_form_data, ) +from litellm.llms.litellm_proxy.skills.handler import LiteLLMSkillsHandler from litellm.types.llms.anthropic_skills import ( DeleteSkillResponse, ListSkillsResponse, Skill, + SkillRegistryItem, SkillRegistryResponse, TestGitHubConnectionRequest, TestGitHubConnectionResponse, @@ -248,7 +250,6 @@ async def list_skills( ) async def test_github_connection( body: TestGitHubConnectionRequest, - user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), ): """ Verify a GitHub PAT can access the given repo without storing anything. @@ -263,8 +264,6 @@ async def test_github_connection( -d '{"repo_url": "https://github.com/org/my-skill", "github_pat": "ghp_xxx"}' ``` """ - from litellm.llms.litellm_proxy.skills.handler import LiteLLMSkillsHandler - result = await LiteLLMSkillsHandler.test_github_connection( repo_url=body.repo_url, pat=body.github_pat, @@ -281,7 +280,6 @@ async def test_github_connection( async def list_skills_registry( limit: int = 20, offset: int = 0, - user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), ): """ Agent skill discovery endpoint. Returns lightweight skill metadata for agents @@ -296,9 +294,6 @@ async def list_skills_registry( -H "Authorization: Bearer your-key" ``` """ - from litellm.llms.litellm_proxy.skills.handler import LiteLLMSkillsHandler - from litellm.types.llms.anthropic_skills import SkillRegistryItem - registry_items = await LiteLLMSkillsHandler.list_skills_for_registry( limit=min(limit, 100), offset=offset,