1 write to AdditionalProperties
Microsoft.Extensions.AI.OpenAI (1)
OpenAIChatClient.cs (1)
302(usageDetails.AdditionalProperties = [])[nameof(tokenUsage.OutputTokenDetails)] = new Dictionary<string, object?>
10 references to AdditionalProperties
Microsoft.Extensions.AI.Abstractions (1)
UsageDetails.cs (1)
48if (AdditionalProperties is { } additionalProperties)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Contents\UsageContentTests.cs (1)
29Assert.Null(c.Details.AdditionalProperties);
Microsoft.Extensions.AI.OpenAI.Tests (8)
OpenAIChatClientTests.cs (8)
202Assert.NotNull(response.Usage.AdditionalProperties); 278Assert.NotNull(usage.Details.AdditionalProperties); 279Assert.Equal(new Dictionary<string, object> { [nameof(ChatOutputTokenUsageDetails.ReasoningTokenCount)] = 0 }, usage.Details.AdditionalProperties[nameof(ChatTokenUsage.OutputTokenDetails)]); 475Assert.NotNull(response.Usage.AdditionalProperties); 568Assert.NotNull(response.Usage.AdditionalProperties); 785Assert.NotNull(usage.Details.AdditionalProperties); 786Assert.Equal(new Dictionary<string, object> { [nameof(ChatOutputTokenUsageDetails.ReasoningTokenCount)] = 0 }, usage.Details.AdditionalProperties[nameof(ChatTokenUsage.OutputTokenDetails)]); 919Assert.NotNull(response.Usage.AdditionalProperties);