Support OpenAI-style text content lists

#7
Institute of Foundation Models org

Accept message content as a list of text parts, e.g. [{"type":"text","text":"Hello"}], for OpenAI-compatible clients and harnesses such as OpenCode. The text is currently dropped for user/assistant messages.

This joins text parts in order for user, system, and assistant messages while preserving existing string, reasoning, and tool-call formatting.

Validated with tokenizer-only regression checks.

Institute of Foundation Models org

Tested that the deployment with the new chat template works; Resolves the structured user content issue, and enables the use of open harnesses that require them.

mingshan changed pull request status to merged

Sign up or log in to comment