Skip to content

Commit b0de3a2

Browse files
authored
fix: stream(legacy): include delta.reasoning alongside reasoning_summary
In legacy/current compatibility mode, stream both `delta.reasoning_summary` and `delta.reasoning` (string) for reasoning deltas. This ensures clients that expect `choices[0].delta.reasoning` as a string (e.g., OpenCode) render reasoning without schema errors. Change made only to legacy to avoid breakage with other software
1 parent c8c6540 commit b0de3a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chatmock/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def sse_translate_chat(
409409
"choices": [
410410
{
411411
"index": 0,
412-
"delta": {"reasoning_summary": delta_txt},
412+
"delta": {"reasoning_summary": delta_txt, "reasoning": delta_txt},
413413
"finish_reason": None,
414414
}
415415
],

0 commit comments

Comments
 (0)