fix(packaging): shorten content-filter benchmark fixtures to fit Windows MAX_PATH (#29536) - #29553
Conversation
… Windows MAX_PATH The remaining 10 content-filter benchmark result fixtures still use the legacy long naming scheme (block_*_-_contentfilter_(*.yaml).json, 77-83 chars), which pushes the installed path past the 260-char Windows MAX_PATH limit on default (non-long-path) configs, breaking pip install litellm. BerriAI#22039 only shortened insults_cf.json and investment_cf.json. Rename them to the short {topic}_cf.json scheme that test_eval.py's _save_confusion_results already generates, matching the two previously fixed files. Pure rename; file contents (incl. full label) unchanged.
Greptile SummaryThis PR renames 10 benchmark result JSON fixtures from legacy long-form paths (up to 83 chars) to the short
Confidence Score: 5/5Pure rename of benchmark fixture files with no content changes; safe to merge. All 10 renames are content-free (0 insertions, 0 deletions in the diff), the new names align with what the benchmark harness already generates, and no other code in the repository references these result files by name. No files require special attention.
|
| Filename | Overview |
|---|---|
| litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/guardrail_benchmarks/results/age_discrimination_cf.json | Renamed from long legacy path to short {topic}_cf.json scheme; file contents unchanged |
| litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/guardrail_benchmarks/results/claims_fraud_coaching_cf.json | Renamed from long legacy path to short {topic}_cf.json scheme; file contents unchanged |
| litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/guardrail_benchmarks/results/claims_medical_advice_cf.json | Renamed from long legacy path to short {topic}_cf.json scheme; file contents unchanged |
| litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/guardrail_benchmarks/results/claims_phi_disclosure_cf.json | Renamed from long legacy path to short {topic}_cf.json scheme; file contents unchanged |
| litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/guardrail_benchmarks/results/claims_prior_auth_gaming_cf.json | Renamed from long legacy path to short {topic}_cf.json scheme; file contents unchanged |
| litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/guardrail_benchmarks/results/claims_system_override_cf.json | Renamed from long legacy path to short {topic}_cf.json scheme; file contents unchanged |
| litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/guardrail_benchmarks/results/disability_discrimination_cf.json | Renamed from long legacy path to short {topic}_cf.json scheme; file contents unchanged |
| litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/guardrail_benchmarks/results/gender_discrimination_cf.json | Renamed from long legacy path to short {topic}_cf.json scheme; file contents unchanged |
| litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/guardrail_benchmarks/results/military_discrimination_cf.json | Renamed from long legacy path to short {topic}_cf.json scheme; file contents unchanged |
| litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/guardrail_benchmarks/results/religion_discrimination_cf.json | Renamed from long legacy path to short {topic}_cf.json scheme; file contents unchanged |
Reviews (1): Last reviewed commit: "fix(packaging): shorten content-filter b..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Thanks for picking this up — the rename does resolve the immediate One thing worth flagging so this doesn't regress a fourth time (#22039 → here): the recurring cause is that test fixtures are shipped in the wheel at all, and the rename approach has already regressed once. litellm already has the mechanism to fix it durably — source-exclude = [
"litellm/proxy/enterprise",
"**/guardrail_benchmarks/**", # eval/test fixtures — not needed at runtime
"**/__pycache__", "**/__pycache__/**",
...
]Two notes:
Happy to open a follow-up PR for the |
…urable MAX_PATH fix) Per reviewer feedback: the recurring Windows MAX_PATH abort root-causes to test/eval fixtures shipping in the wheel. Drop the whole guardrail_benchmarks tree from the distribution via uv source-exclude while keeping fixtures in-repo for the eval suite.
|
Great call — that's the durable fix. I've added I held off on the Next.js 🤖 Generated with Claude Code |
Summary
Fixes #29536. On Windows without long-path support (the default),
pip install litellmaborts because content-filter benchmark result fixtures bundled in the wheel exceed the 260-charMAX_PATHlimit.#22039 only shortened two files (
insults_cf.json,investment_cf.json). The remaining 10 result fixtures still use the legacy long naming scheme and are 77–83 chars:Fix
Rename the 10 stragglers to the short
{topic}_cf.jsonscheme thattest_eval.py::_save_confusion_resultsalready generates today (the current code splits the label on the em-dash and emitsf"{topic}_cf"). This matches the two files fixed in #22039, so re-running the eval suite regenerates the same names rather than recreating the long ones.block_age_discrimination_-_contentfilter_(age_discrimination.yaml).jsonage_discrimination_cf.jsonblock_claims_fraud_coaching_-_contentfilter_(claims_fraud_coaching.yaml).jsonclaims_fraud_coaching_cf.jsonblock_claims_medical_advice_-_contentfilter_(claims_medical_advice.yaml).jsonclaims_medical_advice_cf.jsonblock_claims_phi_disclosure_-_contentfilter_(claims_phi_disclosure.yaml).jsonclaims_phi_disclosure_cf.jsonblock_claims_prior_auth_gaming_-_contentfilter_(claims_prior_auth_gaming.yaml).jsonclaims_prior_auth_gaming_cf.jsonblock_claims_system_override_-_contentfilter_(claims_system_override.yaml).jsonclaims_system_override_cf.jsonblock_disability_discrimination_-_contentfilter_(disability.yaml).jsondisability_discrimination_cf.jsonblock_gender_discrimination_-_contentfilter_(gender_sexual_orientation.yaml).jsongender_discrimination_cf.jsonblock_military_discrimination_-_contentfilter_(military_status.yaml).jsonmilitary_discrimination_cf.jsonblock_religion_discrimination_-_contentfilter_(religion.yaml).jsonreligion_discrimination_cf.jsonLongest basename drops from 83 → 33 chars. Pure rename — file contents (including the full
labelfield inside each JSON) are unchanged, and nothing reads these results by filename (they are only written by the benchmark suite).🤖 Generated with Claude Code