Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@ partial void ProcessCreateChatCompletionResponseContent(
/// <param name="fallbackConfig">
/// Configuration for fallback behavior, including retry and depth settings. See [Specify fallback models](https://www.assemblyai.com/docs/llm-gateway/fallback) for more details.
/// </param>
/// <param name="reasoning">
/// Controls reasoning behavior for supported models. OpenAI-compatible models, Gemini 3+ models, and Anthropic models support reasoning. Use `effort` to set the reasoning effort level, or `max_tokens` to cap the number of tokens the model can use for reasoning.
/// </param>
/// <param name="postProcessingSteps">
/// An ordered list of post-processing steps to apply to the model's response after generation. Currently supports `json-repair`, which automatically fixes malformed JSON in LLM Gateway content responses. See [Post-processing](https://www.assemblyai.com/docs/llm-gateway/post-processing) for details.
/// </param>
Expand All @@ -506,6 +509,7 @@ partial void ProcessCreateChatCompletionResponseContent(
global::AssemblyAI.ResponseFormat? responseFormat = default,
global::System.Collections.Generic.IList<global::AssemblyAI.FallbackObject>? fallbacks = default,
global::AssemblyAI.FallbackConfig? fallbackConfig = default,
global::AssemblyAI.Reasoning? reasoning = default,
global::System.Collections.Generic.IList<global::AssemblyAI.PostProcessingStep>? postProcessingSteps = default,
global::AssemblyAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
Expand All @@ -524,6 +528,7 @@ partial void ProcessCreateChatCompletionResponseContent(
ResponseFormat = responseFormat,
Fallbacks = fallbacks,
FallbackConfig = fallbackConfig,
Reasoning = reasoning,
PostProcessingSteps = postProcessingSteps,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ public partial interface IAssemblyAIClient
/// <param name="fallbackConfig">
/// Configuration for fallback behavior, including retry and depth settings. See [Specify fallback models](https://www.assemblyai.com/docs/llm-gateway/fallback) for more details.
/// </param>
/// <param name="reasoning">
/// Controls reasoning behavior for supported models. OpenAI-compatible models, Gemini 3+ models, and Anthropic models support reasoning. Use `effort` to set the reasoning effort level, or `max_tokens` to cap the number of tokens the model can use for reasoning.
/// </param>
/// <param name="postProcessingSteps">
/// An ordered list of post-processing steps to apply to the model's response after generation. Currently supports `json-repair`, which automatically fixes malformed JSON in LLM Gateway content responses. See [Post-processing](https://www.assemblyai.com/docs/llm-gateway/post-processing) for details.
/// </param>
Expand All @@ -109,6 +112,7 @@ public partial interface IAssemblyAIClient
global::AssemblyAI.ResponseFormat? responseFormat = default,
global::System.Collections.Generic.IList<global::AssemblyAI.FallbackObject>? fallbacks = default,
global::AssemblyAI.FallbackConfig? fallbackConfig = default,
global::AssemblyAI.Reasoning? reasoning = default,
global::System.Collections.Generic.IList<global::AssemblyAI.PostProcessingStep>? postProcessingSteps = default,
global::AssemblyAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace AssemblyAI.JsonConverters
{
/// <inheritdoc />
public sealed class ReasoningEffortJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::AssemblyAI.ReasoningEffort>
{
/// <inheritdoc />
public override global::AssemblyAI.ReasoningEffort Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::AssemblyAI.ReasoningEffortExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::AssemblyAI.ReasoningEffort)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::AssemblyAI.ReasoningEffort);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::AssemblyAI.ReasoningEffort value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::AssemblyAI.ReasoningEffortExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace AssemblyAI.JsonConverters
{
/// <inheritdoc />
public sealed class ReasoningEffortNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::AssemblyAI.ReasoningEffort?>
{
/// <inheritdoc />
public override global::AssemblyAI.ReasoningEffort? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::AssemblyAI.ReasoningEffortExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::AssemblyAI.ReasoningEffort)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::AssemblyAI.ReasoningEffort?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::AssemblyAI.ReasoningEffort? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::AssemblyAI.ReasoningEffortExtensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ namespace AssemblyAI

typeof(global::AssemblyAI.JsonConverters.ResponseFormatTypeNullableJsonConverter),

typeof(global::AssemblyAI.JsonConverters.ReasoningEffortJsonConverter),

typeof(global::AssemblyAI.JsonConverters.ReasoningEffortNullableJsonConverter),

typeof(global::AssemblyAI.JsonConverters.PostProcessingStepTypeJsonConverter),

typeof(global::AssemblyAI.JsonConverters.PostProcessingStepTypeNullableJsonConverter),
Expand Down Expand Up @@ -295,6 +299,8 @@ namespace AssemblyAI
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.FallbackObject))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::AssemblyAI.Message>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.FallbackConfig))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.ReasoningEffort), TypeInfoPropertyName = "ReasoningEffort2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.Reasoning))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.PostProcessingStepType), TypeInfoPropertyName = "PostProcessingStepType2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.PostProcessingStep))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AssemblyAI.LLMGatewayRequest))]
Expand Down
Loading