Split LLM e2e coverage modules - #32399
Conversation
|
|
Greptile SummaryThis PR refactors the e2e coverage reporting infrastructure: LLM cells are now split into "Core LLMs" (
Confidence Score: 5/5Changes are confined to test infrastructure and the coverage registry; no production code is touched. All YAML registry entries validate against the new typed schema (no removed routes or capabilities appear in the YAML files), every reconciled marker target was verified present in its registry file, the new test correctly asserts the Core/Non-Core split arithmetic, and the CLI flag additions follow the existing main() return-code pattern cleanly. No files require special attention.
|
| Filename | Overview |
|---|---|
| tests/e2e/coverage_registry/schema.py | Introduces typed Literals (LlmEndpoint, LlmRoute, LlmCapability) for LlmCell fields; splits ROLLUP into PREFIX_ROLLUP plus a dashboard_module() function that routes LLM cells to "Core LLMs" or "Non-Core LLMs". |
| tests/e2e/coverage_registry/collector.py | Swaps ROLLUP[c.module] for dashboard_module(c); adds --strict and --fail-on-collection-errors CLI flags; formatting only otherwise. |
| tests/e2e/coverage_registry/test_collector.py | Adds test_llm_cells_roll_up_by_core_endpoint covering the new split; expands _llm helper to accept subject_endpoint; arithmetic in assertions verified correct. |
| tests/e2e/management/test_management_e2e.py | Reconciles four orphan markers: management.team.new.persists → mgmt, persists → happy_path for user/org, and mgmt.key.generate.member_forbidden → other.auth.virtual_key.route_permission_enforced; all target IDs verified present in their respective YAML files. |
| tests/e2e/llm_translation/test_provider_features_e2e.py | Fixes two orphan markers: service_tier marker gains the missing streaming segment; bedrock prompt-cache marker changes assertion from cache_hit (orphan) to works (registered). |
| tests/e2e/llm_translation/test_chat_completions_regression_e2e.py | Replaces single orphan provider marker with three specific route markers (openai, anthropic, vertex); formatting-only changes elsewhere. |
| tests/e2e/coverage_registry/llm_conversational.yaml | Adds one new P1 registry entry for llm.chat_completions.openai.service_tier.nonstream.works; all fields validate against the new typed schema. |
| tests/e2e/CLAUDE.md | Updates module listing, naming grammar, and adds --strict / --fail-on-collection-errors usage notes to reflect the new schema and CLI. |
| tests/e2e/coverage_registry/README.md | Documents the Core/Non-Core split and strict mode usage; consistent with schema.py and CLAUDE.md changes. |
Reviews (1): Last reviewed commit: "Split LLM e2e coverage modules" | Re-trigger Greptile
|
|
||
| ROLLUP: dict[str, str] = { | ||
| "llm": "LLMs", | ||
| CORE_LLM_ENDPOINTS: frozenset[str] = frozenset( |
There was a problem hiding this comment.
The annotation
frozenset[str] is wider than needed — a static checker won't flag a typo like "chat_completion" (missing 's') being added here. Narrowing to frozenset[LlmEndpoint] makes the type consistent with the LlmCell.subject_endpoint field it guards.
| CORE_LLM_ENDPOINTS: frozenset[str] = frozenset( | |
| CORE_LLM_ENDPOINTS: frozenset[LlmEndpoint] = frozenset( |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Closing this fork-based PR. Reopened from the in-repo branch here: #32403 |
|
Closing this fork-based PR. Reopened from the in-repo branch BerriAI/litellm:litellm_e2e_llm_module_breakdown here: #32403 |
Summary
Testing
Note:
python -m coverage_registry.collector --strict --fail-on-collection-errorsstill fails on existing collection warnings forlogging/test_prometheus_cardinality_e2e.pyandrealtime; marker-only strict mode passes.