mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
fix: fix linting errors
This commit is contained in:
parent
208cd5fcb5
commit
ba5cc5a5b3
3 changed files with 5 additions and 5 deletions
|
|
@ -164,7 +164,7 @@ class MCPRequestHandler:
|
|||
Returns:
|
||||
Dict[str, Dict[str, str]]: Mapping of server alias to header dict
|
||||
"""
|
||||
server_auth_headers = {}
|
||||
server_auth_headers: Dict[str, Dict[str, str]] = {}
|
||||
prefix = "x-mcp-"
|
||||
|
||||
for header_name, header_value in headers.items():
|
||||
|
|
|
|||
|
|
@ -729,7 +729,7 @@ class MCPServerManager:
|
|||
)
|
||||
|
||||
# Get server-specific auth header if available
|
||||
server_auth_header = None
|
||||
server_auth_header: Optional[Union[Dict[str, str], str]] = None
|
||||
if mcp_server_auth_headers and mcp_server.alias:
|
||||
server_auth_header = mcp_server_auth_headers.get(mcp_server.alias)
|
||||
elif mcp_server_auth_headers and mcp_server.server_name:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import importlib
|
||||
from typing import Dict, List, Optional
|
||||
from typing import Dict, List, Optional, Union
|
||||
|
||||
from fastapi import APIRouter, Depends, Query, Request
|
||||
|
||||
|
|
@ -34,9 +34,9 @@ if MCP_AVAILABLE:
|
|||
############ MCP Server REST API Routes #################
|
||||
def _get_server_auth_header(
|
||||
server,
|
||||
mcp_server_auth_headers: Optional[Dict[str, str]],
|
||||
mcp_server_auth_headers: Optional[Dict[str, Dict[str, str]]],
|
||||
mcp_auth_header: Optional[str],
|
||||
) -> Optional[str]:
|
||||
) -> Optional[Union[Dict[str, str], str]]:
|
||||
"""Helper function to get server-specific auth header with case-insensitive matching."""
|
||||
if mcp_server_auth_headers and server.alias:
|
||||
normalized_server_alias = server.alias.lower()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue