From c020fa60d04be1e629eef6fc5a5ef04d92444391 Mon Sep 17 00:00:00 2001 From: gwizz Date: Mon, 22 Dec 2025 23:39:41 +1100 Subject: [PATCH] fix: keep round-robin as default routing --- internal/config/config.go | 2 +- sdk/cliproxy/auth/manager.go | 2 +- sdk/cliproxy/builder.go | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index f76c392f..6bd74c03 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -130,7 +130,7 @@ type QuotaExceeded struct { // RoutingConfig configures how credentials are selected for requests. type RoutingConfig struct { // Strategy selects the credential selection strategy. - // Supported values: "fill-first" (default), "round-robin". + // Supported values: "round-robin" (default), "fill-first". Strategy string `yaml:"strategy,omitempty" json:"strategy,omitempty"` } diff --git a/sdk/cliproxy/auth/manager.go b/sdk/cliproxy/auth/manager.go index 2ba78e5e..c345cd15 100644 --- a/sdk/cliproxy/auth/manager.go +++ b/sdk/cliproxy/auth/manager.go @@ -120,7 +120,7 @@ type Manager struct { // NewManager constructs a manager with optional custom selector and hook. func NewManager(store Store, selector Selector, hook Hook) *Manager { if selector == nil { - selector = &FillFirstSelector{} + selector = &RoundRobinSelector{} } if hook == nil { hook = NoopHook{} diff --git a/sdk/cliproxy/builder.go b/sdk/cliproxy/builder.go index 5da8c073..381a0926 100644 --- a/sdk/cliproxy/builder.go +++ b/sdk/cliproxy/builder.go @@ -205,10 +205,10 @@ func (b *Builder) Build() (*Service, error) { } var selector coreauth.Selector switch strategy { - case "round-robin", "roundrobin", "rr": - selector = &coreauth.RoundRobinSelector{} - default: + case "fill-first", "fillfirst", "ff": selector = &coreauth.FillFirstSelector{} + default: + selector = &coreauth.RoundRobinSelector{} } coreManager = coreauth.NewManager(tokenStore, selector, nil)