mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-27 12:47:13 +00:00
b66db86bff
execute_func_call returns list[ContentElement] for MCP tools, but the runner assigned that list directly to the tool-message content. The OpenAI chat-completions spec requires tool-message content to be a string, so OpenAI-compatible endpoints return HTTP 500 when the raw list is sent. Serialize the list to a string before building the tool message, using ContentElement.__str__ which returns the text payload for text elements and a human-readable placeholder for images and files. Fixes #2457.