Add message id to OpenAI chat response update (#561)

This commit is contained in:
Tao Chen
2025-08-29 12:52:30 -07:00
committed by GitHub
Unverified
parent cc7fb43fde
commit 15f0147164
4 changed files with 12 additions and 0 deletions
@@ -250,6 +250,8 @@ async def test_openai_chat_client_streaming() -> None:
async for chunk in response:
assert chunk is not None
assert isinstance(chunk, ChatResponseUpdate)
assert chunk.message_id is not None
assert chunk.response_id is not None
for content in chunk.contents:
if isinstance(content, TextContent) and content.text:
full_message += content.text
@@ -162,6 +162,8 @@ async def test_scmc_chat_options(
messages=chat_history,
):
assert isinstance(msg, ChatResponseUpdate)
assert msg.message_id is not None
assert msg.response_id is not None
mock_create.assert_awaited_once_with(
model=openai_unit_test_env["OPENAI_CHAT_MODEL_ID"],
stream=True,