Skip to content

Fix reasoning summary part boundaries#467

Open
XiaoConstantine wants to merge 1 commit into
huggingface:mainfrom
XiaoConstantine:fix/reasoning-summary-boundaries
Open

Fix reasoning summary part boundaries#467
XiaoConstantine wants to merge 1 commit into
huggingface:mainfrom
XiaoConstantine:fix/reasoning-summary-boundaries

Conversation

@XiaoConstantine

@XiaoConstantine XiaoConstantine commented Jul 23, 2026

Copy link
Copy Markdown

Motivation

OpenAI Responses streams reasoning summaries as multiple parts. Tau consumed each response.reasoning_summary_text.delta event but ignored response.reasoning_summary_part.done, causing adjacent Markdown headings to be persisted and rendered without separators, for example **First****Second**.

Changes

  • Preserve reasoning-summary part boundaries as blank lines in the OpenAI Codex provider.
  • Apply the same behavior to the OpenAI-compatible Responses parser.
  • Add deterministic SSE regression tests covering streamed deltas and finalized thinking content for both provider paths.

This matches Pi's Responses stream handling at the provider boundary.

Testing

  • env -u OPENAI_API_KEY uv run pytest -q — 1121 passed
  • uv run ruff check .
  • uv run ruff format --check .
  • uv run mypy
  • git diff --check

Compatibility

No configuration or migration changes. Existing persisted reasoning text is unchanged; newly streamed summaries preserve part boundaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant