mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 13:00:52 +08:00
fix(auth): use base model name for auth matching by stripping suffix
This commit is contained in:
@@ -1743,6 +1743,13 @@ func (m *Manager) pickNextMixed(ctx context.Context, providers []string, model s
|
||||
m.mu.RLock()
|
||||
candidates := make([]*Auth, 0, len(m.auths))
|
||||
modelKey := strings.TrimSpace(model)
|
||||
// Always use base model name (without thinking suffix) for auth matching.
|
||||
if modelKey != "" {
|
||||
parsed := thinking.ParseSuffix(modelKey)
|
||||
if parsed.ModelName != "" {
|
||||
modelKey = strings.TrimSpace(parsed.ModelName)
|
||||
}
|
||||
}
|
||||
registryRef := registry.GetGlobalRegistry()
|
||||
for _, candidate := range m.auths {
|
||||
if candidate == nil || candidate.Disabled {
|
||||
|
||||
Reference in New Issue
Block a user