diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageBetaResponsesClient.CreateResponses.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageBetaResponsesClient.CreateResponses.g.cs
index 0c01cea1..e90daf10 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageBetaResponsesClient.CreateResponses.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageBetaResponsesClient.CreateResponses.g.cs
@@ -23,9 +23,7 @@ public partial interface ISubpackageBetaResponsesClient
///
///
///
- ///
- /// Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
- ///
+ ///
///
///
/// Input for a response request - can be a string or array of items
@@ -89,7 +87,7 @@ public partial interface ISubpackageBetaResponsesClient
global::System.Threading.Tasks.Task CreateResponsesAsync(
bool? background = default,
double? frequencyPenalty = default,
- object? imageConfig = default,
+ global::OpenRouter.ImageConfig? imageConfig = default,
global::System.Collections.Generic.IList? include = default,
global::OpenRouter.Inputs? input = default,
string? instructions = default,
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageChatClient.SendChatCompletionRequest.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageChatClient.SendChatCompletionRequest.g.cs
index f100b657..f763eb5e 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageChatClient.SendChatCompletionRequest.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.ISubpackageChatClient.SendChatCompletionRequest.g.cs
@@ -28,9 +28,7 @@ public partial interface ISubpackageChatClient
///
/// Frequency penalty (-2.0 to 2.0)
///
- ///
- /// Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
- ///
+ ///
///
/// Token logit bias adjustments
///
@@ -127,7 +125,7 @@ public partial interface ISubpackageChatClient
global::OpenRouter.ChatRequestCacheControl? cacheControl = default,
global::OpenRouter.ChatDebugOptions? debug = default,
double? frequencyPenalty = default,
- object? imageConfig = default,
+ global::OpenRouter.ImageConfig? imageConfig = default,
global::System.Collections.Generic.Dictionary? logitBias = default,
bool? logprobs = default,
int? maxCompletionTokens = default,
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatFunctionTool.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatFunctionTool.g.cs
index e3c9d2c4..70f5ca1f 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatFunctionTool.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatFunctionTool.g.cs
@@ -40,15 +40,18 @@ public class ChatFunctionToolJsonConverter : global::System.Text.Json.Serializat
if (__jsonProps.Contains("parameters")) __score3++;
if (__jsonProps.Contains("type")) __score3++;
var __score4 = 0;
- if (__jsonProps.Contains("allowed_domains")) __score4++;
- if (__jsonProps.Contains("engine")) __score4++;
- if (__jsonProps.Contains("excluded_domains")) __score4++;
- if (__jsonProps.Contains("max_results")) __score4++;
- if (__jsonProps.Contains("max_total_results")) __score4++;
if (__jsonProps.Contains("parameters")) __score4++;
- if (__jsonProps.Contains("search_context_size")) __score4++;
if (__jsonProps.Contains("type")) __score4++;
- if (__jsonProps.Contains("user_location")) __score4++;
+ var __score5 = 0;
+ if (__jsonProps.Contains("allowed_domains")) __score5++;
+ if (__jsonProps.Contains("engine")) __score5++;
+ if (__jsonProps.Contains("excluded_domains")) __score5++;
+ if (__jsonProps.Contains("max_results")) __score5++;
+ if (__jsonProps.Contains("max_total_results")) __score5++;
+ if (__jsonProps.Contains("parameters")) __score5++;
+ if (__jsonProps.Contains("search_context_size")) __score5++;
+ if (__jsonProps.Contains("type")) __score5++;
+ if (__jsonProps.Contains("user_location")) __score5++;
var __bestScore = 0;
var __bestIndex = -1;
if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
@@ -56,9 +59,11 @@ public class ChatFunctionToolJsonConverter : global::System.Text.Json.Serializat
if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; }
if (__score3 > __bestScore) { __bestScore = __score3; __bestIndex = 3; }
if (__score4 > __bestScore) { __bestScore = __score4; __bestIndex = 4; }
+ if (__score5 > __bestScore) { __bestScore = __score5; __bestIndex = 5; }
global::OpenRouter.ChatFunctionTool0? chatFunctionTool0 = default;
global::OpenRouter.DatetimeServerTool? datetimeServerTool = default;
+ global::OpenRouter.ImageGenerationServerToolOpenRouter? imageGenerationServerToolOpenRouter = default;
global::OpenRouter.ChatSearchModelsServerTool? chatSearchModelsServerTool = default;
global::OpenRouter.OpenRouterWebSearchServerTool? openRouterWebSearchServerTool = default;
global::OpenRouter.ChatWebSearchShorthand? chatWebSearchShorthand = default;
@@ -95,6 +100,21 @@ public class ChatFunctionToolJsonConverter : global::System.Text.Json.Serializat
}
}
else if (__bestIndex == 2)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter).Name}");
+ imageGenerationServerToolOpenRouter = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ else if (__bestIndex == 3)
{
try
{
@@ -109,7 +129,7 @@ public class ChatFunctionToolJsonConverter : global::System.Text.Json.Serializat
{
}
}
- else if (__bestIndex == 3)
+ else if (__bestIndex == 4)
{
try
{
@@ -124,7 +144,7 @@ public class ChatFunctionToolJsonConverter : global::System.Text.Json.Serializat
{
}
}
- else if (__bestIndex == 4)
+ else if (__bestIndex == 5)
{
try
{
@@ -141,7 +161,7 @@ public class ChatFunctionToolJsonConverter : global::System.Text.Json.Serializat
}
}
- if (chatFunctionTool0 == null && datetimeServerTool == null && chatSearchModelsServerTool == null && openRouterWebSearchServerTool == null && chatWebSearchShorthand == null)
+ if (chatFunctionTool0 == null && datetimeServerTool == null && imageGenerationServerToolOpenRouter == null && chatSearchModelsServerTool == null && openRouterWebSearchServerTool == null && chatWebSearchShorthand == null)
{
try
{
@@ -169,6 +189,19 @@ public class ChatFunctionToolJsonConverter : global::System.Text.Json.Serializat
{
}
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter).Name}");
+ imageGenerationServerToolOpenRouter = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+
try
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatSearchModelsServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
@@ -214,6 +247,8 @@ public class ChatFunctionToolJsonConverter : global::System.Text.Json.Serializat
datetimeServerTool,
+ imageGenerationServerToolOpenRouter,
+
chatSearchModelsServerTool,
openRouterWebSearchServerTool,
@@ -245,6 +280,12 @@ public override void Write(
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.DatetimeServerTool).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.DatetimeServerTool!, typeInfo);
}
+ else if (value.IsImageGenerationServerToolOpenRouter)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationServerToolOpenRouter!, typeInfo);
+ }
else if (value.IsChatSearchModelsServerTool)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatSearchModelsServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatRequestImageConfig.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageConfig.g.cs
similarity index 81%
rename from src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatRequestImageConfig.g.cs
rename to src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageConfig.g.cs
index dc1615b5..b2426253 100644
--- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatRequestImageConfig.g.cs
+++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageConfig.g.cs
@@ -4,10 +4,10 @@
namespace OpenRouter.JsonConverters
{
///
- public class ChatRequestImageConfigJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ public class ImageConfigJsonConverter : global::System.Text.Json.Serialization.JsonConverter
{
///
- public override global::OpenRouter.ChatRequestImageConfig Read(
+ public override global::OpenRouter.ImageConfig Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
@@ -66,9 +66,9 @@ public class ChatRequestImageConfigJsonConverter : global::System.Text.Json.Seri
if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
if (__score2 > __bestScore) { __bestScore = __score2; __bestIndex = 2; }
- string? chatRequestImageConfigVariant1 = default;
- double? chatRequestImageConfigVariant2 = default;
- global::System.Collections.Generic.IList