mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
fix(proxy): use set lookup for permitted agent filters
This commit is contained in:
parent
38fd1a99c4
commit
d19dad954e
1 changed files with 2 additions and 1 deletions
|
|
@ -1005,8 +1005,9 @@ async def get_agent_daily_activity(
|
|||
permitted_agent_ids = [a.agent_id for a in owned_records]
|
||||
|
||||
if agent_ids_list:
|
||||
permitted_agent_id_set = set(permitted_agent_ids)
|
||||
agent_ids_list = [
|
||||
aid for aid in agent_ids_list if aid in permitted_agent_ids
|
||||
aid for aid in agent_ids_list if aid in permitted_agent_id_set
|
||||
]
|
||||
else:
|
||||
agent_ids_list = list(permitted_agent_ids)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue