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
PR #2212 by pacocartones: fix(ollama): honor caller context in SendStream and ListModels
Fixed SendStream and ListModels in the Ollama vendor to honor the caller's context.Context instead of substituting context.Background(), so cancellations now propagate to o.client.Chat and o.client.List.
Resolved an issue where disconnecting web clients left Ollama generations running in the SSE server path, wasting compute and leaking in-flight requests (closes #2196).
Added a table-driven httptest regression test that cancels mid-stream and asserts SendStream returns context.Canceled promptly without draining the full stream.
Simplified the Ollama stream cancellation test coverage, including streamlined streaming responses and server cancellation checks.
Replaced manual cancellation error assertions with require.ErrorIs checks and removed explicit timeout guards and stream completion tracking.