Skip to content

Studio: stop silently dropping earlier replies sent as item references - #16694

Merged
Lyxot merged 3 commits into
unslothai:mainfrom
NilayYadav:earlier-assistant-replies-responses-client
Nov 5, 2026
Merged

Lyxot merged 3 commits into
unslothai:mainfrom
NilayYadav:earlier-assistant-replies-responses-client

Conversation

@NilayYadav

Copy link
Copy Markdown
Collaborator

Apps built on the Vercel AI SDK's OpenAI provider talk to Studio's Responses endpoint and, by default, send each earlier assistant reply back as a short item reference instead of the reply text. Studio ignored those references without a word, so from the second turn on the model only saw the user's messages. It then answered questions about its own earlier replies by guessing, and nothing told the developer why.

Studio keeps no Responses history, so it cannot look those references up. It now refuses them with the same clear 400 error it already gives for previous_response_id and conversation, saying to send the full conversation history, for example with store set to false. With store set to false the AI SDK sends the earlier replies in full and multi-turn chats work as before.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 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 ✅ Completed 2026-11-04T20:36:26.026562Z 3a181ef Manual request
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 404247bbaa

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@NilayYadav

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 3a181ef0e7

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Lyxot

Lyxot commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Reviewed locally; no changes needed, nothing pushed. Head stays at 3a181ef0e7 (38 commits behind main, merges cleanly).

  • Reproduced with the real Vercel AI SDK ([email protected], @ai-sdk/[email protected]): with the default store: true, turn 2 sends item_reference for the earlier rs_ and msg_ items. On main that returns 200 with only the user turns; on this branch it returns the 400, and with store: false the full history goes through with a 200.
  • Plain function calls are always sent in full by the SDK, and the check matches every reference by type, so text, reasoning, and hosted-tool references are all covered.
  • Removing the new refusal fails exactly the 4 new test cases.

Codex confirmation on the current head: #16694 (comment)
CI on 3a181ef0e7: 59 pass, 4 skipped (GPU smoke/gate and agent matrix jobs), 0 failing. No staging PR was needed.

@Lyxot Lyxot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Reproduced the dropped-history bug with the real AI SDK request shape; the refusal is consistent with how previous_response_id is handled, and the merge with current main passes the Responses test suites.

@Lyxot
Lyxot merged commit 5e702b1 into unslothai:main Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants