Skip to content
Source
Sign inSign up
TanStack/ai

fix(ai-ollama): forward the caller's abort signal to the Ollama request #1708

MergedArVaViT(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/1708/headmerged by AlemTuzlak View on GitHub

Showing 5 changed files with 7 additions and 2 deletions (loading 2).

x
0 of 5 viewed, 5 left
5 additions and 0 deletions.changeset/ollama-forward-abort-signal.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/ai-ollama': patch
+---
+​
+Aborting a chat now cancels the in-flight request to Ollama, for both streaming and structured output.
1 addition and 1 deletiondocs/adapters/ollama.mdModified
View file
@@ -87,7 +87,7 @@
​
`host` and `headers` are aliases of the same two options. If you set both forms, `baseURL` and `defaultHeaders` win.
​
-Need more than a fixed header, such as a log of each model call? This adapter supports [`wrapFetch`](../advanced/middleware#change-the-http-requests-of-a-call). An adapter with your own `Ollama` client ignores it.
+Need more than a fixed header, such as a log of each model call? This adapter supports [`wrapFetch`](../advanced/middleware#change-the-http-requests-of-a-call). An adapter with your own `Ollama` client ignores it and the abort signal.
​
## Available Models
​
1 addition and 1 deletiondocs/config.jsonModified
View file
@@ -1217,7 +1217,7 @@
"label": "Ollama",
"to": "adapters/ollama",
"addedAt": "2026-04-15",
- "updatedAt": "2026-10-09"
+ "updatedAt": "2026-10-11"
"label": "Grok (xAI)",