[GH-ISSUE #4087] [BUG]: Multi-modal Content Array Not Supported in Database Storage #2607

Closed
opened 2026-02-22 18:30:25 -05:00 by yindo · 0 comments
Owner

Originally created by @willsonkc on GitHub (Jul 2, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4087

How are you running AnythingLLM?

Docker (remote machine)

What happened?

AnythingLLM successfully processes multi-modal prompts (text + images) and generates responses, but fails when attempting to save the conversation to the database due to Prisma schema expecting a string for the prompt field instead of an array of content objects.

Are there known steps to reproduce?

  1. Send a request to AnythingLLM with multi-modal content format:
{
  messages: [
    {
      role: "user",
      content: [
        {
          type: "text", 
          text: "Please evaluate these image entries\n\n ID: 1\nCaption: \"This is a test caption\""
        },
        {
          type: "image_url",
          image_url: {
            url: "data:image/jpeg;base64,{base64_image}",
            detail: "low"
          }
        }
      ]
    }
  ]
}
  1. Observe that the LLM processes the request successfully and returns a valid response
  2. Check logs for database errors during conversation saving
Invalid `prisma.workspace_chats.create()` invocation:
{
  data: {
    workspaceId: 13,
    prompt: [
      {
        type: "text",
        text: "Please evaluate these image entries\n\n ID: 1\nCaption: \"This is a test caption\""
      },
      {
        type: "image_url",
        image_url: {
          url: "data:image/jpeg;base64,/9j/2wBDA..."
        }
      }
    ],
    ...
  }
}

Argument `prompt`: Invalid value provided. Expected String, provided (Object, Object).
  • LLM successfully processes the multi-modal prompt
  • Valid response is generated (as seen in logs)
  • Database save operation fails with Prisma validation error
  • Error: Argument 'prompt': Invalid value provided. Expected String, provided (Object, Object).
Originally created by @willsonkc on GitHub (Jul 2, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4087 ### How are you running AnythingLLM? Docker (remote machine) ### What happened? AnythingLLM successfully processes multi-modal prompts (text + images) and generates responses, but fails when attempting to save the conversation to the database due to Prisma schema expecting a string for the prompt field instead of an array of content objects. ### Are there known steps to reproduce? 1. Send a request to AnythingLLM with multi-modal content format: ``` { messages: [ { role: "user", content: [ { type: "text", text: "Please evaluate these image entries\n\n ID: 1\nCaption: \"This is a test caption\"" }, { type: "image_url", image_url: { url: "data:image/jpeg;base64,{base64_image}", detail: "low" } } ] } ] } ``` 2. Observe that the LLM processes the request successfully and returns a valid response 3. Check logs for database errors during conversation saving ``` Invalid `prisma.workspace_chats.create()` invocation: { data: { workspaceId: 13, prompt: [ { type: "text", text: "Please evaluate these image entries\n\n ID: 1\nCaption: \"This is a test caption\"" }, { type: "image_url", image_url: { url: "data:image/jpeg;base64,/9j/2wBDA..." } } ], ... } } Argument `prompt`: Invalid value provided. Expected String, provided (Object, Object). ``` - LLM successfully processes the multi-modal prompt - Valid response is generated (as seen in logs) - Database save operation fails with Prisma validation error - Error: Argument 'prompt': Invalid value provided. Expected String, provided (Object, Object).
yindo added the possible bug label 2026-02-22 18:30:25 -05:00
yindo closed this issue 2026-02-22 18:30:26 -05:00
yindo changed title from [BUG]: Multi-modal Content Array Not Supported in Database Storage to [GH-ISSUE #4087] [BUG]: Multi-modal Content Array Not Supported in Database Storage 2026-06-05 14:47:30 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2607