Update pkg/providers/openai_compat/provider.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Equent 2026-03-08 22:13:30 +08:00 committed by GitHub
parent 14b7089e62
commit f1cc9c4abd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -138,7 +138,7 @@ func (p *Provider) Chat(
fallbackOut, fallbackErr := p.chatCompletions(ctx, messages, tools, normalizedModel, options) fallbackOut, fallbackErr := p.chatCompletions(ctx, messages, tools, normalizedModel, options)
if fallbackErr != nil { if fallbackErr != nil {
return nil, fmt.Errorf("responses request failed: %w; fallback chat/completions failed: %v", err, fallbackErr) return nil, fmt.Errorf("responses request failed; fallback chat/completions failed: %w", errors.Join(err, fallbackErr))
} }
return fallbackOut, nil return fallbackOut, nil
} }