- pyright strict scoped to the folder (litellm/translation/pyrightconfig.json),
0 errors: standardized the exhaustiveness pattern to match-on-Literal-tag
with assert_never AFTER the match (a 'case never:' capture arm is flagged
by strict as unmatchable), restructured narrowing-hostile spots instead of
suppressing
- ruff folder config (litellm/translation/ruff.toml): PLR1702 (preview), C901,
PLR0915, ANN incl. ANN401, PLW0603 + complexity caps; picked up by the
repo-wide ruff run through hierarchical discovery; folder also modernized
to PEP-604/builtin generics and black-formatted (CI formatter)
- semgrep tenet rules (.semgrep/rules/python/translation/): no raise outside
errors.py, no mutation methods/subscript/augmented assignment, no
module-level mutable state (the rule that would have caught audit F2);
rides the existing semgrep workflow; effort maps frozen behind
MappingProxyType and the name-collision loop rewritten without +=
- import-linter contracts in pyproject (forbidden v1-stack imports + downward-
only layers), import-linter==2.3 added to the dev group (uv.lock updated)
- CI: code-quality job gains translation_v2_pyright_strict and
translation_v2_import_contracts steps; 'make lint-translation' runs all
four gates plus the package tests locally in one command
- CLAUDE.md rewritten to match the real tree and conventions
Replaces the rm-and-symlink hack with a plain actions/checkout
using path: docs/my-website. The previous approach failed on this
branch because docs/my-website no longer exists in the repo (its
parent docs/ directory was also removed), so ln -s had nowhere
to create the symlink.
Also adds the same checkout step to test-unit-documentation.yml,
which was silently relying on docs/my-website existing in-tree
for test_env_keys.py and test_router_settings.py.
Principle: GHA handles work that doesn't need external API keys; CCI
stays for integration tests that hit real API endpoints.
Four CCI jobs moved to new or extended GHA workflows:
1. check_code_and_doc_quality (was 25 runs: ruff + import-safety +
21 code_coverage_tests + 3 documentation_tests + circular-imports).
- The 21 tests/code_coverage_tests/*.py scripts and the 3
tests/documentation_tests/*.py scripts run in the new
.github/workflows/test-code-quality.yml workflow.
- ruff, import-safety, and circular-imports were already run by
.github/workflows/test-linting.yml — no new migration needed.
- The 3 documentation_tests scripts read
docs/my-website/docs/proxy/config_settings.md. Since docs have
moved to BerriAI/litellm-docs, the GHA workflow checks out that
repo and symlinks docs/my-website -> the checkout so the
existing hardcoded paths resolve without touching the scripts.
The stale local docs/my-website/ copy in this repo will be
removed in a separate PR.
2. semgrep (custom-rule SAST against .semgrep/rules).
- New .github/workflows/test-semgrep.yml.
3. installing_litellm_on_python + installing_litellm_on_python_3_13
(pip install compat checks on Python 3.12 and 3.13).
- New .github/workflows/test-install-litellm.yml as a matrix job.
- 3.12 run also verifies litellm_enterprise import; 3.13 run
skips that check (matches previous CCI behavior).
- installing_litellm_on_python_v2_migration_resolver stays in CCI
because it requires a postgres service.
CCI .circleci/config.yml: -112 lines, 4 jobs and their workflow refs
removed.