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
10 changes: 10 additions & 0 deletions src/libs/OpenRouter/Generated/OpenRouter.IOpenRouterClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ public partial interface IOpenRouterClient : global::System.IDisposable
/// </summary>
public SubpackageBetaResponsesClient SubpackageBetaResponses { get; }

/// <summary>
///
/// </summary>
public SubpackageByokClient SubpackageByok { get; }

/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -104,6 +109,11 @@ public partial interface IOpenRouterClient : global::System.IDisposable
/// </summary>
public SubpackageOAuthClient SubpackageOAuth { get; }

/// <summary>
///
/// </summary>
public SubpackageObservabilityClient SubpackageObservability { get; }

/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#nullable enable

namespace OpenRouter
{
public partial interface ISubpackageByokClient
{
/// <summary>
/// Get a BYOK provider credential<br/>
/// Get a single bring-your-own-key (BYOK) provider credential by its `id`. Defaults to the authenticated entity's default workspace; use the `workspace_id` query parameter to scope to a different workspace. [Management key](/docs/guides/overview/auth/management-api-keys) required.
/// </summary>
/// <param name="id"></param>
/// <param name="workspaceId"></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.GetBYOKKeyResponse> GetByokKeyAsync(
global::System.Guid id,
global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Get a BYOK provider credential<br/>
/// Get a single bring-your-own-key (BYOK) provider credential by its `id`. Defaults to the authenticated entity's default workspace; use the `workspace_id` query parameter to scope to a different workspace. [Management key](/docs/guides/overview/auth/management-api-keys) required.
/// </summary>
/// <param name="id"></param>
/// <param name="workspaceId"></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.GetBYOKKeyResponse>> GetByokKeyAsResponseAsync(
global::System.Guid id,
global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#nullable enable

namespace OpenRouter
{
public partial interface ISubpackageByokClient
{
/// <summary>
/// List BYOK provider credentials<br/>
/// List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.
/// </summary>
/// <param name="offset"></param>
/// <param name="limit"></param>
/// <param name="workspaceId"></param>
/// <param name="provider">
/// Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`).
/// </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.ListBYOKKeysResponse> ListByokKeysAsync(
int? offset = default,
int? limit = default,
global::System.Guid? workspaceId = default,
global::OpenRouter.ByokGetParametersProvider? provider = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// List BYOK provider credentials<br/>
/// List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.
/// </summary>
/// <param name="offset"></param>
/// <param name="limit"></param>
/// <param name="workspaceId"></param>
/// <param name="provider">
/// Optional provider slug to filter by (e.g. `openai`, `anthropic`, `amazon-bedrock`).
/// </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.ListBYOKKeysResponse>> ListByokKeysAsResponseAsync(
int? offset = default,
int? limit = default,
global::System.Guid? workspaceId = default,
global::OpenRouter.ByokGetParametersProvider? provider = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

#nullable enable

namespace OpenRouter
{
/// <summary>
/// If no httpClient is provided, a new one will be created.<br/>
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
public partial interface ISubpackageByokClient : global::System.IDisposable
{
/// <summary>
/// The HttpClient instance.
/// </summary>
public global::System.Net.Http.HttpClient HttpClient { get; }

/// <summary>
/// The base URL for the API.
/// </summary>
public System.Uri? BaseUri { get; }

/// <summary>
/// The authorizations to use for the requests.
/// </summary>
public global::System.Collections.Generic.List<global::OpenRouter.EndPointAuthorization> Authorizations { get; }

/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }
/// <summary>
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// </summary>
public global::OpenRouter.AutoSDKClientOptions Options { get; }


/// <summary>
///
/// </summary>
global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }


}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#nullable enable

namespace OpenRouter
{
public partial interface ISubpackageObservabilityClient
{
/// <summary>
/// Get an observability destination<br/>
/// Fetch a single observability destination by its UUID. Defaults to the authenticated entity's default workspace — use `workspace_id` to override. [Management key](/docs/guides/overview/auth/management-api-keys) required.
/// </summary>
/// <param name="id"></param>
/// <param name="workspaceId"></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.GetObservabilityDestinationResponse> GetObservabilityDestinationAsync(
global::System.Guid id,
global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Get an observability destination<br/>
/// Fetch a single observability destination by its UUID. Defaults to the authenticated entity's default workspace — use `workspace_id` to override. [Management key](/docs/guides/overview/auth/management-api-keys) required.
/// </summary>
/// <param name="id"></param>
/// <param name="workspaceId"></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.GetObservabilityDestinationResponse>> GetObservabilityDestinationAsResponseAsync(
global::System.Guid id,
global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#nullable enable

namespace OpenRouter
{
public partial interface ISubpackageObservabilityClient
{
/// <summary>
/// List observability destinations<br/>
/// List the observability destinations configured for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace. Only destinations with stable release status are surfaced — destinations of other types are excluded. [Management key](/docs/guides/overview/auth/management-api-keys) required.
/// </summary>
/// <param name="offset"></param>
/// <param name="limit"></param>
/// <param name="workspaceId"></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.ListObservabilityDestinationsResponse> ListObservabilityDestinationsAsync(
int? offset = default,
int? limit = default,
global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// List observability destinations<br/>
/// List the observability destinations configured for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace. Only destinations with stable release status are surfaced — destinations of other types are excluded. [Management key](/docs/guides/overview/auth/management-api-keys) required.
/// </summary>
/// <param name="offset"></param>
/// <param name="limit"></param>
/// <param name="workspaceId"></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.ListObservabilityDestinationsResponse>> ListObservabilityDestinationsAsResponseAsync(
int? offset = default,
int? limit = default,
global::System.Guid? workspaceId = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

#nullable enable

namespace OpenRouter
{
/// <summary>
/// If no httpClient is provided, a new one will be created.<br/>
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
public partial interface ISubpackageObservabilityClient : global::System.IDisposable
{
/// <summary>
/// The HttpClient instance.
/// </summary>
public global::System.Net.Http.HttpClient HttpClient { get; }

/// <summary>
/// The base URL for the API.
/// </summary>
public System.Uri? BaseUri { get; }

/// <summary>
/// The authorizations to use for the requests.
/// </summary>
public global::System.Collections.Generic.List<global::OpenRouter.EndPointAuthorization> Authorizations { get; }

/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }
/// <summary>
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// </summary>
public global::OpenRouter.AutoSDKClientOptions Options { get; }


/// <summary>
///
/// </summary>
global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }


}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace OpenRouter.JsonConverters
{
/// <inheritdoc />
public sealed class ByokGetParametersProviderJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenRouter.ByokGetParametersProvider>
{
/// <inheritdoc />
public override global::OpenRouter.ByokGetParametersProvider 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::OpenRouter.ByokGetParametersProviderExtensions.ToEnum(stringValue) ?? default;
}

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

return default;
}

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

writer.WriteStringValue(global::OpenRouter.ByokGetParametersProviderExtensions.ToValueString(value));
}
}
}
Loading