Enhancement: support Anthropic-style `message.thinking` alongside `reasoning_content`

#50

Problem

Clients that follow the Anthropic convention return past reasoning under message.thinking rather than OpenAI-style reasoning_content. The template currently ignores that field and falls back to scanning content for </think> tags, which such clients don't include — so reasoning is silently dropped from history.

Fix

Check message.thinking (string or stringifiable) as a fallback after reasoning_content, before the tag-scan heuristic. No behavior change for clients that don't send it.


Each fix in this series is an independent PR based on current main (v20); they touch overlapping regions of the same file, so merging one may require the others to be rebased — happy to update them.

Hey @Moore2877 ! Nevermind about rebasing—I went ahead and manually resolved the merge conflicts and integrated your excellent fixes directly into the new v21 release on main. Thank you so much for this incredible series of PRs! Closing this as the code is now officially merged.

froggeric changed pull request status to closed

Sign up or log in to comment