diff --git a/litellm/a2a_protocol/main.py b/litellm/a2a_protocol/main.py index 0067af3c7db..47a6d8be558 100644 --- a/litellm/a2a_protocol/main.py +++ b/litellm/a2a_protocol/main.py @@ -439,7 +439,7 @@ def _build_streaming_logging_obj( return logging_obj -async def asend_message_streaming( +async def asend_message_streaming( # noqa: PLR0915 a2a_client: Optional["A2AClientType"] = None, request: Optional["SendStreamingMessageRequest"] = None, api_base: Optional[str] = None, diff --git a/litellm/proxy/_experimental/mcp_server/server.py b/litellm/proxy/_experimental/mcp_server/server.py index 5c063839304..99f6a5234a1 100644 --- a/litellm/proxy/_experimental/mcp_server/server.py +++ b/litellm/proxy/_experimental/mcp_server/server.py @@ -1644,7 +1644,7 @@ if MCP_AVAILABLE: }, ) - async def execute_mcp_tool( + async def execute_mcp_tool( # noqa: PLR0915 name: str, arguments: Dict[str, Any], allowed_mcp_servers: List[MCPServer], diff --git a/litellm/proxy/agent_endpoints/a2a_endpoints.py b/litellm/proxy/agent_endpoints/a2a_endpoints.py index 344070d17fc..3ffced7a12c 100644 --- a/litellm/proxy/agent_endpoints/a2a_endpoints.py +++ b/litellm/proxy/agent_endpoints/a2a_endpoints.py @@ -269,7 +269,7 @@ async def get_agent_card( tags=["[beta] A2A Agents"], dependencies=[Depends(user_api_key_auth)], ) -async def invoke_agent_a2a( +async def invoke_agent_a2a( # noqa: PLR0915 agent_id: str, request: Request, fastapi_response: Response, diff --git a/litellm/proxy/management_endpoints/config_override_endpoints.py b/litellm/proxy/management_endpoints/config_override_endpoints.py index d17c4e9a7b0..48ea8c6b927 100644 --- a/litellm/proxy/management_endpoints/config_override_endpoints.py +++ b/litellm/proxy/management_endpoints/config_override_endpoints.py @@ -1,5 +1,4 @@ import asyncio -import json import os from typing import Any, Dict, Set @@ -7,7 +6,6 @@ from litellm.litellm_core_utils.safe_json_dumps import safe_dumps from litellm.litellm_core_utils.safe_json_loads import safe_json_loads from fastapi import APIRouter, Depends, HTTPException -from prisma.errors import RecordNotFoundError from pydantic import TypeAdapter import litellm @@ -338,7 +336,9 @@ async def delete_hashicorp_vault_config( await prisma_client.db.litellm_configoverrides.delete( where={"config_type": "hashicorp_vault"} ) - except RecordNotFoundError: + except Exception as e: + if e.__class__.__name__ != "RecordNotFoundError": + raise verbose_proxy_logger.debug( "No existing Hashicorp Vault config record to delete" ) diff --git a/litellm/proxy/management_endpoints/mcp_management_endpoints.py b/litellm/proxy/management_endpoints/mcp_management_endpoints.py index b48db72a536..f7a4cec301b 100644 --- a/litellm/proxy/management_endpoints/mcp_management_endpoints.py +++ b/litellm/proxy/management_endpoints/mcp_management_endpoints.py @@ -81,7 +81,6 @@ if MCP_AVAILABLE: delete_user_credential, get_all_mcp_servers_for_user, get_mcp_server, - get_user_credential, store_user_credential, update_mcp_server, ) diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.py index 27e6363e53d..c2df3db0e30 100644 --- a/tests/test_litellm/test_utils.py +++ b/tests/test_litellm/test_utils.py @@ -764,6 +764,7 @@ def test_aaamodel_prices_and_context_window_json_is_valid(): "/v1/audio/transcriptions", "/v1/audio/speech", "/v1/ocr", + "/vertex_ai/live", ], }, },