mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-01 02:02:20 +00:00
fix(agents): pass rate policy without loop-local Final
This commit is contained in:
parent
485bc29a0d
commit
080de402df
1 changed files with 10 additions and 5 deletions
|
|
@ -3090,12 +3090,17 @@ class _PROXY_MaxParallelRequestsHandler_v3(CustomLogger):
|
|||
for agent_id in dict.fromkeys((resolved_agent_id, user_api_key_dict.invoked_agent_id)):
|
||||
if agent_id is None:
|
||||
continue
|
||||
policy: Final = (
|
||||
user_api_key_dict.managed_agent_policy
|
||||
if agent_id == user_api_key_dict.agent_id
|
||||
else user_api_key_dict.invoked_agent_policy
|
||||
descriptors.extend(
|
||||
self._create_agent_rate_limit_descriptors(
|
||||
agent_id=agent_id,
|
||||
data=data,
|
||||
policy=(
|
||||
user_api_key_dict.managed_agent_policy
|
||||
if agent_id == user_api_key_dict.agent_id
|
||||
else user_api_key_dict.invoked_agent_policy
|
||||
),
|
||||
)
|
||||
)
|
||||
descriptors.extend(self._create_agent_rate_limit_descriptors(agent_id=agent_id, data=data, policy=policy))
|
||||
|
||||
return descriptors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue