{"record":{"id":"fba664eed62ac689","repo":"BerriAI/litellm","slug":"at-least-one-field-must-be-provided-for-update-fba664","errorCode":null,"errorMessage":"At least one field must be provided for update","messagePattern":"At least one field must be provided for update","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/spend_tracking/vantage_endpoints.py","lineNumber":200,"sourceCode":")\nasync def update_vantage_settings(\n    request: VantageSettingsUpdate,\n    user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),\n):\n    \"\"\"\n    Update existing Vantage settings.\n\n    Allows updating individual Vantage configuration fields without requiring all fields.\n    Only admin users can update Vantage settings.\n    \"\"\"\n    if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN:\n        raise HTTPException(\n            status_code=403,\n            detail={\"error\": CommonProxyErrors.not_allowed_access.value},\n        )\n\n    if not any([request.api_key, request.integration_token, request.base_url]):\n        raise HTTPException(\n            status_code=400,\n            detail={\"error\": \"At least one field must be provided for update\"},\n        )\n\n    try:\n        current_settings: Final = await _get_vantage_settings()\n\n        if not current_settings:\n            raise HTTPException(\n                status_code=404,\n                detail={\"error\": \"Vantage settings not found. Please initialize settings first using /vantage/init\"},\n            )\n\n        updated_api_key: Final = request.api_key if request.api_key is not None else current_settings.get(\"api_key\", \"\")\n        updated_token: Final = (\n            request.integration_token\n            if request.integration_token is not None\n            else current_settings.get(\"integration_token\", \"\")","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/spend_tracking/vantage_endpoints.py#L182-L218","documentation":"Input guard on PATCH-style update of Vantage settings: the request body contained no api_key, integration_token, or base_url, so the partial-update endpoint has nothing to apply and rejects with 400 rather than performing a no-op write.","triggerScenarios":"Thrown at litellm/proxy/spend_tracking/vantage_endpoints.py:200 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include at least one updatable field in the request body of the update call."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}