Skip to content

fix: persist conversation turns when store=False but a context ID is pass#56

Merged
franciscojavierarceo merged 2 commits into
vllm-project:mainfrom
EmbeddedLLM:fix-persist
Jun 16, 2026
Merged

fix: persist conversation turns when store=False but a context ID is pass#56
franciscojavierarceo merged 2 commits into
vllm-project:mainfrom
EmbeddedLLM:fix-persist

Conversation

@maralbahari

Copy link
Copy Markdown
Collaborator

Summary

  • Previously, passing store=false with conversation_id or previous_response_id returned a 400 error, losing the user's context chain
  • Now the server routes these requests through the full executor (rehydrate + persist) instead of rejecting or proxying them . Confirmed against OpenAI's API behavior via a new cassette recording
  • Engine's should_persist guard updated to cover store || previous_response_id.is_some() || conversation_id.is_some()

Test Plan

  • Added conv-store-false-followup-gpt-4o-nonstreaming.yaml cassette recorded against the live OpenAI API to verify the contract
  • Updated test_store_false_with_conversation_id_hydrates_and_persists to load the new cassette and assert turn 2 rehydrates correctly and its output is persisted for subsequent turns
  • All 87 unit tests + integration tests pass; clippy clean

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: maral <maralbahari.98@gmail.com>
@maralbahari maralbahari changed the title fix: persist conversation turns when but a context ID is pass fix: persist conversation turns when store=False but a context ID is pass Jun 16, 2026
@franciscojavierarceo
franciscojavierarceo merged commit e18319a into vllm-project:main Jun 16, 2026
3 checks passed
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>
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.

2 participants