Skip to content

Commit d1a3c41

Browse files
committed
fix(api): pass abortSignal to streamText() for OpenAI Compatible provider (Zoo-Code-Org#404)
When user clicks stop during streaming, the HTTP request to the provider continues running because Vercel AI SDK's streamText() doesn't receive an abort signal. This wastes API tokens/compute on the provider side. Changes: - Add abortSignal?: AbortSignal to ApiHandlerCreateMessageMetadata interface - Pass Task.ts's AbortController.signal through metadata to createMessage() - Use signal in openai-compatible.ts streamText() options This fix affects all OpenAICompatibleHandler subclasses (LiteLLM, OpenRouter, Vercel AI Gateway, etc.) that use the Vercel AI SDK. Fixes Zoo-Code-Org#404
1 parent f1f7cb4 commit d1a3c41

27 files changed

Lines changed: 665 additions & 828 deletions

‎CODE_OF_CONDUCT.md‎

100644100755
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
</sub>
77
<sub>
88

9-
[한국어](locales/ko/CODE_OF_CONDUCT.md) • [Nederlands](locales/nl/CODE_OF_CONDUCT.md) • [Polski](locales/pl/CODE_OF_CONDUCT.md) • [Português (BR)](locales/pt-BR/CODE_OF_CONDUCT.md) • [Русский](locales/ru/CODE_OF_CONDUCT.md) • [Türkçe](locales/tr/CODE_OF_CONDUCT.md) • [Tiếng Việt](locales/vi/CODE_OF_CONDUCT.md) • [简体中文](locales/zh-CN/CODE_OF_CONDUCT.md) • [繁體中文](locales/zh-TW/CODE_OF_CONDUCT.md)
10-
119
</sub>
1210
</div>
1311

‎CONTRIBUTING.md‎

100644100755
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
</sub>
77
<sub>
88

9-
[한국어](locales/ko/CONTRIBUTING.md) • [Nederlands](locales/nl/CONTRIBUTING.md) • [Polski](locales/pl/CONTRIBUTING.md) • [Português (BR)](locales/pt-BR/CONTRIBUTING.md) • [Русский](locales/ru/CONTRIBUTING.md) • [Türkçe](locales/tr/CONTRIBUTING.md) • [Tiếng Việt](locales/vi/CONTRIBUTING.md) • [简体中文](locales/zh-CN/CONTRIBUTING.md) • [繁體中文](locales/zh-TW/CONTRIBUTING.md)
10-
119
</sub>
1210
</div>
1311

‎README.md‎

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ for this exact support, so if you are having problems or if you have question, j
8787
- [简体中文](locales/zh-CN/README.md)
8888
- [繁體中文](locales/zh-TW/README.md)
8989
- ...
90-
</details>
90+
</details>
9191

9292
---
9393

‎locales/zh-CN/CODE_OF_CONDUCT.md‎

Lines changed: 0 additions & 86 deletions
This file was deleted.

‎locales/zh-CN/CONTRIBUTING.md‎

Lines changed: 0 additions & 141 deletions
This file was deleted.

0 commit comments

Comments
 (0)