mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-02 04:20:50 +08:00
fix(thinking): fix auth matching for thinking suffix and json field conflicts
This commit is contained in:
@@ -1711,6 +1711,13 @@ func (m *Manager) pickNext(ctx context.Context, provider, model string, opts cli
|
||||
}
|
||||
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.Provider != provider || candidate.Disabled {
|
||||
|
||||
Reference in New Issue
Block a user