Python: Added MCP headers for AzureAI (#1506)

* add mcp headers

* small fix
This commit is contained in:
Giles Odigwe
2025-10-16 05:42:45 +00:00
committed by GitHub
parent b64358df7e
commit db7f767180
2 changed files with 36 additions and 0 deletions
@@ -786,6 +786,10 @@ class AzureAIAgentClient(BaseChatClient):
server_label = mcp_tool.name.replace(" ", "_")
mcp_resource: dict[str, Any] = {"server_label": server_label}
# Add headers if they exist
if mcp_tool.headers:
mcp_resource["headers"] = mcp_tool.headers
if mcp_tool.approval_mode is not None:
match mcp_tool.approval_mode:
case str():