You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Streamed Gradient chat completions drop delta.reasoning_content. process_chunk in instrumentation/gradient/utils.py has no branch for it, and scope._reasoning_text is only filled from the Responses API reasoning_text.delta events. The output-message builder already renders scope._reasoning_text as a reasoning part, so for streamed chat on a reasoning model it is always empty.
The sibling instrumentation/pydo/utils.py handles the same chat-completions delta (delta.get("reasoning_content") appended to scope._reasoning_text).
Steps to reproduce
Feed gradient.utils.process_chunk a streamed chunk with choices[0].delta.reasoning_content = "step one". scope._reasoning_text stays empty.
Expected behavior
The reasoning text accumulated and emitted as a reasoning part, as in pydo.
Environment
main at the time of filing.
Additional context
Separate from the cache-token gap; I can send both fixes as two small PRs.
Activity