fix: persist conversation turns when store=False but a context ID is pass#56
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: maral <maralbahari.98@gmail.com>
maralbahari
marked this pull request as ready for review
June 16, 2026 11:39
maralbahari
requested review from
bbrowning,
franciscojavierarceo,
jiahuei,
leseb,
noobHappylife,
qandrew and
tjtanaa
as code owners
June 16, 2026 11:39
store=False but a context ID is pass
franciscojavierarceo
approved these changes
Jun 16, 2026
ashwing
added a commit
to ashwing/agentic-api
that referenced
this pull request
Jun 16, 2026
PR vllm-project#56 changed persist logic to fire when ANY of store/previous_response_id/ conversation_id is set. Our loop was only clearing store=false, leaving conversation_id as a persistence trigger for intermediate iterations. Now clear all three before the loop starts and restore both IDs on the returned payload (matching the original request's response chain). Signed-off-by: Ashwin Giridharan <girida@amazon.com>
ashwing
added a commit
to ashwing/agentic-api
that referenced
this pull request
Jun 17, 2026
PR vllm-project#56 changed persist logic to fire when ANY of store/previous_response_id/ conversation_id is set. Our loop was only clearing store=false, leaving conversation_id as a persistence trigger for intermediate iterations. Now clear all three before the loop starts and restore both IDs on the returned payload (matching the original request's response chain). Signed-off-by: Ashwin Giridharan <girida@amazon.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
store=falsewithconversation_idorprevious_response_idreturned a 400 error, losing the user's context chainshould_persistguard updated to coverstore || previous_response_id.is_some() || conversation_id.is_some()Test Plan
conv-store-false-followup-gpt-4o-nonstreaming.yamlcassette recorded against the live OpenAI API to verify the contracttest_store_false_with_conversation_id_hydrates_and_persiststo load the new cassette and assert turn 2 rehydrates correctly and its output is persisted for subsequent turns