The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(scim): treat NULL blocked column as unblocked when deprovisioning
Cursor Agent9aef4ee695ed
diff --git a/litellm/proxy/_experimental/out/404.html b/litellm/proxy/_experimental/out/404/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/404.htmlrename to litellm/proxy/_experimental/out/404/index.htmldiff --git a/litellm/proxy/_experimental/out/_not-found.html b/litellm/proxy/_experimental/out/_not-found/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/_not-found.htmlrename to litellm/proxy/_experimental/out/_not-found/index.htmldiff --git a/litellm/proxy/_experimental/out/api-reference.html b/litellm/proxy/_experimental/out/api-reference/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/api-reference.htmlrename to litellm/proxy/_experimental/out/api-reference/index.htmldiff --git a/litellm/proxy/_experimental/out/experimental/api-playground.html b/litellm/proxy/_experimental/out/experimental/api-playground/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/experimental/api-playground.htmlrename to litellm/proxy/_experimental/out/experimental/api-playground/index.htmldiff --git a/litellm/proxy/_experimental/out/experimental/budgets.html b/litellm/proxy/_experimental/out/experimental/budgets/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/experimental/budgets.htmlrename to litellm/proxy/_experimental/out/experimental/budgets/index.htmldiff --git a/litellm/proxy/_experimental/out/experimental/caching.html b/litellm/proxy/_experimental/out/experimental/caching/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/experimental/caching.htmlrename to litellm/proxy/_experimental/out/experimental/caching/index.htmldiff --git a/litellm/proxy/_experimental/out/experimental/claude-code-plugins.html b/litellm/proxy/_experimental/out/experimental/claude-code-plugins/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/experimental/claude-code-plugins.htmlrename to litellm/proxy/_experimental/out/experimental/claude-code-plugins/index.htmldiff --git a/litellm/proxy/_experimental/out/experimental/old-usage.html b/litellm/proxy/_experimental/out/experimental/old-usage/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/experimental/old-usage.htmlrename to litellm/proxy/_experimental/out/experimental/old-usage/index.htmldiff --git a/litellm/proxy/_experimental/out/experimental/prompts.html b/litellm/proxy/_experimental/out/experimental/prompts/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/experimental/prompts.htmlrename to litellm/proxy/_experimental/out/experimental/prompts/index.htmldiff --git a/litellm/proxy/_experimental/out/experimental/tag-management.html b/litellm/proxy/_experimental/out/experimental/tag-management/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/experimental/tag-management.htmlrename to litellm/proxy/_experimental/out/experimental/tag-management/index.htmldiff --git a/litellm/proxy/_experimental/out/guardrails.html b/litellm/proxy/_experimental/out/guardrails/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/guardrails.htmlrename to litellm/proxy/_experimental/out/guardrails/index.htmldiff --git a/litellm/proxy/_experimental/out/login.html b/litellm/proxy/_experimental/out/login/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/login.htmlrename to litellm/proxy/_experimental/out/login/index.htmldiff --git a/litellm/proxy/_experimental/out/logs.html b/litellm/proxy/_experimental/out/logs/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/logs.htmlrename to litellm/proxy/_experimental/out/logs/index.htmldiff --git a/litellm/proxy/_experimental/out/mcp/oauth/callback.html b/litellm/proxy/_experimental/out/mcp/oauth/callback/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/mcp/oauth/callback.htmlrename to litellm/proxy/_experimental/out/mcp/oauth/callback/index.htmldiff --git a/litellm/proxy/_experimental/out/model-hub.html b/litellm/proxy/_experimental/out/model-hub/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/model-hub.htmlrename to litellm/proxy/_experimental/out/model-hub/index.htmldiff --git a/litellm/proxy/_experimental/out/model_hub.html b/litellm/proxy/_experimental/out/model_hub/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/model_hub.htmlrename to litellm/proxy/_experimental/out/model_hub/index.htmldiff --git a/litellm/proxy/_experimental/out/model_hub_table.html b/litellm/proxy/_experimental/out/model_hub_table/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/model_hub_table.htmlrename to litellm/proxy/_experimental/out/model_hub_table/index.htmldiff --git a/litellm/proxy/_experimental/out/models-and-endpoints.html b/litellm/proxy/_experimental/out/models-and-endpoints/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/models-and-endpoints.htmlrename to litellm/proxy/_experimental/out/models-and-endpoints/index.htmldiff --git a/litellm/proxy/_experimental/out/onboarding.html b/litellm/proxy/_experimental/out/onboarding/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/onboarding.htmlrename to litellm/proxy/_experimental/out/onboarding/index.htmldiff --git a/litellm/proxy/_experimental/out/organizations.html b/litellm/proxy/_experimental/out/organizations/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/organizations.htmlrename to litellm/proxy/_experimental/out/organizations/index.htmldiff --git a/litellm/proxy/_experimental/out/playground.html b/litellm/proxy/_experimental/out/playground/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/playground.htmlrename to litellm/proxy/_experimental/out/playground/index.htmldiff --git a/litellm/proxy/_experimental/out/policies.html b/litellm/proxy/_experimental/out/policies/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/policies.htmlrename to litellm/proxy/_experimental/out/policies/index.htmldiff --git a/litellm/proxy/_experimental/out/settings/admin-settings.html b/litellm/proxy/_experimental/out/settings/admin-settings/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/settings/admin-settings.htmlrename to litellm/proxy/_experimental/out/settings/admin-settings/index.htmldiff --git a/litellm/proxy/_experimental/out/settings/logging-and-alerts.html b/litellm/proxy/_experimental/out/settings/logging-and-alerts/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/settings/logging-and-alerts.htmlrename to litellm/proxy/_experimental/out/settings/logging-and-alerts/index.htmldiff --git a/litellm/proxy/_experimental/out/settings/router-settings.html b/litellm/proxy/_experimental/out/settings/router-settings/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/settings/router-settings.htmlrename to litellm/proxy/_experimental/out/settings/router-settings/index.htmldiff --git a/litellm/proxy/_experimental/out/settings/ui-theme.html b/litellm/proxy/_experimental/out/settings/ui-theme/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/settings/ui-theme.htmlrename to litellm/proxy/_experimental/out/settings/ui-theme/index.htmldiff --git a/litellm/proxy/_experimental/out/skills.html b/litellm/proxy/_experimental/out/skills/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/skills.htmlrename to litellm/proxy/_experimental/out/skills/index.htmldiff --git a/litellm/proxy/_experimental/out/teams.html b/litellm/proxy/_experimental/out/teams/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/teams.htmlrename to litellm/proxy/_experimental/out/teams/index.htmldiff --git a/litellm/proxy/_experimental/out/test-key.html b/litellm/proxy/_experimental/out/test-key/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/test-key.htmlrename to litellm/proxy/_experimental/out/test-key/index.htmldiff --git a/litellm/proxy/_experimental/out/tools/mcp-servers.html b/litellm/proxy/_experimental/out/tools/mcp-servers/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/tools/mcp-servers.htmlrename to litellm/proxy/_experimental/out/tools/mcp-servers/index.htmldiff --git a/litellm/proxy/_experimental/out/tools/vector-stores.html b/litellm/proxy/_experimental/out/tools/vector-stores/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/tools/vector-stores.htmlrename to litellm/proxy/_experimental/out/tools/vector-stores/index.htmldiff --git a/litellm/proxy/_experimental/out/usage.html b/litellm/proxy/_experimental/out/usage/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/usage.htmlrename to litellm/proxy/_experimental/out/usage/index.htmldiff --git a/litellm/proxy/_experimental/out/users.html b/litellm/proxy/_experimental/out/users/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/users.htmlrename to litellm/proxy/_experimental/out/users/index.htmldiff --git a/litellm/proxy/_experimental/out/virtual-keys.html b/litellm/proxy/_experimental/out/virtual-keys/index.htmlsimilarity index 100%rename from litellm/proxy/_experimental/out/virtual-keys.htmlrename to litellm/proxy/_experimental/out/virtual-keys/index.htmldiff --git a/litellm/proxy/management_endpoints/scim/scim_v2.py b/litellm/proxy/management_endpoints/scim/scim_v2.pyindex 8f332dcf484..92c8dc344ae 100644--- a/litellm/proxy/management_endpoints/scim/scim_v2.py+++ b/litellm/proxy/management_endpoints/scim/scim_v2.py@@ -351,15 +351,25 @@ async def _set_user_keys_blocked(user_id: str, blocked: bool) -> int:prisma_client = await _get_prisma_client_or_raise_exception()# Only flip keys whose current state differs — avoids touching keys that- # were already (un)blocked manually by an admin.+ # were already (un)blocked manually by an admin. `blocked` is a nullable+ # column with no default, so existing keys typically have `blocked=NULL`;+ # we must treat NULL as "not blocked" so SQL equality on NULL doesn't+ # silently skip them.+ if blocked:+ state_filter: Dict[str, Any] = {"OR": [{"blocked": False}, {"blocked": None}]}+ else:+ state_filter = {"blocked": True}++ where_clause: Dict[str, Any] = {"user_id": user_id, **state_filter}+affected_keys = await prisma_client.db.litellm_verificationtoken.find_many(- where={"user_id": user_id, "blocked": not blocked},+ where=where_clause,)if not affected_keys:return 0await prisma_client.db.litellm_verificationtoken.update_many(- where={"user_id": user_id, "blocked": not blocked},+ where=where_clause,data={"blocked": blocked},)diff --git a/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py b/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.pyindex 2b338d97165..e68aef9aeda 100644--- a/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py+++ b/tests/test_litellm/proxy/management_endpoints/scim/test_scim_key_deactivation.py@@ -75,7 +75,10 @@ async def test_set_user_keys_blocked_flips_state_and_invalidates_cache():assert flipped == 2mock_db.litellm_verificationtoken.update_many.assert_awaited_once_with(- where={"user_id": "user-x", "blocked": False},+ where={+ "user_id": "user-x",+ "OR": [{"blocked": False}, {"blocked": None}],+ },data={"blocked": True},)assert sorted(cache_deletions) == ["hash-1", "hash-2"]@@ -129,7 +132,10 @@ async def test_scim_delete_user_blocks_keys_before_deleting_user():assert response.status_code == 204mock_db.litellm_verificationtoken.update_many.assert_awaited_once_with(- where={"user_id": user_id, "blocked": False},+ where={+ "user_id": user_id,+ "OR": [{"blocked": False}, {"blocked": None}],+ },data={"blocked": True},)mock_db.litellm_usertable.delete.assert_awaited_once_with(@@ -187,7 +193,10 @@ async def test_scim_patch_user_active_false_blocks_keys():await patch_user(user_id=user_id, patch_ops=patch_ops)mock_db.litellm_verificationtoken.update_many.assert_awaited_once_with(- where={"user_id": user_id, "blocked": False},+ where={+ "user_id": user_id,+ "OR": [{"blocked": False}, {"blocked": None}],+ },data={"blocked": True},)