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 @@ -73,6 +73,9 @@ public partial interface ISubpackageChatClient
/// <param name="metadata">
/// Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
/// </param>
/// <param name="minP">
/// Minimum probability threshold relative to the most likely token. Tokens with probability below min_p * (probability of top token) are filtered out. Not all providers support this parameter.
/// </param>
/// <param name="modalities">
/// Output modalities for the response. Supported values are "text", "image", and "audio".
/// </param>
Expand All @@ -97,6 +100,12 @@ public partial interface ISubpackageChatClient
/// <param name="reasoning">
/// Configuration options for reasoning models
/// </param>
/// <param name="reasoningEffort">
/// Shorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ.
/// </param>
/// <param name="repetitionPenalty">
/// Penalizes tokens based on how much they have already appeared in the text. A value of 1.0 means no penalty. Values above 1.0 penalize repeated tokens more strongly. Not all providers support this parameter.
/// </param>
/// <param name="responseFormat">
/// Response format configuration
/// </param>
Expand Down Expand Up @@ -134,6 +143,12 @@ public partial interface ISubpackageChatClient
/// <param name="tools">
/// Available tools for function calling
/// </param>
/// <param name="topA">
/// Consider only tokens with "sufficiently high" probabilities based on the probability of the most likely token. Not all providers support this parameter.
/// </param>
/// <param name="topK">
/// Limits the model to choose from the top K most likely tokens at each step. A value of 1 means the model will always pick the most likely next token. Not all providers support this parameter.
/// </param>
/// <param name="topLogprobs">
/// Number of top log probabilities to return (0-20)
/// </param>
Expand Down Expand Up @@ -161,6 +176,7 @@ public partial interface ISubpackageChatClient
int? maxCompletionTokens = default,
int? maxTokens = default,
global::System.Collections.Generic.Dictionary<string, string>? metadata = default,
double? minP = default,
global::System.Collections.Generic.IList<global::OpenRouter.ChatRequestModalitiesItems>? modalities = default,
string? model = default,
global::System.Collections.Generic.IList<string>? models = default,
Expand All @@ -169,6 +185,8 @@ public partial interface ISubpackageChatClient
double? presencePenalty = default,
global::OpenRouter.ProviderPreferences? provider = default,
global::OpenRouter.ChatRequestReasoning? reasoning = default,
global::OpenRouter.OneOf<global::OpenRouter.ChatRequestReasoningEffort?, object>? reasoningEffort = default,
double? repetitionPenalty = default,
global::OpenRouter.ChatRequestResponseFormat? responseFormat = default,
object? route = default,
int? seed = default,
Expand All @@ -181,6 +199,8 @@ public partial interface ISubpackageChatClient
double? temperature = default,
global::OpenRouter.ChatToolChoice? toolChoice = default,
global::System.Collections.Generic.IList<global::OpenRouter.ChatFunctionTool>? tools = default,
double? topA = default,
int? topK = default,
int? topLogprobs = default,
double? topP = default,
global::OpenRouter.TraceConfig? trace = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public partial interface ISubpackagePresetsClient
/// <param name="metadata">
/// Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
/// </param>
/// <param name="minP">
/// Minimum probability threshold relative to the most likely token. Tokens with probability below min_p * (probability of top token) are filtered out. Not all providers support this parameter.
/// </param>
/// <param name="modalities">
/// Output modalities for the response. Supported values are "text", "image", and "audio".
/// </param>
Expand All @@ -91,6 +94,12 @@ public partial interface ISubpackagePresetsClient
/// <param name="reasoning">
/// Configuration options for reasoning models
/// </param>
/// <param name="reasoningEffort">
/// Shorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ.
/// </param>
/// <param name="repetitionPenalty">
/// Penalizes tokens based on how much they have already appeared in the text. A value of 1.0 means no penalty. Values above 1.0 penalize repeated tokens more strongly. Not all providers support this parameter.
/// </param>
/// <param name="responseFormat">
/// Response format configuration
/// </param>
Expand Down Expand Up @@ -128,6 +137,12 @@ public partial interface ISubpackagePresetsClient
/// <param name="tools">
/// Available tools for function calling
/// </param>
/// <param name="topA">
/// Consider only tokens with "sufficiently high" probabilities based on the probability of the most likely token. Not all providers support this parameter.
/// </param>
/// <param name="topK">
/// Limits the model to choose from the top K most likely tokens at each step. A value of 1 means the model will always pick the most likely next token. Not all providers support this parameter.
/// </param>
/// <param name="topLogprobs">
/// Number of top log probabilities to return (0-20)
/// </param>
Expand Down Expand Up @@ -155,6 +170,7 @@ public partial interface ISubpackagePresetsClient
int? maxCompletionTokens = default,
int? maxTokens = default,
global::System.Collections.Generic.Dictionary<string, string>? metadata = default,
double? minP = default,
global::System.Collections.Generic.IList<global::OpenRouter.ChatRequestModalitiesItems>? modalities = default,
string? model = default,
global::System.Collections.Generic.IList<string>? models = default,
Expand All @@ -163,6 +179,8 @@ public partial interface ISubpackagePresetsClient
double? presencePenalty = default,
global::OpenRouter.ProviderPreferences? provider = default,
global::OpenRouter.ChatRequestReasoning? reasoning = default,
global::OpenRouter.OneOf<global::OpenRouter.ChatRequestReasoningEffort?, object>? reasoningEffort = default,
double? repetitionPenalty = default,
global::OpenRouter.ChatRequestResponseFormat? responseFormat = default,
object? route = default,
int? seed = default,
Expand All @@ -175,6 +193,8 @@ public partial interface ISubpackagePresetsClient
double? temperature = default,
global::OpenRouter.ChatToolChoice? toolChoice = default,
global::System.Collections.Generic.IList<global::OpenRouter.ChatFunctionTool>? tools = default,
double? topA = default,
int? topK = default,
int? topLogprobs = default,
double? topP = default,
global::OpenRouter.TraceConfig? trace = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2795,6 +2795,8 @@ namespace OpenRouter

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestReasoningEffort?, object>),

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestReasoningEffort?, object>),

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestServiceTier?, object>),

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatUsageCompletionTokensDetails, object>),
Expand Down Expand Up @@ -6128,6 +6130,8 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestReasoningEffort?, object>),

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestReasoningEffort?, object>),

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestServiceTier?, object>),

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatUsageCompletionTokensDetails, object>),
Expand Down Expand Up @@ -9461,6 +9465,8 @@ internal sealed partial class SourceGenerationContextChunk1 : global::System.Tex

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestReasoningEffort?, object>),

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestReasoningEffort?, object>),

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestServiceTier?, object>),

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatUsageCompletionTokensDetails, object>),
Expand Down Expand Up @@ -12794,6 +12800,8 @@ internal sealed partial class SourceGenerationContextChunk2 : global::System.Tex

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestReasoningEffort?, object>),

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestReasoningEffort?, object>),

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestServiceTier?, object>),

typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatUsageCompletionTokensDetails, object>),
Expand Down Expand Up @@ -14657,6 +14665,7 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o
options.Converters.Add(new global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ResponsesRequestServiceTier?, object>());
options.Converters.Add(new global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ServiceTier2?, object>());
options.Converters.Add(new global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestReasoningEffort?, object>());
options.Converters.Add(new global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestReasoningEffort?, object>());
options.Converters.Add(new global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestServiceTier?, object>());
options.Converters.Add(new global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatUsageCompletionTokensDetails, object>());
options.Converters.Add(new global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatUsagePromptTokensDetails, object>());
Expand Down
56 changes: 56 additions & 0 deletions src/libs/OpenRouter/Generated/OpenRouter.Models.ChatRequest.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ public sealed partial class ChatRequest
[global::System.Text.Json.Serialization.JsonPropertyName("metadata")]
public global::System.Collections.Generic.Dictionary<string, string>? Metadata { get; set; }

/// <summary>
/// Minimum probability threshold relative to the most likely token. Tokens with probability below min_p * (probability of top token) are filtered out. Not all providers support this parameter.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("min_p")]
public double? MinP { get; set; }

/// <summary>
/// Output modalities for the response. Supported values are "text", "image", and "audio".
/// </summary>
Expand Down Expand Up @@ -118,6 +124,19 @@ public sealed partial class ChatRequest
[global::System.Text.Json.Serialization.JsonPropertyName("reasoning")]
public global::OpenRouter.ChatRequestReasoning? Reasoning { get; set; }

/// <summary>
/// Shorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("reasoning_effort")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenRouter.JsonConverters.OneOfJsonConverter<global::OpenRouter.ChatRequestReasoningEffort?, object>))]
public global::OpenRouter.OneOf<global::OpenRouter.ChatRequestReasoningEffort?, object>? ReasoningEffort { get; set; }

/// <summary>
/// Penalizes tokens based on how much they have already appeared in the text. A value of 1.0 means no penalty. Values above 1.0 penalize repeated tokens more strongly. Not all providers support this parameter.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("repetition_penalty")]
public double? RepetitionPenalty { get; set; }

/// <summary>
/// Response format configuration
/// </summary>
Expand Down Expand Up @@ -195,6 +214,18 @@ public sealed partial class ChatRequest
[global::System.Text.Json.Serialization.JsonPropertyName("tools")]
public global::System.Collections.Generic.IList<global::OpenRouter.ChatFunctionTool>? Tools { get; set; }

/// <summary>
/// Consider only tokens with "sufficiently high" probabilities based on the probability of the most likely token. Not all providers support this parameter.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("top_a")]
public double? TopA { get; set; }

/// <summary>
/// Limits the model to choose from the top K most likely tokens at each step. A value of 1 means the model will always pick the most likely next token. Not all providers support this parameter.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("top_k")]
public int? TopK { get; set; }

/// <summary>
/// Number of top log probabilities to return (0-20)
/// </summary>
Expand Down Expand Up @@ -256,6 +287,9 @@ public sealed partial class ChatRequest
/// <param name="metadata">
/// Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
/// </param>
/// <param name="minP">
/// Minimum probability threshold relative to the most likely token. Tokens with probability below min_p * (probability of top token) are filtered out. Not all providers support this parameter.
/// </param>
/// <param name="modalities">
/// Output modalities for the response. Supported values are "text", "image", and "audio".
/// </param>
Expand All @@ -280,6 +314,12 @@ public sealed partial class ChatRequest
/// <param name="reasoning">
/// Configuration options for reasoning models
/// </param>
/// <param name="reasoningEffort">
/// Shorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ.
/// </param>
/// <param name="repetitionPenalty">
/// Penalizes tokens based on how much they have already appeared in the text. A value of 1.0 means no penalty. Values above 1.0 penalize repeated tokens more strongly. Not all providers support this parameter.
/// </param>
/// <param name="responseFormat">
/// Response format configuration
/// </param>
Expand Down Expand Up @@ -317,6 +357,12 @@ public sealed partial class ChatRequest
/// <param name="tools">
/// Available tools for function calling
/// </param>
/// <param name="topA">
/// Consider only tokens with "sufficiently high" probabilities based on the probability of the most likely token. Not all providers support this parameter.
/// </param>
/// <param name="topK">
/// Limits the model to choose from the top K most likely tokens at each step. A value of 1 means the model will always pick the most likely next token. Not all providers support this parameter.
/// </param>
/// <param name="topLogprobs">
/// Number of top log probabilities to return (0-20)
/// </param>
Expand All @@ -343,6 +389,7 @@ public ChatRequest(
int? maxCompletionTokens,
int? maxTokens,
global::System.Collections.Generic.Dictionary<string, string>? metadata,
double? minP,
global::System.Collections.Generic.IList<global::OpenRouter.ChatRequestModalitiesItems>? modalities,
string? model,
global::System.Collections.Generic.IList<string>? models,
Expand All @@ -351,6 +398,8 @@ public ChatRequest(
double? presencePenalty,
global::OpenRouter.ProviderPreferences? provider,
global::OpenRouter.ChatRequestReasoning? reasoning,
global::OpenRouter.OneOf<global::OpenRouter.ChatRequestReasoningEffort?, object>? reasoningEffort,
double? repetitionPenalty,
global::OpenRouter.ChatRequestResponseFormat? responseFormat,
object? route,
int? seed,
Expand All @@ -363,6 +412,8 @@ public ChatRequest(
double? temperature,
global::OpenRouter.ChatToolChoice? toolChoice,
global::System.Collections.Generic.IList<global::OpenRouter.ChatFunctionTool>? tools,
double? topA,
int? topK,
int? topLogprobs,
double? topP,
global::OpenRouter.TraceConfig? trace,
Expand All @@ -378,6 +429,7 @@ public ChatRequest(
this.MaxTokens = maxTokens;
this.Messages = messages ?? throw new global::System.ArgumentNullException(nameof(messages));
this.Metadata = metadata;
this.MinP = minP;
this.Modalities = modalities;
this.Model = model;
this.Models = models;
Expand All @@ -386,6 +438,8 @@ public ChatRequest(
this.PresencePenalty = presencePenalty;
this.Provider = provider;
this.Reasoning = reasoning;
this.ReasoningEffort = reasoningEffort;
this.RepetitionPenalty = repetitionPenalty;
this.ResponseFormat = responseFormat;
this.Route = route;
this.Seed = seed;
Expand All @@ -398,6 +452,8 @@ public ChatRequest(
this.Temperature = temperature;
this.ToolChoice = toolChoice;
this.Tools = tools;
this.TopA = topA;
this.TopK = topK;
this.TopLogprobs = topLogprobs;
this.TopP = topP;
this.Trace = trace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace OpenRouter
{
/// <summary>
/// Constrains effort on reasoning for reasoning models
/// Shorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ.
/// </summary>
public enum ChatRequestReasoningEffort
{
Expand Down
Loading