Skip to content

feat(dashboard): configure classifier vision input - #39840

Merged
tin-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_classifier_vision_ui
Sep 5, 2026
Merged

tin-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_classifier_vision_ui

Conversation

@tin-berri

@tin-berri tin-berri commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Classifier image input is API-only and hard to discover
  • Dashboard users cannot enable it or set its image cap

How it solves it:

  • Adds classifier image-input controls to the advanced form
  • Keeps the image cap hidden until image classification is on
  • Persists the setting on new and existing auto routers

User Flow

Before: an operator can create or edit an auto router in the dashboard, but cannot configure classifier image input

  1. They open https://litellm-domain/ui/?page=models and select Auto Routers
  2. They add or edit an auto router, open Advanced: Classification Method, and choose an LLM classifier
  3. There is no control for classifier image input, so they must leave the dashboard and edit config.yaml or call the management API

After: the operator can enable image classification and set its request cap where they configure the classifier

  1. They open https://litellm-domain/ui/?page=models and select Auto Routers
  2. They add or edit an auto router, open Advanced: Classification Method, and choose an LLM classifier
  3. They turn on Send images to the classifier and enter a maximum image count
  4. They save and reopen the auto router, and the switch plus count retain their values

Relevant issues

Linear ticket

Resolves LIT-6994

Pre-Submission checklist

  • I have added meaningful tests
  • The handful of test files covering my change pass locally
  • My PR passes all required local checks
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review

Screenshots / Proof of Fix

Captured against a live proxy on :4010 and the dashboard dev server on :3011, driven headlessly. The control sits in Advanced: Classification Method, directly under the classifier circuit breaker, and only renders for an LLM classifier.

Off by default, no cap shown

The switch starts off and the image cap is not rendered, so an existing router keeps its current behavior and its payload is unchanged

Vision control off

On, with the per-request cap

Turning it on reveals the cap, defaulted to 1 and set to 2 here

Vision control on

In context, beside the sibling classifier controls

Classifier panel in context

A stored setting hydrates back into the edit form

A router created through the API with vision: {enabled: true, max_images: 2} was reopened in the dashboard. The switch reads on and the cap reads 2, which is the create/store/hydrate round trip

Edit modal hydrated

Reproduce it:

  1. Run a proxy with STORE_MODEL_IN_DB=True and a few chat models, then npm run dev in ui/litellm-dashboard
  2. Open the dashboard, select Auto-Routers, then Add Auto Router
  3. Pick Custom Configuration, open Advanced: Classification Method, choose LLM Classifier and a classifier model
  4. Turn on Use images for classification and set Maximum images per request to 2
  5. Save, reopen the router, and confirm the switch is on and the count is still 2
  6. Turn the switch off, save, and confirm classifier_llm_config carries no vision key in GET /v2/model/info

Type

🆕 New Feature

Caveats (if any)

Low

@greptile-apps

greptile-apps Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds dashboard controls for enabling classifier vision input and setting the maximum number of images per request. The change preserves the vision configuration in create and edit payloads, removes it when disabled, and adds component and payload tests for these flows

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness or security issues identified

The dashboard control follows the backend default and minimum constraint, persists vision settings through create and edit payloads, and removes the vision object when disabled

Important Files Changed

Filename Overview
ui/litellm-dashboard/src/components/add_model/ClassifierVisionConfig.tsx Adds the classifier vision toggle and positive-integer image-cap input
ui/litellm-dashboard/src/components/add_model/ClassificationMethodConfig.tsx Displays classifier vision controls for LLM classifier configurations
ui/litellm-dashboard/src/components/add_model/build_complexity_router_config.ts Extends the classifier configuration wire type to include vision settings
ui/litellm-dashboard/src/components/add_model/ComplexityRouterConfig.test.tsx Tests visibility, defaults, clamping, and state updates for vision controls
ui/litellm-dashboard/src/components/add_model/build_complexity_router_config.test.ts Tests preservation and omission of vision settings in router payloads
ui/litellm-dashboard/src/components/edit_auto_router/edit_auto_router_modal.test.tsx Tests edit hydration, save round trips, and disabling stored vision settings

Reviews (1): Last reviewed commit: "feat(dashboard): configure classifier vi..." | Re-trigger Greptile

Base automatically changed from litellm_classifier_vision_image_strip to litellm_internal_staging September 5, 2026 01:59
@yuneng-berri
yuneng-berri requested a review from a team September 5, 2026 01:59
@tin-berri
tin-berri force-pushed the litellm_classifier_vision_ui branch from f6d1652 to 56cd174 Compare September 5, 2026 03:37
@tin-berri
tin-berri force-pushed the litellm_classifier_vision_ui branch from 56cd174 to 4f4beb8 Compare September 5, 2026 04:56
@tin-berri
tin-berri enabled auto-merge (squash) September 5, 2026 05:18
@tin-berri
tin-berri merged commit f3cf557 into litellm_internal_staging Sep 5, 2026
181 checks passed
@tin-berri
tin-berri deleted the litellm_classifier_vision_ui branch September 5, 2026 06:57
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