Skip to content

Fix reasoning summary part boundaries#1

Merged
XiaoConstantine merged 1 commit into
mainfrom
fix/reasoning-summary-boundaries
Jul 24, 2026
Merged

Fix reasoning summary part boundaries#1
XiaoConstantine merged 1 commit into
mainfrom
fix/reasoning-summary-boundaries

Conversation

@XiaoConstantine

Copy link
Copy Markdown
Owner

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.

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.

@XiaoConstantine

Copy link
Copy Markdown
Owner Author

Closed in favor of the upstream pull request: huggingface#467

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