8 writes to Headers
Microsoft.Extensions.AI.Abstractions.Tests (2)
Tools\HostedMcpServerToolTests.cs (2)
95
tool.
Headers
= new Dictionary<string, string> { ["X-Custom-Header"] = "value1" };
106
Headers
= new Dictionary<string, string>
Microsoft.Extensions.AI.OpenAI.Tests (6)
OpenAIConversionTests.cs (3)
492
Headers
= new Dictionary<string, string> { ["Authorization"] = "Bearer test-token" }
510
Headers
= new Dictionary<string, string>
627
Headers
= new Dictionary<string, string> { ["Authorization"] = "Bearer connector-token" }
OpenAIResponseClientIntegrationTests.cs (1)
524
Headers
= new Dictionary<string, string> { ["Authorization"] = $"Bearer {accessToken}" },
OpenAIResponseClientTests.cs (2)
2717
Headers
= new Dictionary<string, string>
2808
Headers
= new Dictionary<string, string>
13 references to Headers
Microsoft.Extensions.AI.Abstractions.Tests (9)
Tools\HostedMcpServerToolTests.cs (9)
26
Assert.Null(tool.
Headers
);
94
Assert.Null(tool.
Headers
);
96
Assert.NotNull(tool.
Headers
);
97
Assert.Single(tool.
Headers
);
98
Assert.Equal("value1", tool.
Headers
["X-Custom-Header"]);
115
Assert.NotNull(tool.
Headers
);
116
Assert.Equal(2, tool.
Headers
.Count);
117
Assert.Equal("Bearer token456", tool.
Headers
["Authorization"]);
118
Assert.Equal("value2", tool.
Headers
["X-Custom"]);
Microsoft.Extensions.AI.OpenAI (4)
OpenAIRealtimeClientSession.cs (1)
558
if (mcpTool.
Headers
is { } headers)
OpenAIResponsesChatClient.cs (3)
803
if (mcpTool.
Headers
is { Count: > 0 })
805
responsesMcpTool.Headers = mcpTool.
Headers
;
813
if (mcpTool.
Headers
?.TryGetValue("Authorization", out string? authHeader) is true &&