Repository navigation
Conversation
Preset #40341 pointed the Anthropic family REASONING tier at claude-fable-5-1, but this test still hardcoded claude-opus-5, so the payload it saw no longer matched. Rebase the assertion on ANTHROPIC_PRESET.complexity_router_config.tier_model_configs so a preset refresh flows through instead of redding the suite on staging. Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
|
|
Greptile SummaryThis test-only change updates the auto-router assertion to follow the current Anthropic preset
Confidence Score: 4/5The production code is unaffected, but the test should independently retain its reasoning-effort assertion before merging The dynamic model name fixes preset-refresh failures, while deriving the entire expected configuration allows an accidental preset removal of reasoning effort to pass Files Needing Attention: ui/litellm-dashboard/src/components/add_model/add_auto_router_tab.test.tsx
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/components/add_model/add_auto_router_tab.test.tsx | Makes the expected model preset-driven, but also derives the behavior under test from the input fixture |
Reviews (1): Last reviewed commit: "test(ui): derive reasoning-effort assert..." | Re-trigger Greptile
| tier_model_configs: { | ||
| REASONING: [{ model_name: "claude-opus-5", litellm_params: { reasoning_effort: "high" } }], | ||
| }, | ||
| tier_model_configs: ANTHROPIC_PRESET.complexity_router_config.tier_model_configs, |
There was a problem hiding this comment.
This derives expected reasoning effort from the input fixture, weakening regression coverage. Repository rules require modified tests to preserve coverage before merge
Rule Used: What: Flag any modifications to existing tests and... (source)
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!
TLDR
Problem this solves:
How it solves it:
User Flow
Test-only change, no user-visible behaviour changes
Relevant issues
Linear ticket
Pre-Submission checklist
uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
UI-test-only fix, so the proof is the same vitest file CI runs, on the same head as this PR
Before (f529d6d, the staging tip that first failed)
npx vitest run src/components/add_model/add_auto_router_tab.test.tsx --pool forksunder ui/litellm-dashboardFAIL src/components/add_model/add_auto_router_tab.test.tsx > AddAutoRouterTab > template presets > carries a preset's per-tier reasoning effort through to the create payload,AssertionError: expected { …(5) } to match object { complexity_router_config: { …(1) } }, diff shows- "model_name": "claude-opus-5"vs+ "model_name": "claude-fable-5-1"After (da4d010)
Type
✅ Test
Caveats (if any)
Low