litellm/litellm/telemetry
Mateo Wang 3ccc619792
fix(router): make the constructor stub work for mypy and guard it in CI (#50354)
* fix(router): make the constructor stub work for mypy and guard it in CI

Use a plain ParamSpec so mypy reads the stub, drop the dead _host parameter
the Rust core already refused, type check a valid and an unknown argument in
tests/e2e_harness, and run that type check when litellm Python files change.

* fix(typing): read type variables as type variables in mypy and guard the Router stub in lint

* fix(typing): count only the probe errors in the Router stub guard and flag Final type variables everywhere

* fix(lint): run the Router stub guard and e2e type check from make check

make check now runs check_router_constructor_stub.py when litellm/router.py
or uv.lock changes, and the e2e basedpyright step on pyproject.toml, uv.lock,
pyrightconfig.json, and litellm-proxy-extras Python, matching CI. CI's e2e
type check also fires on litellm-proxy-extras Python, which tests/e2e/perf
imports. LIT010 treats TypeAliasType like a type variable, since mypy also
rejects a Final type alias.

* fix(lint): guard the Router stub through the litellm export and keep TypeAliasType bare in LIT010 docs

* test: type the new LIT010 type variable tests
2026-11-22 21:25:00 +00:00
..
__init__.py feat(telemetry): add litellm.telemetry records, semantic group consent and sink protocol (#45484) 2026-10-13 18:19:22 -07:00
aggregate.py fix(router): make the constructor stub work for mypy and guard it in CI (#50354) 2026-11-22 21:25:00 +00:00
consent.py feat(telemetry): add litellm.telemetry records, semantic group consent and sink protocol (#45484) 2026-10-13 18:19:22 -07:00
histogram.py feat(telemetry): add AggregatingSink, fixed-bucket histograms, Report and HttpExporter (#45487) 2026-10-13 18:33:01 -07:00
http_exporter.py feat(telemetry): add AggregatingSink, fixed-bucket histograms, Report and HttpExporter (#45487) 2026-10-13 18:33:01 -07:00
records.py feat(telemetry): add litellm.telemetry records, semantic group consent and sink protocol (#45484) 2026-10-13 18:19:22 -07:00
report.py feat(telemetry): add AggregatingSink, fixed-bucket histograms, Report and HttpExporter (#45487) 2026-10-13 18:33:01 -07:00
sample.py feat(telemetry): add AggregatingSink, fixed-bucket histograms, Report and HttpExporter (#45487) 2026-10-13 18:33:01 -07:00
sink.py refactor: clean up fresh tech debt in per-user Copilot auth, Ternary FOCUS export and telemetry (#45769) 2026-10-15 04:29:27 +00:00