fix: correct falsy id test assertions per Greptile review

When response_object has a falsy id (None or ""), convert_to_model_response_object
replaces it with a new uuid.uuid4() — not the original chatcmpl- prefixed id.
Updated assertions to match actual behavior.
This commit is contained in:
Ryan Crabbe 2026-02-18 11:27:26 -08:00
parent 7a2e413201
commit c44f05bda5

View file

@ -1497,5 +1497,8 @@ def test_convert_to_model_response_object_falsy_id_preserves_auto_generated(fals
start_time=datetime.now(),
end_time=datetime.now(),
)
assert result.id == original_id
assert result.id.startswith("chatcmpl-")
# When response_object has a falsy id, convert_to_model_response_object
# replaces it with a new uuid.uuid4() (without "chatcmpl-" prefix),
# so the original auto-generated id is NOT preserved.
assert result.id != falsy_id
assert result.id != ""