diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageAnthropicMessagesClient.CreateMessages.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageAnthropicMessagesClient.CreateMessages.g.cs
index 809db191..888d7a52 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageAnthropicMessagesClient.CreateMessages.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageAnthropicMessagesClient.CreateMessages.g.cs
@@ -8,7 +8,7 @@ public partial interface ISubpackageAnthropicMessagesClient
/// Create a message
/// Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking.
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -18,14 +18,14 @@ public partial interface ISubpackageAnthropicMessagesClient
global::System.Threading.Tasks.Task CreateMessagesAsync(
global::OpenRouter.MessagesRequest request,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
/// Create a message
/// Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking.
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -35,14 +35,14 @@ public partial interface ISubpackageAnthropicMessagesClient
global::System.Threading.Tasks.Task> CreateMessagesAsResponseAsync(
global::OpenRouter.MessagesRequest request,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
/// Create a message
/// Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking.
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -94,7 +94,7 @@ public partial interface ISubpackageAnthropicMessagesClient
///
global::System.Threading.Tasks.Task CreateMessagesAsync(
string model,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AnthropicCacheControlDirective? cacheControl = default,
global::OpenRouter.OneOf? contextManagement = default,
int? maxTokens = default,
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageBetaResponsesClient.CreateResponses.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageBetaResponsesClient.CreateResponses.g.cs
index 73708567..3085e974 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageBetaResponsesClient.CreateResponses.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageBetaResponsesClient.CreateResponses.g.cs
@@ -8,7 +8,7 @@ public partial interface ISubpackageBetaResponsesClient
/// Create a response
/// Creates a streaming or non-streaming response using OpenResponses API format
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -18,14 +18,14 @@ public partial interface ISubpackageBetaResponsesClient
global::System.Threading.Tasks.Task CreateResponsesAsync(
global::OpenRouter.ResponsesRequest request,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
/// Create a response
/// Creates a streaming or non-streaming response using OpenResponses API format
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -35,14 +35,14 @@ public partial interface ISubpackageBetaResponsesClient
global::System.Threading.Tasks.Task> CreateResponsesAsResponseAsync(
global::OpenRouter.ResponsesRequest request,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
/// Create a response
/// Creates a streaming or non-streaming response using OpenResponses API format
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -115,7 +115,7 @@ public partial interface ISubpackageBetaResponsesClient
/// The token to cancel the operation with
///
global::System.Threading.Tasks.Task CreateResponsesAsync(
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
bool? background = default,
global::OpenRouter.AnthropicCacheControlDirective? cacheControl = default,
double? frequencyPenalty = default,
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageChatClient.SendChatCompletionRequest.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageChatClient.SendChatCompletionRequest.g.cs
index 37aaf8c6..0a70f88a 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageChatClient.SendChatCompletionRequest.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageChatClient.SendChatCompletionRequest.g.cs
@@ -8,7 +8,7 @@ public partial interface ISubpackageChatClient
/// Create a chat completion
/// Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -18,14 +18,14 @@ public partial interface ISubpackageChatClient
global::System.Threading.Tasks.Task SendChatCompletionRequestAsync(
global::OpenRouter.ChatRequest request,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
/// Create a chat completion
/// Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -35,14 +35,14 @@ public partial interface ISubpackageChatClient
global::System.Threading.Tasks.Task> SendChatCompletionRequestAsResponseAsync(
global::OpenRouter.ChatRequest request,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
/// Create a chat completion
/// Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -151,7 +151,7 @@ public partial interface ISubpackageChatClient
///
global::System.Threading.Tasks.Task SendChatCompletionRequestAsync(
global::System.Collections.Generic.IList messages,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AnthropicCacheControlDirective? cacheControl = default,
global::OpenRouter.ChatDebugOptions? debug = default,
double? frequencyPenalty = default,
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.SubpackageAnthropicMessagesClient.CreateMessages.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.SubpackageAnthropicMessagesClient.CreateMessages.g.cs
index d9d9a01c..5a354ce9 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.SubpackageAnthropicMessagesClient.CreateMessages.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.SubpackageAnthropicMessagesClient.CreateMessages.g.cs
@@ -27,12 +27,12 @@ public partial class SubpackageAnthropicMessagesClient
};
partial void PrepareCreateMessagesArguments(
global::System.Net.Http.HttpClient httpClient,
- ref global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata,
+ ref global::OpenRouter.MetadataLevel? xOpenRouterMetadata,
global::OpenRouter.MessagesRequest request);
partial void PrepareCreateMessagesRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata,
global::OpenRouter.MessagesRequest request);
partial void ProcessCreateMessagesResponse(
global::System.Net.Http.HttpClient httpClient,
@@ -47,7 +47,7 @@ partial void ProcessCreateMessagesResponseContent(
/// Create a message
/// Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking.
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -57,14 +57,14 @@ partial void ProcessCreateMessagesResponseContent(
public async global::System.Threading.Tasks.Task CreateMessagesAsync(
global::OpenRouter.MessagesRequest request,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __response = await CreateMessagesAsResponseAsync(
request: request,
- xOpenRouterExperimentalMetadata: xOpenRouterExperimentalMetadata,
+ xOpenRouterMetadata: xOpenRouterMetadata,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);
@@ -75,7 +75,7 @@ partial void ProcessCreateMessagesResponseContent(
/// Create a message
/// Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking.
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -85,7 +85,7 @@ partial void ProcessCreateMessagesResponseContent(
public async global::System.Threading.Tasks.Task> CreateMessagesAsResponseAsync(
global::OpenRouter.MessagesRequest request,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -95,7 +95,7 @@ partial void ProcessCreateMessagesResponseContent(
client: HttpClient);
PrepareCreateMessagesArguments(
httpClient: HttpClient,
- xOpenRouterExperimentalMetadata: ref xOpenRouterExperimentalMetadata,
+ xOpenRouterMetadata: ref xOpenRouterMetadata,
request: request);
@@ -154,9 +154,9 @@ partial void ProcessCreateMessagesResponseContent(
}
}
- if (xOpenRouterExperimentalMetadata != default)
+ if (xOpenRouterMetadata != default)
{
- __httpRequest.Headers.TryAddWithoutValidation("X-OpenRouter-Experimental-Metadata", xOpenRouterExperimentalMetadata?.ToValueString() ?? string.Empty);
+ __httpRequest.Headers.TryAddWithoutValidation("X-OpenRouter-Metadata", xOpenRouterMetadata?.ToValueString() ?? string.Empty);
}
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
@@ -176,7 +176,7 @@ partial void ProcessCreateMessagesResponseContent(
PrepareCreateMessagesRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
- xOpenRouterExperimentalMetadata: xOpenRouterExperimentalMetadata,
+ xOpenRouterMetadata: xOpenRouterMetadata,
request: request);
return __httpRequest;
@@ -430,7 +430,7 @@ partial void ProcessCreateMessagesResponseContent(
h => h.Key,
h => h.Value));
}
- // Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Experimental-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.
+ // Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.
if ((int)__response.StatusCode == 403)
{
string? __content_403 = null;
@@ -715,7 +715,7 @@ partial void ProcessCreateMessagesResponseContent(
/// Create a message
/// Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking.
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -767,7 +767,7 @@ partial void ProcessCreateMessagesResponseContent(
///
public async global::System.Threading.Tasks.Task CreateMessagesAsync(
string model,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AnthropicCacheControlDirective? cacheControl = default,
global::OpenRouter.OneOf? contextManagement = default,
int? maxTokens = default,
@@ -827,7 +827,7 @@ partial void ProcessCreateMessagesResponseContent(
};
return await CreateMessagesAsync(
- xOpenRouterExperimentalMetadata: xOpenRouterExperimentalMetadata,
+ xOpenRouterMetadata: xOpenRouterMetadata,
request: __request,
requestOptions: requestOptions,
cancellationToken: cancellationToken).ConfigureAwait(false);
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.SubpackageBetaResponsesClient.CreateResponses.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.SubpackageBetaResponsesClient.CreateResponses.g.cs
index 9801eff0..3cfe54dc 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.SubpackageBetaResponsesClient.CreateResponses.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.SubpackageBetaResponsesClient.CreateResponses.g.cs
@@ -27,12 +27,12 @@ public partial class SubpackageBetaResponsesClient
};
partial void PrepareCreateResponsesArguments(
global::System.Net.Http.HttpClient httpClient,
- ref global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata,
+ ref global::OpenRouter.MetadataLevel? xOpenRouterMetadata,
global::OpenRouter.ResponsesRequest request);
partial void PrepareCreateResponsesRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata,
global::OpenRouter.ResponsesRequest request);
partial void ProcessCreateResponsesResponse(
global::System.Net.Http.HttpClient httpClient,
@@ -47,7 +47,7 @@ partial void ProcessCreateResponsesResponseContent(
/// Create a response
/// Creates a streaming or non-streaming response using OpenResponses API format
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -57,14 +57,14 @@ partial void ProcessCreateResponsesResponseContent(
public async global::System.Threading.Tasks.Task CreateResponsesAsync(
global::OpenRouter.ResponsesRequest request,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __response = await CreateResponsesAsResponseAsync(
request: request,
- xOpenRouterExperimentalMetadata: xOpenRouterExperimentalMetadata,
+ xOpenRouterMetadata: xOpenRouterMetadata,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);
@@ -75,7 +75,7 @@ partial void ProcessCreateResponsesResponseContent(
/// Create a response
/// Creates a streaming or non-streaming response using OpenResponses API format
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -85,7 +85,7 @@ partial void ProcessCreateResponsesResponseContent(
public async global::System.Threading.Tasks.Task> CreateResponsesAsResponseAsync(
global::OpenRouter.ResponsesRequest request,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -95,7 +95,7 @@ partial void ProcessCreateResponsesResponseContent(
client: HttpClient);
PrepareCreateResponsesArguments(
httpClient: HttpClient,
- xOpenRouterExperimentalMetadata: ref xOpenRouterExperimentalMetadata,
+ xOpenRouterMetadata: ref xOpenRouterMetadata,
request: request);
@@ -154,9 +154,9 @@ partial void ProcessCreateResponsesResponseContent(
}
}
- if (xOpenRouterExperimentalMetadata != default)
+ if (xOpenRouterMetadata != default)
{
- __httpRequest.Headers.TryAddWithoutValidation("X-OpenRouter-Experimental-Metadata", xOpenRouterExperimentalMetadata?.ToValueString() ?? string.Empty);
+ __httpRequest.Headers.TryAddWithoutValidation("X-OpenRouter-Metadata", xOpenRouterMetadata?.ToValueString() ?? string.Empty);
}
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
@@ -176,7 +176,7 @@ partial void ProcessCreateResponsesResponseContent(
PrepareCreateResponsesRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
- xOpenRouterExperimentalMetadata: xOpenRouterExperimentalMetadata,
+ xOpenRouterMetadata: xOpenRouterMetadata,
request: request);
return __httpRequest;
@@ -467,7 +467,7 @@ partial void ProcessCreateResponsesResponseContent(
h => h.Key,
h => h.Value));
}
- // Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Experimental-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.
+ // Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.
if ((int)__response.StatusCode == 403)
{
string? __content_403 = null;
@@ -900,7 +900,7 @@ partial void ProcessCreateResponsesResponseContent(
/// Create a response
/// Creates a streaming or non-streaming response using OpenResponses API format
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -973,7 +973,7 @@ partial void ProcessCreateResponsesResponseContent(
/// The token to cancel the operation with
///
public async global::System.Threading.Tasks.Task CreateResponsesAsync(
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
bool? background = default,
global::OpenRouter.AnthropicCacheControlDirective? cacheControl = default,
double? frequencyPenalty = default,
@@ -1058,7 +1058,7 @@ partial void ProcessCreateResponsesResponseContent(
};
return await CreateResponsesAsync(
- xOpenRouterExperimentalMetadata: xOpenRouterExperimentalMetadata,
+ xOpenRouterMetadata: xOpenRouterMetadata,
request: __request,
requestOptions: requestOptions,
cancellationToken: cancellationToken).ConfigureAwait(false);
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.SubpackageChatClient.SendChatCompletionRequest.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.SubpackageChatClient.SendChatCompletionRequest.g.cs
index c1e2c4b7..7ae83335 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.SubpackageChatClient.SendChatCompletionRequest.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.SubpackageChatClient.SendChatCompletionRequest.g.cs
@@ -27,12 +27,12 @@ public partial class SubpackageChatClient
};
partial void PrepareSendChatCompletionRequestArguments(
global::System.Net.Http.HttpClient httpClient,
- ref global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata,
+ ref global::OpenRouter.MetadataLevel? xOpenRouterMetadata,
global::OpenRouter.ChatRequest request);
partial void PrepareSendChatCompletionRequestRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata,
global::OpenRouter.ChatRequest request);
partial void ProcessSendChatCompletionRequestResponse(
global::System.Net.Http.HttpClient httpClient,
@@ -47,7 +47,7 @@ partial void ProcessSendChatCompletionRequestResponseContent(
/// Create a chat completion
/// Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -57,14 +57,14 @@ partial void ProcessSendChatCompletionRequestResponseContent(
public async global::System.Threading.Tasks.Task SendChatCompletionRequestAsync(
global::OpenRouter.ChatRequest request,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __response = await SendChatCompletionRequestAsResponseAsync(
request: request,
- xOpenRouterExperimentalMetadata: xOpenRouterExperimentalMetadata,
+ xOpenRouterMetadata: xOpenRouterMetadata,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);
@@ -75,7 +75,7 @@ partial void ProcessSendChatCompletionRequestResponseContent(
/// Create a chat completion
/// Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -85,7 +85,7 @@ partial void ProcessSendChatCompletionRequestResponseContent(
public async global::System.Threading.Tasks.Task> SendChatCompletionRequestAsResponseAsync(
global::OpenRouter.ChatRequest request,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -95,7 +95,7 @@ partial void ProcessSendChatCompletionRequestResponseContent(
client: HttpClient);
PrepareSendChatCompletionRequestArguments(
httpClient: HttpClient,
- xOpenRouterExperimentalMetadata: ref xOpenRouterExperimentalMetadata,
+ xOpenRouterMetadata: ref xOpenRouterMetadata,
request: request);
@@ -154,9 +154,9 @@ partial void ProcessSendChatCompletionRequestResponseContent(
}
}
- if (xOpenRouterExperimentalMetadata != default)
+ if (xOpenRouterMetadata != default)
{
- __httpRequest.Headers.TryAddWithoutValidation("X-OpenRouter-Experimental-Metadata", xOpenRouterExperimentalMetadata?.ToValueString() ?? string.Empty);
+ __httpRequest.Headers.TryAddWithoutValidation("X-OpenRouter-Metadata", xOpenRouterMetadata?.ToValueString() ?? string.Empty);
}
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
@@ -176,7 +176,7 @@ partial void ProcessSendChatCompletionRequestResponseContent(
PrepareSendChatCompletionRequestRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
- xOpenRouterExperimentalMetadata: xOpenRouterExperimentalMetadata,
+ xOpenRouterMetadata: xOpenRouterMetadata,
request: request);
return __httpRequest;
@@ -467,7 +467,7 @@ partial void ProcessSendChatCompletionRequestResponseContent(
h => h.Key,
h => h.Value));
}
- // Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Experimental-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.
+ // Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.
if ((int)__response.StatusCode == 403)
{
string? __content_403 = null;
@@ -900,7 +900,7 @@ partial void ProcessSendChatCompletionRequestResponseContent(
/// Create a chat completion
/// Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
///
- ///
+ ///
/// Opt-in level for surfacing routing metadata on the response under `openrouter_metadata`.
///
///
@@ -1009,7 +1009,7 @@ partial void ProcessSendChatCompletionRequestResponseContent(
///
public async global::System.Threading.Tasks.Task SendChatCompletionRequestAsync(
global::System.Collections.Generic.IList messages,
- global::OpenRouter.MetadataLevel? xOpenRouterExperimentalMetadata = default,
+ global::OpenRouter.MetadataLevel? xOpenRouterMetadata = default,
global::OpenRouter.AnthropicCacheControlDirective? cacheControl = default,
global::OpenRouter.ChatDebugOptions? debug = default,
double? frequencyPenalty = default,
@@ -1085,7 +1085,7 @@ partial void ProcessSendChatCompletionRequestResponseContent(
};
return await SendChatCompletionRequestAsync(
- xOpenRouterExperimentalMetadata: xOpenRouterExperimentalMetadata,
+ xOpenRouterMetadata: xOpenRouterMetadata,
request: __request,
requestOptions: requestOptions,
cancellationToken: cancellationToken).ConfigureAwait(false);
diff --git a/src/libs/OpenRouter/openapi.yaml b/src/libs/OpenRouter/openapi.yaml
index 6a5de3d0..7dfac4ef 100644
--- a/src/libs/OpenRouter/openapi.yaml
+++ b/src/libs/OpenRouter/openapi.yaml
@@ -15,9 +15,9 @@
],
"parameters": [
{
- "name": "X-OpenRouter-Experimental-Metadata",
+ "name": "X-OpenRouter-Metadata",
"in": "header",
- "description": "Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.",
+ "description": "Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.",
"required": false,
"schema": {
"$ref": "#/components/schemas/MetadataLevel"
@@ -66,7 +66,7 @@
}
},
"403": {
- "description": "Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Experimental-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.",
+ "description": "Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.",
"content": {
"application/json": {
"schema": {
@@ -1058,9 +1058,9 @@
],
"parameters": [
{
- "name": "X-OpenRouter-Experimental-Metadata",
+ "name": "X-OpenRouter-Metadata",
"in": "header",
- "description": "Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.",
+ "description": "Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.",
"required": false,
"schema": {
"$ref": "#/components/schemas/MetadataLevel"
@@ -1109,7 +1109,7 @@
}
},
"403": {
- "description": "Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Experimental-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.",
+ "description": "Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.",
"content": {
"application/json": {
"schema": {
@@ -3310,9 +3310,9 @@
],
"parameters": [
{
- "name": "X-OpenRouter-Experimental-Metadata",
+ "name": "X-OpenRouter-Metadata",
"in": "header",
- "description": "Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`.",
+ "description": "Opt-in to surface routing metadata on the response under `openrouter_metadata`. Defaults to `disabled`. The legacy header `X-OpenRouter-Experimental-Metadata` is also accepted for backward compatibility.",
"required": false,
"schema": {
"$ref": "#/components/schemas/MetadataLevel"
@@ -3351,7 +3351,7 @@
}
},
"403": {
- "description": "Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Experimental-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.",
+ "description": "Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When guardrails block and the `X-OpenRouter-Metadata: enabled` header is present, the response includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage details.",
"content": {
"application/json": {
"schema": {