Skip to content

Commit 39b0311

Browse files
committed
🐛 feat(providers): add HTTP abort support to all API providers (#404)
1 parent 5daa13d commit 39b0311

3 files changed

Lines changed: 211 additions & 193 deletions

File tree

src/api/providers/__tests__/lite-llm.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ describe("LiteLLMHandler", () => {
208208
// Should have max_completion_tokens, not max_tokens
209209
expect(createCall.max_completion_tokens).toBeDefined()
210210
expect(createCall.max_tokens).toBeUndefined()
211+
212+
// Verify signal is passed as second argument
213+
expect(mockCreate.mock.calls[0][1]).toMatchObject({ signal: expect.any(AbortSignal) })
211214
})
212215

213216
it("should use max_completion_tokens for various GPT-5 model variations", async () => {
@@ -327,6 +330,9 @@ describe("LiteLLMHandler", () => {
327330

328331
expect(createCall.max_completion_tokens).toBeDefined()
329332
expect(createCall.max_tokens).toBeUndefined()
333+
334+
// Verify signal is passed in completePrompt
335+
expect(mockCreate.mock.calls[0][1]).toMatchObject({ signal: expect.any(AbortSignal) })
330336
})
331337

332338
it("should not set any max token fields when maxTokens is undefined (GPT-5 streaming)", async () => {

0 commit comments

Comments
 (0)