diff --git a/app/MindWork AI Studio/Provider/BaseProvider.cs b/app/MindWork AI Studio/Provider/BaseProvider.cs index 2514383..2899e4f 100644 --- a/app/MindWork AI Studio/Provider/BaseProvider.cs +++ b/app/MindWork AI Studio/Provider/BaseProvider.cs @@ -103,9 +103,14 @@ public abstract class BaseProvider : IProvider, ISecretId { using var request = await requestBuilder(); + // // Send the request with the ResponseHeadersRead option. // This allows us to read the stream as soon as the headers are received. // This is important because we want to stream the responses. + // + // Please notice: We do not dispose the response here. The caller is responsible + // for disposing the response object. This is important because the response + // object is used to read the stream. var nextResponse = await this.httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, token); if (nextResponse.IsSuccessStatusCode) {