Repository navigation
fix(ui): keep untouched stored auto-router booleans and reminder marker casing on save - #42703
Merged
yuneng-berri merged 1 commit intoSep 23, 2026
Merged
Conversation
…er casing on save Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
devin-ai-integration
Bot
requested review from
ryan-crabbe-berri and
yuneng-berri
as code owners
September 23, 2026 07:38
Contributor
|
yuneng-berri
approved these changes
Sep 23, 2026
yuneng-berri
deleted the
litellm_autorouter_save_drops_managed_booleans
branch
September 23, 2026 14:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
route_housekeeping_to_cheapest_tier: truemax_tokens_from_tier_model: truereminder_markerscome back lowercased without the user touching themHow it solves it:
User Flow
Before: an admin opens a router created before #42293, saves without changing anything, and two settings silently disappear
legacy-auto-router"route_housekeeping_to_cheapest_tier": true,"max_tokens_from_tier_model": trueand"open": "<System-Reminder>""open": "<system-reminder>"nulland the markers are lowercasedAfter: the same untouched save leaves the stored settings exactly as they were
legacy-auto-router"route_housekeeping_to_cheapest_tier": true,"max_tokens_from_tier_model": trueand"open": "<System-Reminder>"trueand the marker still reads"open": "<System-Reminder>"Relevant issues
Follow-up to #42293, which added these three keys to the managed set
Affected release
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
npx vitest run src/components/edit_auto_router src/components/add_modelfromui/litellm-dashboard(44 files, 1159 tests)@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
Shared setup: proxy on http://localhost:4000 with
STORE_MODEL_IN_DB=Trueand Postgres, dashboard vianpm run devinui/litellm-dashboardon http://localhost:3000, logged in asadminwith the master key. The router was seeded through the API the way a pre-#42293 config would sit in the DB, then reseeded to the identical state before the After leg:Read-back used after each Save:
Reviewer steps, identical on both legs: open http://localhost:3000/models-and-endpoints/, click Auto-Routers, click
legacy-auto-router, click Edit Auto Router, scroll to the bottom of the modal, click Save Changes without touching any field, then click the Raw JSON tab and run the read-back curlBefore (40ec84c)
Untouched Save on a pre-#42293 router
route_housekeeping_to_cheapest_tierandmax_tokens_from_tier_modelare gone, marker is<system-reminder>{ "route_housekeeping_to_cheapest_tier": null, "max_tokens_from_tier_model": null, "reminder_markers": [ { "open": "<system-reminder>", "close": "</system-reminder>" } ] }Regression tests
npx vitest run src/components/edit_auto_router/build_updated_complexity_router_config.test.tswith the new tests on unfixed codeAfter (3fbbf57)
Untouched Save on a pre-#42293 router
true, marker still<System-Reminder>{ "route_housekeeping_to_cheapest_tier": true, "max_tokens_from_tier_model": true, "reminder_markers": [ { "open": "<System-Reminder>", "close": "</System-Reminder>" } ] }Regression tests
edit_auto_router_modal.tsxto the merge-base version while keeping the new testsif (unedited.has(key)) return false;guardbuild_complexity_router_config.test.ts,hydrate_complexity_router_config.test.ts,edit_auto_router_modal.integration.test.tsxand the rest ofbuild_updated_complexity_router_config.test.tsPre-push gates: the base-vs-head A/B above is the live-pr-risk check for this change (the only dependent of
buildUpdatedComplexityRouterConfigis the modal's Save and availability check, both exercised in the run), and an adversarial five-lens self-review of the diff ran inline with no finding at or above the blocker thresholdType
🐛 Bug Fix
Caveats (if any)
Medium
Low
UNEDITED_STORED_VALUE_KEYSlists the three keys the builder emits only onfalse; a fourth such key would need adding here tooJSON.stringify, so a form value that differs only in object key order counts as edited and falls back to the old builder pathnpx tsc --noEmitin the dashboard reports the same pre-existing errors at the merge base and at this tip, none in the changed filesFinal Attestation
Link to Devin session: https://app.devin.ai/sessions/c9c9660a39f94254a359d117f6644a08
Open in Devin Desktop: https://app.devin.ai/desktop/session/c9c9660a39f94254a359d117f6644a08?variant=devin