[litellm-agent] Staging → litellm_internal_staging (5/15/2026) - #27991
[litellm-agent] Staging → litellm_internal_staging (5/15/2026)#27991oss-pr-review-agent-shin[bot] wants to merge 3 commits into
Conversation
Squash-merged by litellm-agent from FabrizioCafolla's PR.
|
@greptile please review |
Greptile SummaryThis PR merges two features: HPA autoscaling behavior support in the Helm chart, and an admin-controlled
Confidence Score: 5/5Safe to merge. Both features are additive, the migration is backward-compatible, and the model-blocking logic is applied consistently across all routing and credential-lookup paths. The blocked flag flows correctly from DB → get_model_info_with_id → router model list → every routing entry point (sync, async, pass-through, credential helpers). The auth gate is correctly placed before the DB write. clear_cache() triggers a synchronous DB reload so the block takes effect immediately after the PATCH. The migration uses IF NOT EXISTS with DEFAULT false so existing rows are unaffected. Tests are mock-only and cover all new paths. No files require special attention.
|
| Filename | Overview |
|---|---|
| litellm/router.py | Adds _filter_blocked_deployments, _is_deployment_blocked, and get_fully_blocked_model_names; applies blocked filtering at every routing entry point (sync/async, pass-through, direct dict, credential helpers). Logic is consistent and well-tested. |
| litellm/proxy/management_endpoints/model_management_endpoints.py | Auth gate (proxy-admin only) added before the DB update; update_db_model threads blocked into the Prisma payload; clear_cache() triggers a full DB reload so the block takes effect synchronously. |
| litellm/proxy/proxy_server.py | Propagates DB blocked column into model_info["blocked"] during model load; filters fully-blocked model names from /v1/models in both code branches of model_list. |
| litellm-proxy-extras/litellm_proxy_extras/migrations/20260514120000_add_blocked_to_proxy_model_table/migration.sql | Safe additive migration: ADD COLUMN IF NOT EXISTS "blocked" BOOLEAN NOT NULL DEFAULT false — existing rows are unaffected. |
| litellm/types/router.py | Adds blocked: Optional[bool] = None to ModelInfo and updateDeployment. ModelInfo uses extra="allow" and a custom .get() so dict-style access in the hot path remains compatible. |
| litellm/proxy/route_llm_request.py | Adds _is_deployment_blocked check to the credential-resolution path for file/batch/passthrough endpoints, preventing bypass of an admin pause. |
| deploy/charts/litellm-helm/templates/hpa.yaml | Adds optional behavior block to HPA spec using standard `toYaml |
| tests/test_litellm/test_router.py | Comprehensive mock-only tests for all new blocking paths: sync/async healthy deployment filters, pass-through, credential helpers, and get_fully_blocked_model_names. |
Reviews (3): Last reviewed commit: "fix: pass socket timeouts to Redis clust..." | Re-trigger Greptile
| maxReplicas: 100 | ||
| targetCPUUtilizationPercentage: 80 | ||
| # targetMemoryUtilizationPercentage: 80 | ||
| # behavior: {} |
There was a problem hiding this comment.
The commented-out hint
behavior: {} documents the option but an empty map is falsy in Go templates, so uncomment-and-leave-empty silently produces no output. A brief inline example with at least one meaningful key makes the expectation clearer and reduces user confusion.
| # behavior: {} | |
| # behavior: | |
| # scaleDown: | |
| # stabilizationWindowSeconds: 300 | |
| # scaleUp: | |
| # stabilizationWindowSeconds: 0 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…27927) Squash-merged by litellm-agent from Cyberfilo's PR.
|
@greptile please review |
Squash-merged by litellm-agent from tomdee's PR.
|
@greptile please review |
Merged PRs (2)
Auto-updated by litellm-agent on each merge.