Assistant Threads Create: 400: messages array too long

Hi,

I’m running into issues when creating new threads with existing messages. Sending POST to https://api.openai.com/v1/threads with more than 32 messages. Since this limit isn’t documented anywhere, I wonder, is it intentional?

Error:

{
	"error": {
		"message": "Invalid 'messages': array too long. Expected an array with maximum length 32, but got an array with length 36 instead.",
		"type": "invalid_request_error",
		"param": "messages",
		"code": "array_above_max_length"
	}
}

I would like to restore “backups” of previous threads with more than 32 messages. The only workaround I could think of was to manually create messages using the message/createMessage API, but that increases the latency by quite a bit since this would have to be a sequential operation. I would appreciate any pointers in the right directions.

Thanks!