chore(files): record the bound on the ownership lookup's in filter

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit d2a5f07994)
This commit is contained in:
kerry 2026-11-13 00:39:19 +00:00
parent dd764e8ddc
commit 3f3ef3347e

View file

@ -896,7 +896,12 @@ class _PROXY_LiteLLMManagedFiles(CustomLogger, BaseFileEndpoints):
return
spellings: Final = list(provider_file_id_spellings(file_id))
managed_file = await _managed_file_table(self.prisma_client).find_first(
where={"OR": [{"unified_file_id": {"in": spellings}}, {"flat_model_file_ids": {"hasSome": spellings}}]}
where={
"OR": [
{"unified_file_id": {"in": spellings}}, # bounded-ok: at most four spellings of one file id
{"flat_model_file_ids": {"hasSome": spellings}},
]
}
)
if managed_file is None:
return