Spring AI does validation to ensure that ToolResponseMessage
should not be null. That may have once been a required property in OpenAI's API, but it doesn't even exist in their documentation now. (See https://platform.openai.com/docs/api-reference/chat/create)
I do not know if other APIs require it or not, but I do know that OpenAI does not.
I ask that the null check be at least relaxed. Or, if it is determined that no other API needs it, remove that property altogether from ToolResponseMessage
.