Skip to content

Add delta-only streaming parser continuations - #158

Open
keivenchang wants to merge 1 commit into
openai:mainfrom
keivenchang:keivenchang/DIS-3171__continuation
Open

keivenchang wants to merge 1 commit into
openai:mainfrom
keivenchang:keivenchang/DIS-3171__continuation

Conversation

@keivenchang

Copy link
Copy Markdown

Summary

Add an opt-in continuation mode so a server can consume a Harmony prompt once and fork independent output choices without copying consumed body or token history. Existing history-retaining behavior remains the default.

  • Add without_history(), discard_history() and fork_continuation(); copy the grammar, header and decoder state needed for future tokens.
  • Expose message counts and the last completion delta without retaining past output.
  • Add Python bindings and lifecycle documentation.

Validation

At 32530bcc10740588962216a3e7ce161fc9386306, 69 Python tests passed, including 27 continuation tests. Cases cover token checkpoints, independent suffixes, UTF-8 decoder state, completion boundaries and permissive header recovery.

Downstream use

This is a prerequisite for Dynamo #17476. Callers that need past messages keep the existing default mode.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-29T03:17:26.348630Z
We couldn’t complete this review. Comment @codex review to try again.
32530bc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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