diff --git a/core/http/endpoints/openai/mcp.go b/core/http/endpoints/openai/mcp.go index ed0d0f843..ef802d5f1 100644 --- a/core/http/endpoints/openai/mcp.go +++ b/core/http/endpoints/openai/mcp.go @@ -122,7 +122,7 @@ func MCPCompletionEndpoint(cl *config.ModelConfigLoader, ml *model.ModelLoader, ID: id, Created: created, Model: input.Model, // we have to return what the user sent here, due to OpenAI spec. - Choices: []schema.Choice{{Text: f.LastMessage().Content}}, + Choices: []schema.Choice{{Message: &schema.Message{Role: "assistant", Content: &f.LastMessage().Content}}}, Object: "text_completion", }