diff --git a/app/MindWork AI Studio/Provider/OpenAI/ProviderOpenAI.cs b/app/MindWork AI Studio/Provider/OpenAI/ProviderOpenAI.cs
index f9cabd0a..7b91a7ae 100644
--- a/app/MindWork AI Studio/Provider/OpenAI/ProviderOpenAI.cs
+++ b/app/MindWork AI Studio/Provider/OpenAI/ProviderOpenAI.cs
@@ -119,9 +119,7 @@ public sealed class ProviderOpenAI() : BaseProvider("https://api.openai.com/v1/"
{
Model = chatModel.Id,
- // Build the messages:
- // - First of all the system prompt
- // - Then none-empty user and AI messages
+ // All messages go into the messages field:
Messages = [systemPrompt, ..messages],
// Right now, we only support streaming completions:
@@ -134,27 +132,8 @@ public sealed class ProviderOpenAI() : BaseProvider("https://api.openai.com/v1/"
{
Model = chatModel.Id,
- // Build the messages:
- // - First of all the system prompt
- // - Then none-empty user and AI messages
- Input = [systemPrompt, ..chatThread.Blocks.Where(n => n.ContentType is ContentType.TEXT && !string.IsNullOrWhiteSpace((n.Content as ContentText)?.Text)).Select(n => new TextMessage
- {
- Role = n.Role switch
- {
- ChatRole.USER => "user",
- ChatRole.AI => "assistant",
- ChatRole.AGENT => "assistant",
- ChatRole.SYSTEM => systemPromptRole,
-
- _ => "user",
- },
-
- Content = n.Content switch
- {
- ContentText text => text.Text,
- _ => string.Empty,
- }
- }).ToList()],
+ // All messages go into the input field:
+ Input = [systemPrompt, ..messages],
// Right now, we only support streaming completions:
Stream = true,
diff --git a/app/MindWork AI Studio/Provider/OpenAI/ResponsesAPIRequest.cs b/app/MindWork AI Studio/Provider/OpenAI/ResponsesAPIRequest.cs
index 262c4c7f..deb315d6 100644
--- a/app/MindWork AI Studio/Provider/OpenAI/ResponsesAPIRequest.cs
+++ b/app/MindWork AI Studio/Provider/OpenAI/ResponsesAPIRequest.cs
@@ -12,7 +12,7 @@ namespace AIStudio.Provider.OpenAI;
/// The tools to use for the request.
public record ResponsesAPIRequest(
string Model,
- IList Input,
+ IList Input,
bool Stream,
bool Store,
IList Tools)