v1.4.494

danielmiessler/Fabricv1.4.494Sep 29, 2026by github-actions[bot]

Upgrading?

AI Summary

Fixed Ollama vendor to properly handle caller context cancellation and prevent resource leaks.

Key Highlights

  • Fixed SendStream and ListModels to honor caller context.Context
  • Resolved issue where disconnecting clients left generations running
  • Added regression tests for stream cancellation

Full Release Notes

## Changes

### PR [#2212](https://github.com/danielmiessler/Fabric/pull/2212) by [pacocartones](https://github.com/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.

Related Repositories