revert: remove defensive isinstance check from production code

Greptile correctly pointed out that load_team_config() always returns a
dict in production. The isinstance check masked test bugs rather than
fixing them. The proper fix is configuring Mock.load_team_config in tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Harshit28j 2026-03-04 23:51:07 +05:30
parent de4caed83e
commit 6cff590464

View file

@ -799,7 +799,7 @@ class LiteLLMProxyRequestSetup:
Add team-based callbacks from the config
"""
team_config = proxy_config.load_team_config(team_id=team_id)
if not isinstance(team_config, dict) or len(team_config.keys()) == 0:
if len(team_config.keys()) == 0:
return None
callback_vars_dict = {**team_config.get("callback_vars", team_config)}