mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-16 19:36:54 +00:00
The chat-completions stream intake read reasoning from `delta.reasoning_content` / `delta.reasoning` attributes only. OpenAI-compatible gateways that expose the field as an unknown extra land it in the SDK's `delta.model_extra`, so a reasoning-only stream accumulated nothing and either tripped "Provider returned an empty stream with no finish_reason" or dropped the reasoning entirely on finish_reason=length. Mirror the `model_extra` fallback the non-streaming path (and the streaming reasoning_details/refusal readers) already use, for both carrier keys. Salvages #56789 by @Xingkai98 (ported onto the phase-split intake; the original test asserted a synthetic "stop" on a finish-less stream, which current main deliberately reports as a drop, so the invariant test uses finish_reason=length from the issue's SSE trace). Fixes #56516
1 line
10 B
Text
1 line
10 B
Text
Xingkai98
|