mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
docs: add inline comment clarifying intentional falsy id behavior
This commit is contained in:
parent
9c87484b07
commit
c039e505ba
1 changed files with 2 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue