docs: add inline comment clarifying intentional falsy id behavior

This commit is contained in:
Ryan Crabbe 2026-02-21 14:47:09 -08:00
parent 9c87484b07
commit c039e505ba

View file

@ -628,6 +628,8 @@ def convert_to_model_response_object( # noqa: PLR0915
)
if "id" in response_object:
# Preserve the auto-generated id from ModelResponse.__init__
# when the provider returns a falsy id (None, "")
model_response_object.id = response_object["id"] or model_response_object.id
if "system_fingerprint" in response_object: