fix(responses): sync conversation before yielding terminal events in streaming

Move conversation sync logic before yield to ensure it executes even when
streaming consumers break early after receiving response.completed event.
This commit is contained in:
Ashwin Bharambe 2025-10-22 14:15:53 -07:00
parent cb2185b936
commit 000b8f514f
3 changed files with 11 additions and 4 deletions

View file

@ -43,6 +43,7 @@ def pytest_sessionstart(session):
if "SQLITE_STORE_DIR" not in os.environ:
os.environ["SQLITE_STORE_DIR"] = tempfile.mkdtemp()
logger.info(f"Setting SQLITE_STORE_DIR: {os.environ['SQLITE_STORE_DIR']}")
# Set test stack config type for api_recorder test isolation
stack_config = session.config.getoption("--stack-config", default=None)