diff --git a/provider_openai.go b/provider_openai.go index 106126f..0b9fb07 100644 --- a/provider_openai.go +++ b/provider_openai.go @@ -121,7 +121,7 @@ func (a *openaiAdapter) chatCompletion(ctx context.Context, w http.ResponseWrite return usage{}, newProviderHTTPError(resp) } - if streaming && strings.Contains(resp.Header.Get("Content-Type"), "text/event-stream") { + if streaming && strings.Contains(strings.ToLower(resp.Header.Get("Content-Type")), "text/event-stream") { return a.forwardStream(w, resp.Body, clientAskedUsage) } // Either a non-streaming request, or a streaming one whose upstream