lmstudio-ai / lmstudio-ai/docs
Invalid type for 'input' when sending array input to /v1/responses
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 172
- Forks
- 128
- Avg merge
- 8m
- Merged PRs (30d)
- 1
Description
When sending a request to the /v1/responses endpoint with input as an array (to include multiple content types such as text and image), the API returns an error stating that the input type is invalid.
This behavior makes it impossible to send multimodal (text + image) queries via the responses endpoint, even though the structure mirrors how /v1/chat/completions handles messages.
Request
`{
"model": "gemma-3-12b-it",
"input": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What is in this image?"
},
{
"type": "image_url",
"image_url": "{{TestBase64Image}}"
}
]
}
]
}
`
Response:
`{
"error": {
"message": "Invalid type for 'input'.",
"type": "invalid_request_error",
"param": "input",
"code": "invalid_union"
}
}
`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the /v1/responses documentation and its input schema, then compare it with the /v1/chat/completions message format shown in the report. Reproduce the request using the provided multimodal example and determine whether the documented input shape accepts arrays. Done means the endpoint behavior and supported input format are accurately documented or corrected.
Written by the indexing model from the issue text.
Assessment
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100