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
@@ -0,0 +1,120 @@
#nullable enable

namespace OpenRouter
{
public partial interface ISubpackagePresetsClient
{
/// <summary>
/// Create a preset from a messages request body<br/>
/// Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
/// </summary>
/// <param name="slug"></param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::OpenRouter.ApiException"></exception>
global::System.Threading.Tasks.Task<global::OpenRouter.CreatePresetFromInferenceResponse> CreatePresetsMessagesAsync(
string slug,

global::OpenRouter.MessagesRequest request,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create a preset from a messages request body<br/>
/// Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
/// </summary>
/// <param name="slug"></param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::OpenRouter.ApiException"></exception>
global::System.Threading.Tasks.Task<global::OpenRouter.AutoSDKHttpResponse<global::OpenRouter.CreatePresetFromInferenceResponse>> CreatePresetsMessagesAsResponseAsync(
string slug,

global::OpenRouter.MessagesRequest request,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create a preset from a messages request body<br/>
/// Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
/// </summary>
/// <param name="slug"></param>
/// <param name="cacheControl">
/// Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
/// </param>
/// <param name="contextManagement"></param>
/// <param name="maxTokens"></param>
/// <param name="messages"></param>
/// <param name="metadata"></param>
/// <param name="model"></param>
/// <param name="models"></param>
/// <param name="outputConfig">
/// Configuration for controlling output behavior. Supports the effort parameter and structured output format.
/// </param>
/// <param name="plugins">
/// Plugins you want to enable for this request, including their settings.
/// </param>
/// <param name="provider">
/// When multiple model providers are available, optionally indicate your routing preference.
/// </param>
/// <param name="route">
/// Any type
/// </param>
/// <param name="serviceTier"></param>
/// <param name="sessionId">
/// A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
/// </param>
/// <param name="speed"></param>
/// <param name="stopSequences"></param>
/// <param name="stopServerToolsWhen">
/// Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`.
/// </param>
/// <param name="stream"></param>
/// <param name="system"></param>
/// <param name="temperature"></param>
/// <param name="thinking"></param>
/// <param name="toolChoice"></param>
/// <param name="tools"></param>
/// <param name="topK"></param>
/// <param name="topP"></param>
/// <param name="trace">
/// Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
/// </param>
/// <param name="user">
/// A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters.
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::OpenRouter.CreatePresetFromInferenceResponse> CreatePresetsMessagesAsync(
string slug,
string model,
global::OpenRouter.AnthropicCacheControlDirective? cacheControl = default,
global::OpenRouter.OneOf<global::OpenRouter.MessagesRequestContextManagement, object>? contextManagement = default,
int? maxTokens = default,
global::System.Collections.Generic.IList<global::OpenRouter.MessagesMessageParam>? messages = default,
global::OpenRouter.MessagesRequestMetadata? metadata = default,
global::System.Collections.Generic.IList<string>? models = default,
global::OpenRouter.MessagesOutputConfig? outputConfig = default,
global::System.Collections.Generic.IList<global::OpenRouter.MessagesRequestPluginsItems>? plugins = default,
global::OpenRouter.ProviderPreferences? provider = default,
object? route = default,
string? serviceTier = default,
string? sessionId = default,
global::OpenRouter.AnthropicSpeed? speed = default,
global::System.Collections.Generic.IList<string>? stopSequences = default,
global::System.Collections.Generic.IList<global::OpenRouter.StopServerToolsWhenCondition>? stopServerToolsWhen = default,
bool? stream = default,
global::OpenRouter.MessagesRequestSystem? system = default,
double? temperature = default,
global::OpenRouter.MessagesRequestThinking? thinking = default,
global::OpenRouter.MessagesRequestToolChoice? toolChoice = default,
global::System.Collections.Generic.IList<global::OpenRouter.MessagesRequestToolsItems>? tools = default,
int? topK = default,
double? topP = default,
global::OpenRouter.TraceConfig? trace = default,
string? user = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ public enum BYOKProviderSlug
/// <summary>
///
/// </summary>
Darkbloom,
/// <summary>
///
/// </summary>
Deepinfra,
/// <summary>
///
Expand Down Expand Up @@ -369,6 +373,7 @@ public static string ToValueString(this BYOKProviderSlug value)
BYOKProviderSlug.Cloudflare => "cloudflare",
BYOKProviderSlug.Cohere => "cohere",
BYOKProviderSlug.Crusoe => "crusoe",
BYOKProviderSlug.Darkbloom => "darkbloom",
BYOKProviderSlug.Deepinfra => "deepinfra",
BYOKProviderSlug.Deepseek => "deepseek",
BYOKProviderSlug.Dekallm => "dekallm",
Expand Down Expand Up @@ -460,6 +465,7 @@ public static string ToValueString(this BYOKProviderSlug value)
"cloudflare" => BYOKProviderSlug.Cloudflare,
"cohere" => BYOKProviderSlug.Cohere,
"crusoe" => BYOKProviderSlug.Crusoe,
"darkbloom" => BYOKProviderSlug.Darkbloom,
"deepinfra" => BYOKProviderSlug.Deepinfra,
"deepseek" => BYOKProviderSlug.Deepseek,
"dekallm" => BYOKProviderSlug.Dekallm,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ public enum ByokGetParametersProvider
/// <summary>
///
/// </summary>
Darkbloom,
/// <summary>
///
/// </summary>
Deepinfra,
/// <summary>
///
Expand Down Expand Up @@ -369,6 +373,7 @@ public static string ToValueString(this ByokGetParametersProvider value)
ByokGetParametersProvider.Cloudflare => "cloudflare",
ByokGetParametersProvider.Cohere => "cohere",
ByokGetParametersProvider.Crusoe => "crusoe",
ByokGetParametersProvider.Darkbloom => "darkbloom",
ByokGetParametersProvider.Deepinfra => "deepinfra",
ByokGetParametersProvider.Deepseek => "deepseek",
ByokGetParametersProvider.Dekallm => "dekallm",
Expand Down Expand Up @@ -460,6 +465,7 @@ public static string ToValueString(this ByokGetParametersProvider value)
"cloudflare" => ByokGetParametersProvider.Cloudflare,
"cohere" => ByokGetParametersProvider.Cohere,
"crusoe" => ByokGetParametersProvider.Crusoe,
"darkbloom" => ByokGetParametersProvider.Darkbloom,
"deepinfra" => ByokGetParametersProvider.Deepinfra,
"deepseek" => ByokGetParametersProvider.Deepseek,
"dekallm" => ByokGetParametersProvider.Dekallm,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ public enum ProviderName
/// <summary>
///
/// </summary>
Darkbloom,
/// <summary>
///
/// </summary>
DeepInfra,
/// <summary>
///
Expand Down Expand Up @@ -382,6 +386,7 @@ public static string ToValueString(this ProviderName value)
ProviderName.Cohere => "Cohere",
ProviderName.Crucible => "Crucible",
ProviderName.Crusoe => "Crusoe",
ProviderName.Darkbloom => "Darkbloom",
ProviderName.DeepInfra => "DeepInfra",
ProviderName.DeepSeek => "DeepSeek",
ProviderName.DekaLLM => "DekaLLM",
Expand Down Expand Up @@ -476,6 +481,7 @@ public static string ToValueString(this ProviderName value)
"Cohere" => ProviderName.Cohere,
"Crucible" => ProviderName.Crucible,
"Crusoe" => ProviderName.Crusoe,
"Darkbloom" => ProviderName.Darkbloom,
"DeepInfra" => ProviderName.DeepInfra,
"DeepSeek" => ProviderName.DeepSeek,
"DekaLLM" => ProviderName.DekaLLM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ public sealed partial class ProviderOptions
[global::System.Text.Json.Serialization.JsonPropertyName("crusoe")]
public object? Crusoe { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("darkbloom")]
public object? Darkbloom { get; set; }

/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -718,6 +724,7 @@ public sealed partial class ProviderOptions
/// <param name="crofai"></param>
/// <param name="crucible"></param>
/// <param name="crusoe"></param>
/// <param name="darkbloom"></param>
/// <param name="deepinfra"></param>
/// <param name="deepseek"></param>
/// <param name="dekallm"></param>
Expand Down Expand Up @@ -834,6 +841,7 @@ public ProviderOptions(
object? crofai,
object? crucible,
object? crusoe,
object? darkbloom,
object? deepinfra,
object? deepseek,
object? dekallm,
Expand Down Expand Up @@ -947,6 +955,7 @@ public ProviderOptions(
this.Crofai = crofai;
this.Crucible = crucible;
this.Crusoe = crusoe;
this.Darkbloom = darkbloom;
this.Deepinfra = deepinfra;
this.Deepseek = deepseek;
this.Dekallm = dekallm;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#nullable enable

namespace OpenRouter
{
public sealed partial class ProviderOptionsDarkbloom
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#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);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::OpenRouter.ProviderOptionsDarkbloom? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::OpenRouter.ProviderOptionsDarkbloom),
jsonSerializerContext) as global::OpenRouter.ProviderOptionsDarkbloom;
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#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::OpenRouter.ProviderOptionsDarkbloom? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::OpenRouter.ProviderOptionsDarkbloom>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::OpenRouter.ProviderOptionsDarkbloom?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::OpenRouter.ProviderOptionsDarkbloom),
jsonSerializerContext).ConfigureAwait(false)) as global::OpenRouter.ProviderOptionsDarkbloom;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#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<global::OpenRouter.ProviderOptionsDarkbloom?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::OpenRouter.ProviderOptionsDarkbloom?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

#nullable enable

namespace OpenRouter
{
/// <summary>
///
/// </summary>
public sealed partial class ProviderOptionsDarkbloom
{

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

}
}
Loading