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 @@ -813,7 +813,7 @@ partial void ProcessCreateBatchesResponseContent(
/// <param name="endpoint"></param>
/// <param name="model"></param>
/// <param name="provider">
/// Batch provider routing preferences. Only `provider.only` is supported.<br/>
/// Batch provider routing preferences. Only `provider.only` and `provider.allow_fallbacks` are supported.<br/>
/// Example: {"only":["google-vertex"]}
/// </param>
/// <param name="requests"></param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public partial interface IBatchClient
/// <param name="endpoint"></param>
/// <param name="model"></param>
/// <param name="provider">
/// Batch provider routing preferences. Only `provider.only` is supported.<br/>
/// Batch provider routing preferences. Only `provider.only` and `provider.allow_fallbacks` are supported.<br/>
/// Example: {"only":["google-vertex"]}
/// </param>
/// <param name="requests"></param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@
namespace OpenRouter
{
/// <summary>
/// Batch provider routing preferences. Only `provider.only` is supported.<br/>
/// Batch provider routing preferences. Only `provider.only` and `provider.allow_fallbacks` are supported.<br/>
/// Example: {"only":["google-vertex"]}
/// </summary>
public sealed partial class BatchProviderPreferences
{
/// <summary>
/// Whether to allow backup providers to serve requests<br/>
/// - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>
/// - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("allow_fallbacks")]
public bool? AllowFallbacks { get; set; }

/// <summary>
/// List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.<br/>
/// Example: [openai, anthropic]
Expand All @@ -26,6 +34,11 @@ public sealed partial class BatchProviderPreferences
/// <summary>
/// Initializes a new instance of the <see cref="BatchProviderPreferences" /> class.
/// </summary>
/// <param name="allowFallbacks">
/// Whether to allow backup providers to serve requests<br/>
/// - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>
/// - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
/// </param>
/// <param name="only">
/// List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.<br/>
/// Example: [openai, anthropic]
Expand All @@ -34,8 +47,10 @@ public sealed partial class BatchProviderPreferences
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public BatchProviderPreferences(
bool? allowFallbacks,
global::System.Collections.Generic.IList<global::OpenRouter.AnyOf<global::OpenRouter.ProviderName?, string>>? only)
{
this.AllowFallbacks = allowFallbacks;
this.Only = only;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public sealed partial class BatchSubmitBody
public required string Model { get; set; }

/// <summary>
/// Batch provider routing preferences. Only `provider.only` is supported.<br/>
/// Batch provider routing preferences. Only `provider.only` and `provider.allow_fallbacks` are supported.<br/>
/// Example: {"only":["google-vertex"]}
/// </summary>
/// <example>{"only":["google-vertex"]}</example>
Expand Down Expand Up @@ -61,7 +61,7 @@ public sealed partial class BatchSubmitBody
/// Default Value: 24h
/// </param>
/// <param name="provider">
/// Batch provider routing preferences. Only `provider.only` is supported.<br/>
/// Batch provider routing preferences. Only `provider.only` and `provider.allow_fallbacks` are supported.<br/>
/// Example: {"only":["google-vertex"]}
/// </param>
#if NET7_0_OR_GREATER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public sealed partial class CreateAudioTranscriptionsRequest
public string? SessionId { get; set; }

/// <summary>
/// Publicly reachable http(s) URL of the audio file, downloaded by the provider directly (no size limit on our side). The format is derived from the URL path extension. Only supported by some providers; exactly one of file or source_url is required.
/// Publicly reachable http(s) URL of the audio file, downloaded by the provider directly (no size limit on our side). The request is billed on the duration the provider reports, so your balance must cover the provider's maximum accepted duration at the endpoint rate (402 otherwise); private-network, loopback, link-local, cloud-metadata, and tunnel hosts are rejected. The format is derived from the URL path extension. Only supported by some providers; exactly one of file or source_url is required.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("source_url")]
public string? SourceUrl { get; set; }
Expand Down Expand Up @@ -131,7 +131,7 @@ public sealed partial class CreateAudioTranscriptionsRequest
/// A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence.
/// </param>
/// <param name="sourceUrl">
/// Publicly reachable http(s) URL of the audio file, downloaded by the provider directly (no size limit on our side). The format is derived from the URL path extension. Only supported by some providers; exactly one of file or source_url is required.
/// Publicly reachable http(s) URL of the audio file, downloaded by the provider directly (no size limit on our side). The request is billed on the duration the provider reports, so your balance must cover the provider's maximum accepted duration at the endpoint rate (402 otherwise); private-network, loopback, link-local, cloud-metadata, and tunnel hosts are rejected. The format is derived from the URL path extension. Only supported by some providers; exactly one of file or source_url is required.
/// </param>
/// <param name="temperature">
/// The sampling temperature.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public sealed partial class STTUrlInputAudio
public string? Format { get; set; }

/// <summary>
/// Publicly reachable http(s) URL of the audio file. The provider downloads it directly, so the inline upload size limit does not apply. Only supported by some providers.
/// Publicly reachable http(s) URL of the audio file. The provider downloads it directly, so the inline upload size limit does not apply, and the request is billed on the duration the provider reports; your balance must cover the provider's maximum accepted duration at the endpoint rate (returns 402 otherwise). Private-network, loopback, link-local, cloud-metadata, and tunnel hosts are rejected. Only supported by some providers.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("url")]
[global::System.Text.Json.Serialization.JsonRequired]
Expand All @@ -32,7 +32,7 @@ public sealed partial class STTUrlInputAudio
/// Initializes a new instance of the <see cref="STTUrlInputAudio" /> class.
/// </summary>
/// <param name="url">
/// Publicly reachable http(s) URL of the audio file. The provider downloads it directly, so the inline upload size limit does not apply. Only supported by some providers.
/// Publicly reachable http(s) URL of the audio file. The provider downloads it directly, so the inline upload size limit does not apply, and the request is billed on the duration the provider reports; your balance must cover the provider's maximum accepted duration at the endpoint rate (returns 402 otherwise). Private-network, loopback, link-local, cloud-metadata, and tunnel hosts are rejected. Only supported by some providers.
/// </param>
/// <param name="format">
/// Audio format of the file at the URL. Defaults to the extension of the URL path; required when the path has no extension.
Expand Down
13 changes: 10 additions & 3 deletions src/libs/OpenRouter/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8872,13 +8872,20 @@
},
"BatchProviderPreferences": {
"additionalProperties": false,
"description": "Batch provider routing preferences. Only `provider.only` is supported.",
"description": "Batch provider routing preferences. Only `provider.only` and `provider.allow_fallbacks` are supported.",
"example": {
"only": [
"google-vertex"
]
},
"properties": {
"allow_fallbacks": {
"description": "Whether to allow backup providers to serve requests\n- true: (default) when the primary provider (or your custom providers in \"order\") is unavailable, use the next best provider.\n- false: use only the primary/custom provider, and return the upstream error if it's unavailable.\n",
"type": [
"boolean",
"null"
]
},
"only": {
"description": "List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.",
"example": [
Expand Down Expand Up @@ -42345,7 +42352,7 @@
"type": "string"
},
"url": {
"description": "Publicly reachable http(s) URL of the audio file. The provider downloads it directly, so the inline upload size limit does not apply. Only supported by some providers.",
"description": "Publicly reachable http(s) URL of the audio file. The provider downloads it directly, so the inline upload size limit does not apply, and the request is billed on the duration the provider reports; your balance must cover the provider's maximum accepted duration at the endpoint rate (returns 402 otherwise). Private-network, loopback, link-local, cloud-metadata, and tunnel hosts are rejected. Only supported by some providers.",
"format": "uri",
"maxLength": 8000,
"type": "string"
Expand Down Expand Up @@ -48681,7 +48688,7 @@
"type": "string"
},
"source_url": {
"description": "Publicly reachable http(s) URL of the audio file, downloaded by the provider directly (no size limit on our side). The format is derived from the URL path extension. Only supported by some providers; exactly one of file or source_url is required.",
"description": "Publicly reachable http(s) URL of the audio file, downloaded by the provider directly (no size limit on our side). The request is billed on the duration the provider reports, so your balance must cover the provider's maximum accepted duration at the endpoint rate (402 otherwise); private-network, loopback, link-local, cloud-metadata, and tunnel hosts are rejected. The format is derived from the URL path extension. Only supported by some providers; exactly one of file or source_url is required.",
"format": "uri",
"type": "string"
},
Expand Down
Loading