Skip to content

fix(responses): use input, not original_input when storing the Response #2300

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

Merged
merged 2 commits into from
May 28, 2025

Conversation

ashwinb
Copy link
Contributor

@ashwinb ashwinb commented May 28, 2025

We must store the full (re-hydrated) input not just the original input in the Response object. Of course, this is not very space efficient and we should likely find a better storage scheme so that we can only store unique entries in the database and then re-hydrate them efficiently later. But that can be done safely later.

Closes #2299

Test Plan

Unit test

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label May 28, 2025
Copy link
Collaborator

@bbrowning bbrowning left a comment

Choose a reason for hiding this comment

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

Looks good to me - new unit test passes and I manually tested this with the original scenario from #2299 to ensure that is fixed as well. Thank you!

Copy link
Contributor

@hardikjshah hardikjshah left a comment

Choose a reason for hiding this comment

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

looks good !

@ashwinb ashwinb merged commit bfdd15d into meta-llama:main May 28, 2025
25 of 26 checks passed
@ashwinb ashwinb deleted the input_store branch May 28, 2025 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Responses API: Previous response input items not getting saved in new response storage
4 participants