diff --git a/src/libs/Weave/Generated/Weave.Models.CostCreateInput.g.cs b/src/libs/Weave/Generated/Weave.Models.CostCreateInput.g.cs index 589bad3..35b5464 100644 --- a/src/libs/Weave/Generated/Weave.Models.CostCreateInput.g.cs +++ b/src/libs/Weave/Generated/Weave.Models.CostCreateInput.g.cs @@ -22,6 +22,18 @@ public sealed partial class CostCreateInput [global::System.Text.Json.Serialization.JsonRequired] public required double CompletionTokenCost { get; set; } + /// + /// Default Value: 0 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cache_read_input_token_cost")] + public double? CacheReadInputTokenCost { get; set; } + + /// + /// Default Value: 0 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cache_creation_input_token_cost")] + public double? CacheCreationInputTokenCost { get; set; } + /// /// The unit of the cost for the prompt tokens
/// Default Value: USD @@ -59,6 +71,12 @@ public sealed partial class CostCreateInput ///
/// /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 0 + /// /// /// The unit of the cost for the prompt tokens
/// Default Value: USD @@ -79,6 +97,8 @@ public sealed partial class CostCreateInput public CostCreateInput( double promptTokenCost, double completionTokenCost, + double? cacheReadInputTokenCost, + double? cacheCreationInputTokenCost, string? promptTokenCostUnit, string? completionTokenCostUnit, global::System.DateTime? effectiveDate, @@ -86,6 +106,8 @@ public CostCreateInput( { this.PromptTokenCost = promptTokenCost; this.CompletionTokenCost = completionTokenCost; + this.CacheReadInputTokenCost = cacheReadInputTokenCost; + this.CacheCreationInputTokenCost = cacheCreationInputTokenCost; this.PromptTokenCostUnit = promptTokenCostUnit; this.CompletionTokenCostUnit = completionTokenCostUnit; this.EffectiveDate = effectiveDate; diff --git a/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsage.g.cs b/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsage.g.cs index fc5640e..ca5d078 100644 --- a/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsage.g.cs +++ b/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsage.g.cs @@ -32,6 +32,18 @@ public sealed partial class LLMAggregatedUsage [global::System.Text.Json.Serialization.JsonPropertyName("total_tokens")] public int? TotalTokens { get; set; } + /// + /// Default Value: 0 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cache_read_input_tokens")] + public int? CacheReadInputTokens { get; set; } + + /// + /// Default Value: 0 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cache_creation_input_tokens")] + public int? CacheCreationInputTokens { get; set; } + /// /// /// @@ -44,6 +56,18 @@ public sealed partial class LLMAggregatedUsage [global::System.Text.Json.Serialization.JsonPropertyName("completion_tokens_total_cost")] public double? CompletionTokensTotalCost { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cache_read_input_tokens_total_cost")] + public double? CacheReadInputTokensTotalCost { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cache_creation_input_tokens_total_cost")] + public double? CacheCreationInputTokensTotalCost { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -65,8 +89,16 @@ public sealed partial class LLMAggregatedUsage /// /// Default Value: 0 /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 0 + /// /// /// + /// + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -75,15 +107,23 @@ public LLMAggregatedUsage( int? promptTokens, int? completionTokens, int? totalTokens, + int? cacheReadInputTokens, + int? cacheCreationInputTokens, double? promptTokensTotalCost, - double? completionTokensTotalCost) + double? completionTokensTotalCost, + double? cacheReadInputTokensTotalCost, + double? cacheCreationInputTokensTotalCost) { this.Requests = requests; this.PromptTokens = promptTokens; this.CompletionTokens = completionTokens; this.TotalTokens = totalTokens; + this.CacheReadInputTokens = cacheReadInputTokens; + this.CacheCreationInputTokens = cacheCreationInputTokens; this.PromptTokensTotalCost = promptTokensTotalCost; this.CompletionTokensTotalCost = completionTokensTotalCost; + this.CacheReadInputTokensTotalCost = cacheReadInputTokensTotalCost; + this.CacheCreationInputTokensTotalCost = cacheCreationInputTokensTotalCost; } /// diff --git a/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsageCacheCreationInputTokensTotalCost.Json.g.cs b/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsageCacheCreationInputTokensTotalCost.Json.g.cs new file mode 100644 index 0000000..d9d69d2 --- /dev/null +++ b/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsageCacheCreationInputTokensTotalCost.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Weave +{ + public sealed partial class LLMAggregatedUsageCacheCreationInputTokensTotalCost + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Weave.LLMAggregatedUsageCacheCreationInputTokensTotalCost? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Weave.LLMAggregatedUsageCacheCreationInputTokensTotalCost), + jsonSerializerContext) as global::Weave.LLMAggregatedUsageCacheCreationInputTokensTotalCost; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Weave.LLMAggregatedUsageCacheCreationInputTokensTotalCost? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Weave.LLMAggregatedUsageCacheCreationInputTokensTotalCost), + jsonSerializerContext).ConfigureAwait(false)) as global::Weave.LLMAggregatedUsageCacheCreationInputTokensTotalCost; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsageCacheCreationInputTokensTotalCost.g.cs b/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsageCacheCreationInputTokensTotalCost.g.cs new file mode 100644 index 0000000..db6e96e --- /dev/null +++ b/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsageCacheCreationInputTokensTotalCost.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace Weave +{ + /// + /// + /// + public sealed partial class LLMAggregatedUsageCacheCreationInputTokensTotalCost + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsageCacheReadInputTokensTotalCost.Json.g.cs b/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsageCacheReadInputTokensTotalCost.Json.g.cs new file mode 100644 index 0000000..486493f --- /dev/null +++ b/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsageCacheReadInputTokensTotalCost.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Weave +{ + public sealed partial class LLMAggregatedUsageCacheReadInputTokensTotalCost + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Weave.LLMAggregatedUsageCacheReadInputTokensTotalCost? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Weave.LLMAggregatedUsageCacheReadInputTokensTotalCost), + jsonSerializerContext) as global::Weave.LLMAggregatedUsageCacheReadInputTokensTotalCost; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Weave.LLMAggregatedUsageCacheReadInputTokensTotalCost? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Weave.LLMAggregatedUsageCacheReadInputTokensTotalCost), + jsonSerializerContext).ConfigureAwait(false)) as global::Weave.LLMAggregatedUsageCacheReadInputTokensTotalCost; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsageCacheReadInputTokensTotalCost.g.cs b/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsageCacheReadInputTokensTotalCost.g.cs new file mode 100644 index 0000000..cc695bb --- /dev/null +++ b/src/libs/Weave/Generated/Weave.Models.LLMAggregatedUsageCacheReadInputTokensTotalCost.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace Weave +{ + /// + /// + /// + public sealed partial class LLMAggregatedUsageCacheReadInputTokensTotalCost + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.Models.UsageMetricSpecMetric.g.cs b/src/libs/Weave/Generated/Weave.Models.UsageMetricSpecMetric.g.cs index 8cbec09..598ff71 100644 --- a/src/libs/Weave/Generated/Weave.Models.UsageMetricSpecMetric.g.cs +++ b/src/libs/Weave/Generated/Weave.Models.UsageMetricSpecMetric.g.cs @@ -8,6 +8,14 @@ namespace Weave /// public enum UsageMetricSpecMetric { + /// + /// + /// + CacheCreationInputTokens, + /// + /// + /// + CacheReadInputTokens, /// /// /// @@ -46,6 +54,8 @@ public static string ToValueString(this UsageMetricSpecMetric value) { return value switch { + UsageMetricSpecMetric.CacheCreationInputTokens => "cache_creation_input_tokens", + UsageMetricSpecMetric.CacheReadInputTokens => "cache_read_input_tokens", UsageMetricSpecMetric.InputCost => "input_cost", UsageMetricSpecMetric.InputTokens => "input_tokens", UsageMetricSpecMetric.OutputCost => "output_cost", @@ -62,6 +72,8 @@ public static string ToValueString(this UsageMetricSpecMetric value) { return value switch { + "cache_creation_input_tokens" => UsageMetricSpecMetric.CacheCreationInputTokens, + "cache_read_input_tokens" => UsageMetricSpecMetric.CacheReadInputTokens, "input_cost" => UsageMetricSpecMetric.InputCost, "input_tokens" => UsageMetricSpecMetric.InputTokens, "output_cost" => UsageMetricSpecMetric.OutputCost, diff --git a/src/libs/Weave/openapi.json b/src/libs/Weave/openapi.json index 795f99a..126ec5b 100644 --- a/src/libs/Weave/openapi.json +++ b/src/libs/Weave/openapi.json @@ -7657,6 +7657,16 @@ "type": "number", "title": "Completion Token Cost" }, + "cache_read_input_token_cost": { + "type": "number", + "title": "Cache Read Input Token Cost", + "default": 0 + }, + "cache_creation_input_token_cost": { + "type": "number", + "title": "Cache Creation Input Token Cost", + "default": 0 + }, "prompt_token_cost_unit": { "anyOf": [ { @@ -10838,6 +10848,16 @@ "title": "Total Tokens", "default": 0 }, + "cache_read_input_tokens": { + "type": "integer", + "title": "Cache Read Input Tokens", + "default": 0 + }, + "cache_creation_input_tokens": { + "type": "integer", + "title": "Cache Creation Input Tokens", + "default": 0 + }, "prompt_tokens_total_cost": { "anyOf": [ { @@ -10859,6 +10879,28 @@ } ], "title": "Completion Tokens Total Cost" + }, + "cache_read_input_tokens_total_cost": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Cache Read Input Tokens Total Cost" + }, + "cache_creation_input_tokens_total_cost": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Cache Creation Input Tokens Total Cost" } }, "type": "object", @@ -14151,6 +14193,8 @@ "input_tokens", "output_tokens", "total_tokens", + "cache_read_input_tokens", + "cache_creation_input_tokens", "input_cost", "output_cost", "total_cost"