mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
style(proxy): format model management endpoint
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
b77195d39d
commit
d1e007415e
1 changed files with 2 additions and 7 deletions
|
|
@ -130,9 +130,7 @@ if TYPE_CHECKING:
|
|||
|
||||
router: Final = APIRouter()
|
||||
CLEARABLE_LITELLM_PARAMS: Final = frozenset({"cache_control_injection_points"})
|
||||
NULL_CLEARABLE_LITELLM_PARAMS: Final = frozenset(
|
||||
(*SPECIAL_MODEL_INFO_PARAMS, *CLEARABLE_LITELLM_PARAMS)
|
||||
)
|
||||
NULL_CLEARABLE_LITELLM_PARAMS: Final = frozenset((*SPECIAL_MODEL_INFO_PARAMS, *CLEARABLE_LITELLM_PARAMS))
|
||||
|
||||
|
||||
async def update_team(*args, **kwargs):
|
||||
|
|
@ -765,10 +763,7 @@ def update_db_model(db_model: Deployment, updated_patch: updateDeployment) -> Pr
|
|||
# CLEARABLE_LITELLM_PARAMS lists non-mirrored litellm_params that explicit null may clear.
|
||||
if updated_patch.litellm_params:
|
||||
for field in updated_patch.litellm_params.model_fields_set:
|
||||
if (
|
||||
getattr(updated_patch.litellm_params, field) is None
|
||||
and field in NULL_CLEARABLE_LITELLM_PARAMS
|
||||
):
|
||||
if getattr(updated_patch.litellm_params, field) is None and field in NULL_CLEARABLE_LITELLM_PARAMS:
|
||||
merged_litellm_params.pop(field, None)
|
||||
merged_model_info.pop(field, None)
|
||||
if updated_patch.model_info:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue