From 26de269add5e3e6210e97f868dede4ea6c53de40 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 6 May 2026 15:31:05 -0700 Subject: [PATCH] fix: rename env_creds in get_team_vm_config to satisfy mypy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `creds` was reassigned from `AwsCreds` to `Optional[AwsCreds]` in the fallback branch — rename the second binding so mypy can narrow the type. LIT-2878 --- .../agent_session_endpoints/vm_providers/team_config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/litellm/proxy/agent_session_endpoints/vm_providers/team_config.py b/litellm/proxy/agent_session_endpoints/vm_providers/team_config.py index ae0cc97ed92..83970986288 100644 --- a/litellm/proxy/agent_session_endpoints/vm_providers/team_config.py +++ b/litellm/proxy/agent_session_endpoints/vm_providers/team_config.py @@ -174,14 +174,14 @@ async def get_team_vm_config( creds.region = ec2_config.region return TeamVMConfig(aws_creds=creds, ec2_config=ec2_config) - creds = _creds_from_env(default_region=default_region) - if creds is None: + env_creds = _creds_from_env(default_region=default_region) + if env_creds is None: raise InvalidCredentialsError( f"Team {team_id} has no AWS credentials configured " "(no DB row, no LITELLM_AGENT_AWS_* env vars). " "Add them under Settings → Agent VM." ) return TeamVMConfig( - aws_creds=creds, - ec2_config=Ec2Config(region=creds.region), + aws_creds=env_creds, + ec2_config=Ec2Config(region=env_creds.region), )