You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Breaking by observation: OpenAICompatibleCompletionService.CompleteStreamingAsync throws when the server reports a failure inside the stream. A server that fails after the 200 (a llama.cpp Compute error., OpenAI, vLLM) sends the failure as a data: event {"error":{"code":500,"message":...}} with no choices; the reader skipped it, so the stream ended as if the model had said nothing. It now throws the exception a refused non-streamed request throws, HttpRequestException, with the event's code as StatusCode (500 when it has none) and the server's message in Message; text already yielded stays delivered. Migration: a caller that treated an empty streamed answer as the failure signal catches HttpRequestException around the enumeration.
OpenAICompatibleCompletionService says why a server refused a request, and releases its responses. A refused request (CompleteAsync and CompleteStreamingAsync) still throws HttpRequestException with the StatusCode, but the message now carries the start (500 characters) of the server's answer - an OpenAI-compatible server states there that a parameter is unsupported, a context is too long or a model is unknown - where it used to say only 400 (Bad Request). The HttpResponseMessage and the request message are disposed on every path (a refused request kept its connection until a finalizer ran).