fix(mcp): satisfy type discipline gate

This commit is contained in:
MokshaVora 2026-08-10 21:01:26 +05:30
parent f82e588a50
commit 7421705c09
2 changed files with 5 additions and 3 deletions

View file

@ -774,7 +774,7 @@ def _without_authorization(
def _is_gateway_attribution_header(header_name: str) -> bool:
return header_name.lower() in {"x-litellm-tags", "x-litellm-end-user-id"}
return header_name.lower() in frozenset(("x-litellm-tags", "x-litellm-end-user-id"))
def _format_byok_openapi_auth_header(mcp_server: MCPServer, mcp_auth_header: str) -> str:

View file

@ -788,8 +788,10 @@ if MCP_AVAILABLE:
request_tags: Final = LiteLLMProxyRequestSetup.add_request_tag_to_metadata(
llm_router=None,
headers={key.lower(): value for key, value in (raw_headers or {}).items()},
data={},
headers={ # mutable-ok: request-tag helper accepts a mutable header mapping
key.lower(): value for key, value in (raw_headers or {}).items()
},
data={}, # mutable-ok: request-tag helper mutates request metadata in place
)
listing: Final = await _list_mcp_tools(
user_api_key_auth=user_api_key_auth,