Skip to content

feat(ui): streamline auto-router setup with deployed decision models - #45913

Merged
joshua-berri merged 13 commits into
mainfrom
litellm_jev_router_creation_ui
Oct 11, 2026
Merged

joshua-berri merged 13 commits into
mainfrom
litellm_jev_router_creation_ui

Conversation

@joshua-berri

@joshua-berri joshua-berri commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Current verification status

Independent source verification passed on this final commit, including create, reopen, change deployment, invoke, legacy compatibility, and nonzero cost/provider recording in spend logs. No concrete defects were found. Transport used a controlled local upstream, not a real paid provider

Main CI is green and Bugbot reports no new issues

TLDR

Problem this solves:

  • Auto-router setup scatters classifier, tier, and advanced controls
  • Decision classifiers cannot select an existing model deployment

How it solves it:

  • Groups classifier settings, prefilled tiers, and advanced settings
  • Reuses deployed decision connections and existing dependency authorization
  • Preserves deployment selection when reopening and editing routers

Intentional product change: new decision routers choose an onboarded decision model instead of entering a provider and raw model name. Legacy router configurations remain supported. Tier assignments start with the existing automatic recommendations and remain editable

User Flow

Before: decision-router setup requires separate provider/model choices and scattered settings

  1. Open /ui/models-and-endpoints, then Add Auto Router
  2. Select the decision classifier and separately configure its provider and model
  3. Navigate template, classification frequency, tiers, and advanced controls in separate places

Before: auto-router setup

After: the same task starts with the deployment and keeps related settings together

  1. Open /ui/models-and-endpoints, then Add Auto Router
  2. Select Decisions Model, choose an onboarded deployment, and set classification frequency
  3. Review automatically filled tiers, optionally apply a template or edit them, and expand advanced settings as needed

After: auto-router setup

Implementation

The dropdown intersects available model groups with evaluation mode or existing decision catalog metadata. It saves the deployment alias in deployment_name. A small classifier adapter calls the existing Router.adecisions path, so the selected deployment owns the connection and credentials. Existing key/team dependency checks also apply to this alias. Direct legacy classifier configurations still use their original path

Deployment-backed routers reopen with the same dropdown; ignored legacy provider/model controls are hidden. This fixes the edit regression discovered during independent verification. Access groups only move below the name; their behavior is unchanged. No new endpoints, migrations, routing policies, or provider onboarding changes

Tests

  • 400 affected backend tests pass; deployment credentials, validation, authorization, timeout, cancellation, invalid-tier fallback, and legacy behavior are covered
  • 374 creation/catalog/edit tests pass in independent verification. The new edit regression fails before the fix
  • Production UI build passes. Canonical backend lint/type gates pass; changed UI lint introduces no warnings
  • Local changed executable-line coverage: backend 30/30; frontend 63/63. Touched-function branch coverage: backend 36/46; frontend 590/730. Remaining branches include existing behavior outside this change and defensive picker fallbacks for missing configuration or a disabled clear action. Repository-wide coverage is not inferred from these focused suites
  • Independent Devin execution at 36b18fa2e0 passes create/save/invoke, switching between two deployments, legacy connections, prefill/template reset, timeout/invalid-tier fallback, and live member authorization (200/403/400). Transport uses a controlled HTTP upstream
  • Final test-only tip passes the affected backend tests and independent live replay

Screenshots / Proof of Fix

Same isolated demo data and controlled upstream on baseline and final source builds

Before (bea0d5c)

  1. Open /ui/models-and-endpoints, then Add Auto Router and select the decision classifier
  2. Observe separate provider/model controls and the original layout

Before

After (d033e6c)

  1. Open the same page and select the decision classifier
  2. Select a deployment, save, reopen, change the deployment, and save again
  3. Invoke the router and observe HTTP 200 using the selected connection
  4. Observe classifier spend and routing-decision classifier cost of 5.04e-07 for the controlled 12-token response

After

Caveats

Severe

  • Upgrade every proxy replica before saving deployment-backed routers
  • Older binaries reject the new deployment_name configuration
  • Convert or remove these configurations before rolling back

Low

Type

  • UI improvement and scoped backend support for deployed decision classifiers

Pre-Submission checklist

  • Meaningful regression tests added
  • Affected local tests and production build pass
  • Scope remains limited to auto-router setup and deployment-selection compatibility
  • Required CI and completed Codecov report
  • Greptile confidence ≥4/5, Veria, and Bugbot at the current tip

@joshua-berri

Copy link
Copy Markdown
Contributor Author

@cursor review Please check deployment selection, legacy configuration compatibility, dependency authorization, and the create and edit flows at this tip.

@joshua-berri

Copy link
Copy Markdown
Contributor Author

@greptileai Please review the current tip for deployment selection, authorization, legacy compatibility, and create/edit regressions after the test-formatting correction.

@joshua-berri

Copy link
Copy Markdown
Contributor Author

@cursor review Please review the updated tip after the test-formatting correction, focusing on deployment selection, permissions, and legacy compatibility.

@codecov

codecov Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread litellm/router_strategy/complexity_router/jev_classifier.py
@codspeed

codspeed Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

⚠️ 1 benchmark spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 31 untouched benchmarks


Comparing litellm_jev_router_creation_ui (d033e6c) with main (55c8997)

Open in CodSpeed

@joshua-berri

Copy link
Copy Markdown
Contributor Author

@cursor review New tests exercise real Router cost/provider accounting and pass unchanged production code. Please reassess the reported finding at d033e6c.

@joshua-berri

Copy link
Copy Markdown
Contributor Author

@greptileai Please review d033e6c, including deployed decision selection, authorization, legacy compatibility, and explicit accounting regression assertions through the real Router path.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit d033e6c. Configure here.

@joshua-berri
joshua-berri marked this pull request as ready for review October 11, 2026 03:13
@joshua-berri
joshua-berri merged commit 2ab80ba into main Oct 11, 2026
91 checks passed
@joshua-berri
joshua-berri deleted the litellm_jev_router_creation_ui branch October 11, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants