Sort provider pool members by priority then weight - #108
Merged
Conversation
The pool member list now reflects the backend's actual call order: priority ascending (lower is tried first), then weight descending within the same priority for visual grouping of higher-traffic members. Applies in three places: when opening the edit dialog, after saving a member's config, and when adding a member. The saved pool list page also sorts and shows priority/weight badges so the order is visible without opening the editor.
ganisback
self-requested a review
August 10, 2026 13:21
ganisback
approved these changes
Aug 10, 2026
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.
Why
The pool member list did not reflect the backend's actual call order, so users could not see which member would be tried first without opening each member's config.
The backend (
orderedMembers()inprovider_pool_inference.go) tries members in priority ascending order (lower priority first), and load-splits within the same priority by weight ratio.What changed
sortProviderPoolMembersorders members by:Applied at three points so the list stays ordered during editing:
openProviderPoolDialog)saveProviderPoolMemberConfigDialog)toggleProviderPoolSourceModel)The saved pool list page (
ProviderPoolsSection) also sorts and now shows priority/weight badges on each member card, so the order and routing are visible without opening the editor. The edit dialog member cards already show the same badges.Notes