-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Nightly OSS: Responses API: undocumented reasoning+message pairing constraint breaks multi-turn conversations #3187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
xodn348
wants to merge
4
commits into
openai:main
Choose a base branch
from
xodn348:nightly/3009-responses-api--undocumented-reasoning-message-pa
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+51
−0
Open
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
35e5878
Advance OSS contribution for Responses API: undocumented reasoning+me…
xodn348 b2ef328
Remove nightly runner artifact from PR branch
xodn348 8d96381
Remove nightly runner artifact from PR branch
xodn348 1e3940c
Remove nightly retry artifact from PR branch
xodn348 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| The previous attempt produced no source, test, docs, or example changes. | ||
|
|
||
| Continue working. A successful nightly slot must produce a small, honest, | ||
| maintainer-reviewable PR unless the repository is technically impossible | ||
| to patch for this target. | ||
|
|
||
| Requirements for this retry: | ||
| - Search the local repository for a directly related patch surface. | ||
| - Prefer a focused test, docs/example correction, typing/schema fix, CLI behavior fix, or small error-handling improvement. | ||
| - If the exact upstream symptom is server-side, produce a repository-local improvement that prevents user confusion or locks existing behavior without falsely claiming to fix the server. | ||
| - Do not stop with only NIGHTLY_REPORT.md. | ||
| - Modify at least one tracked source, test, docs, or example file if a defensible PR exists. | ||
| - Keep the diff small and explain the rationale in NIGHTLY_REPORT.md. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| Wrote [NIGHTLY_REPORT.md](/home/runner/work/oss-nightly-control/oss-nightly-control/target/NIGHTLY_REPORT.md) and did not change repository code. | ||
|
|
||
| I stopped because the issue already has two active upstream PRs covering the maintainable SDK-side fixes: `#3013` for helper/validation behavior and `#3016` for documentation. A new code/doc PR from this checkout would likely duplicate ongoing review work. | ||
|
|
||
| Tests were not run because no code changed. Current untracked files are `.codex-nightly-prompt.md`, `uv.lock`, and `NIGHTLY_REPORT.md`; I only added the report. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| Implemented a small, defensible docs/example patch for `openai-python#3009`. | ||
|
|
||
| Changed: | ||
| - [README.md](/home/runner/work/oss-nightly-control/oss-nightly-control/target/README.md:47): added a `Conversation state` section showing `previous_response_id` and warning not to filter manual histories down to only messages. | ||
| - [examples/responses/conversation_state.py](/home/runner/work/oss-nightly-control/oss-nightly-control/target/examples/responses/conversation_state.py:1): added a minimal two-turn Responses example. | ||
| - [NIGHTLY_REPORT.md](/home/runner/work/oss-nightly-control/oss-nightly-control/target/NIGHTLY_REPORT.md:1): updated with rationale, tests, and risks. | ||
|
|
||
| Verified: | ||
| - `python -m py_compile examples/responses/conversation_state.py` | ||
|
|
||
| I also checked the current upstream context: issue [#3009](https://github.com/openai/openai-python/issues/3009) is still open, with active related PRs [#3013](https://github.com/openai/openai-python/pull/3013) and [#3016](https://github.com/openai/openai-python/pull/3016), so this patch avoids duplicating their helper/docstring surfaces. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| from openai import OpenAI | ||
|
|
||
|
|
||
| client = OpenAI() | ||
|
|
||
| response = client.responses.create( | ||
| model="gpt-5.2", | ||
| input="Write a haiku about recursion in programming.", | ||
| ) | ||
| print(response.output_text) | ||
|
|
||
| response = client.responses.create( | ||
| model="gpt-5.2", | ||
| input="Now explain it in plain English.", | ||
| previous_response_id=response.id, | ||
| ) | ||
| print(response.output_text) | ||
|
|
||
| # If you manually manage conversation history instead of using | ||
| # previous_response_id, append response.output items in order. Reasoning models | ||
| # may return reasoning items together with assistant messages, and filtering | ||
| # those items down to only messages can break the next request. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit adds run-specific bookkeeping artifacts (
.codex-nightly-retry-1.md,NIGHTLY_CODEX_FINAL_ATTEMPT_1.md, andNIGHTLY_CODEX_FINAL_ATTEMPT_2.md) that are not part of the SDK or user-facing docs and contain ephemeral CI details (including absolute runner paths and point-in-time issue status). Keeping these tracked will create ongoing maintenance noise and confuse contributors about project documentation, so they should be excluded from the change.Useful? React with 👍 / 👎.