mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
The any-discipline gate flagged values whose inferred type contains Any but let `object` slip through: a `dict[str, object]` hands back an unnarrowable value on every read, yet nothing caught it. This extends the same gate to a second discipline. A value whose inferred type is, or contains, `object` now trips LIT010, budgeted per file in its own `object-discipline-budget.json` so the existing tree is grandfathered (324 files, 2109 values, 50% headroom) and only new coarse `object` in an otherwise-clean file fails. A genuine boundary line is suppressed with `# object-ok: <reason>`, the same shape as `# any-ok` A bare `object` at an untyped boundary (a `def f(x: object)` you immediately narrow) is the disciplined alternative to `Any`, so it is grandfathered by the budget rather than carved out in code The leaf predicate, AST walk, suppression scan, and per-file budget are now shared across both disciplines, and `budget_ratchet_check.py` guards the new budget file with the same zero-floor semantics as the Any budget |
||
|---|---|---|
| .. | ||
| adaptive_router_demo | ||
| health_check | ||
| benchmark_anthropic_messages_perf.py | ||
| benchmark_chat_completions_perf.py | ||
| benchmark_mock.py | ||
| benchmark_model_response_creator.py | ||
| benchmark_proxy_vs_provider.py | ||
| benchmark_streaming_chunk_overhead.py | ||
| budget_ratchet_check.py | ||
| check_any_discipline.py | ||
| check_type_discipline.py | ||
| create_litellm_branch.ps1 | ||
| create_litellm_branch.sh | ||
| create_team_key_and_submit_guardrail.sh | ||
| eval_compression.py | ||
| install-cli.sh | ||
| install.sh | ||
| install_git_hooks.sh | ||
| mock_bedrock_passthrough_target.py | ||
| mock_grayswan_timeout_server.py | ||
| mutation_report.py | ||
| ruff_strict_gate.py | ||
| test_agent_mcp_endpoints.sh | ||
| test_guardrails_register_endpoints.sh | ||
| test_tool_allowlist_script.py | ||
| tpm_headline_test.sh | ||
| type_check_gate.py | ||
| type_discipline_gate.py | ||
| verify_adaptive_router.py | ||