Skip to content

Commit 50500de

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 50500de

27 files changed

Lines changed: 664 additions & 829 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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,8 @@ for this exact support, so if you are having problems or if you have question, j
8484
- [Русский](locales/ru/README.md)
8585
- [Türkçe](locales/tr/README.md)
8686
- [Tiếng Việt](locales/vi/README.md)
87-
- [简体中文](locales/zh-CN/README.md)
88-
- [繁體中文](locales/zh-TW/README.md)
8987
- ...
90-
</details>
88+
</details>
9189

9290
---
9391

‎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)