mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(proxy_server.py): load default team config straight from config file
This commit is contained in:
parent
142e7cf1ce
commit
1f0598a277
2 changed files with 37 additions and 32 deletions
|
@ -1031,12 +1031,17 @@ class ProxyConfig:
|
|||
- for a given team id
|
||||
- return the relevant completion() call params
|
||||
"""
|
||||
all_teams_config = litellm.default_team_settings
|
||||
# load existing config
|
||||
config = await self.get_config()
|
||||
## LITELLM MODULE SETTINGS (e.g. litellm.drop_params=True,..)
|
||||
litellm_settings = config.get("litellm_settings", None)
|
||||
all_teams_config = litellm_settings.get("default_team_settings", None)
|
||||
team_config: dict = {}
|
||||
if all_teams_config is None:
|
||||
return team_config
|
||||
for team in all_teams_config:
|
||||
assert "team_id" in team
|
||||
if "team_id" not in team:
|
||||
raise Exception(f"team_id missing from team: {team}")
|
||||
if team_id == team["team_id"]:
|
||||
team_config = team
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue