mirror of
https://github.com/NCBM/plyngent.git
synced 2026-11-07 15:37:55 +08:00
c06fb57e72
A request carrying `tools` must return every round's chain-of-thought — "必须完整 回传 `reasoning_content` … 即使该轮模型未实际进行工具调用" — and the API merges a `reasoning` item into the assistant message its round forms: a missing item and an empty `reasoning_text` are both answered with "The `reasoning_text` in the thinking mode must be passed back to the API". Each round now goes back as its reasoning, its text, then its calls, with a blank line standing in when the round kept none (a `rollback_tail` carrier, a forged todo call, the seed a compacted session starts with) — never words of the bridge's own for a round that may genuinely have reasoned nothing. A round's calls stay contiguous ahead of their outputs: an interleaved batch reads as a second round without reasoning and is rejected the same way, and an output recorded after another item moves up beside its own call. The reasoning is read back from the item's `content` parts, the only part the API documents for `reasoning` items (`summary` and `encrypted_content` are not supported).