From c282dbaf3176dcf50d394bd96d2df9157e2ed46e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 10 May 2026 21:46:26 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...TokenHub.Models.ChatCompletionRequest.g.cs | 1 + ...okenHub.Models.ChatCompletionResponse.g.cs | 1 + .../TencentTokenHub.Models.Choice.g.cs | 1 + .../TencentTokenHub.Models.ContentPart.g.cs | 1 + ...encentTokenHub.Models.ContentPartFile.g.cs | 1 + ...ntTokenHub.Models.ContentPartImageUrl.g.cs | 1 + .../TencentTokenHub.Models.FunctionCall.g.cs | 1 + ...entTokenHub.Models.FunctionDefinition.g.cs | 1 + ...b.Models.FunctionDefinitionParameters.g.cs | 1 + .../TencentTokenHub.Models.Message.g.cs | 1 + ...TencentTokenHub.Models.ResponseFormat.g.cs | 1 + .../TencentTokenHub.Models.Tool.g.cs | 1 + .../TencentTokenHub.Models.ToolCall.g.cs | 1 + .../TencentTokenHub.Models.Usage.g.cs | 1 + ...b.Models.UsageCompletionTokensDetails.g.cs | 1 + ...enHub.Models.UsagePromptTokensDetails.g.cs | 1 + .../Generated/TencentTokenHub.OneOf.2.g.cs | 14 ++++++++++ .../TencentTokenHub.OptionsSupport.g.cs | 27 ++++++++++++++++++- 18 files changed, 56 insertions(+), 1 deletion(-) diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionRequest.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionRequest.g.cs index 13de0ca..1caca6e 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionRequest.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionRequest.g.cs @@ -113,5 +113,6 @@ public ChatCompletionRequest( public ChatCompletionRequest() { } + } } \ No newline at end of file diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionResponse.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionResponse.g.cs index 2897f20..97f9351 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionResponse.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionResponse.g.cs @@ -84,5 +84,6 @@ public ChatCompletionResponse( public ChatCompletionResponse() { } + } } \ No newline at end of file diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Choice.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Choice.g.cs index a4b5662..68cb5c8 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Choice.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Choice.g.cs @@ -66,5 +66,6 @@ public Choice( public Choice() { } + } } \ No newline at end of file diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPart.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPart.g.cs index 262d4f4..6f9b2d2 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPart.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPart.g.cs @@ -66,5 +66,6 @@ public ContentPart( public ContentPart() { } + } } \ No newline at end of file diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartFile.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartFile.g.cs index 02d14f8..3d51043 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartFile.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartFile.g.cs @@ -14,5 +14,6 @@ public sealed partial class ContentPartFile /// [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/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartImageUrl.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartImageUrl.g.cs index 71e3253..8cedbe9 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartImageUrl.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartImageUrl.g.cs @@ -14,5 +14,6 @@ public sealed partial class ContentPartImageUrl /// [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/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionCall.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionCall.g.cs index d66709d..795b57b 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionCall.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionCall.g.cs @@ -48,5 +48,6 @@ public FunctionCall( public FunctionCall() { } + } } \ No newline at end of file diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinition.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinition.g.cs index 0fa083e..9bf2171 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinition.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinition.g.cs @@ -57,5 +57,6 @@ public FunctionDefinition( public FunctionDefinition() { } + } } \ No newline at end of file diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinitionParameters.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinitionParameters.g.cs index 6f2a1a3..243f770 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinitionParameters.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinitionParameters.g.cs @@ -14,5 +14,6 @@ public sealed partial class FunctionDefinitionParameters /// [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/TencentTokenHub/Generated/TencentTokenHub.Models.Message.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Message.g.cs index 2651d66..5680a02 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Message.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Message.g.cs @@ -68,5 +68,6 @@ public Message( public Message() { } + } } \ No newline at end of file diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ResponseFormat.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ResponseFormat.g.cs index b4b30e6..743cdb0 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ResponseFormat.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ResponseFormat.g.cs @@ -39,5 +39,6 @@ public ResponseFormat( public ResponseFormat() { } + } } \ No newline at end of file diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Tool.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Tool.g.cs index 3daf425..78c99c3 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Tool.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Tool.g.cs @@ -48,5 +48,6 @@ public Tool( public Tool() { } + } } \ No newline at end of file diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ToolCall.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ToolCall.g.cs index f7af412..0c493c9 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ToolCall.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ToolCall.g.cs @@ -57,5 +57,6 @@ public ToolCall( public ToolCall() { } + } } \ No newline at end of file diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Usage.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Usage.g.cs index de82735..b3f821a 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Usage.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Usage.g.cs @@ -75,5 +75,6 @@ public Usage( public Usage() { } + } } \ No newline at end of file diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.UsageCompletionTokensDetails.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.UsageCompletionTokensDetails.g.cs index ab1b9c7..84a91ba 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.UsageCompletionTokensDetails.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.UsageCompletionTokensDetails.g.cs @@ -14,5 +14,6 @@ public sealed partial class UsageCompletionTokensDetails /// [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/TencentTokenHub/Generated/TencentTokenHub.Models.UsagePromptTokensDetails.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.UsagePromptTokensDetails.g.cs index ffc5c6f..f1c5dbd 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.UsagePromptTokensDetails.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.UsagePromptTokensDetails.g.cs @@ -14,5 +14,6 @@ public sealed partial class UsagePromptTokensDetails /// [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/TencentTokenHub/Generated/TencentTokenHub.OneOf.2.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.OneOf.2.g.cs index 737ec4c..c066a50 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.OneOf.2.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.OneOf.2.g.cs @@ -38,6 +38,13 @@ public bool TryPickValue1( return IsValue1; } + /// + /// + /// + public T1 PickValue1() => IsValue1 + ? Value1! + : throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}."); + /// /// /// @@ -67,6 +74,13 @@ public bool TryPickValue2( value = Value2; return IsValue2; } + + /// + /// + /// + public T2 PickValue2() => IsValue2 + ? Value2! + : throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}."); /// /// /// diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.OptionsSupport.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.OptionsSupport.g.cs index fe05f11..7498189 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.OptionsSupport.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.OptionsSupport.g.cs @@ -163,8 +163,24 @@ public sealed class AutoSDKAuthorizationProviderHook : global::TencentTokenHub.A { context = context ?? throw new global::System.ArgumentNullException(nameof(context)); + if (context.Request == null) + { + return; + } + + var perRequest = context.RequestOptions?.Authorizations; + if (perRequest != null && perRequest.Count > 0) + { + for (var index = 0; index < perRequest.Count; index++) + { + ApplyAuthorization(context.Request, perRequest[index]); + } + + return; + } + var provider = context.ClientOptions?.AuthorizationProvider; - if (provider == null || context.Request == null) + if (provider == null) { return; } @@ -237,6 +253,15 @@ public sealed class AutoSDKRequestOptions /// Overrides response buffering for this request when set. /// public bool? ReadResponseAsString { get; set; } + + /// + /// Optional per-request authorization values. When non-empty, the built-in + /// applies these instead of consulting + /// for this request only. + /// Useful for multi-tenant routing or "act-as" admin tooling that needs a different + /// credential per call without mutating shared client state. + /// + public global::System.Collections.Generic.IReadOnlyList? Authorizations { get; set; } } ///