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
This commit is contained in:
Moeeze Hassan
2025-08-21 22:36:37 +02:00
committed by GitHub
parent c8c6540d23
commit b0de3a2e6f

View File

@@ -409,7 +409,7 @@ def sse_translate_chat(
"choices": [
{
"index": 0,
"delta": {"reasoning_summary": delta_txt},
"delta": {"reasoning_summary": delta_txt, "reasoning": delta_txt},
"finish_reason": None,
}
],