Skip to content

Commit 03e5106

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(tests): type structured stream termination fixture
1 parent c5fb0a8 commit 03e5106

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎apps/sim/providers/openai-compat/stream-events.test.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { ChatCompletionChunk } from 'openai/resources/chat/completions'
12
import { describe, expect, it, vi } from 'vitest'
23
import {
34
openaiCompatReasoningAndTextChunks,
@@ -141,8 +142,12 @@ describe('createOpenAICompatibleAgentEventStream', () => {
141142
(async function* () {
142143
yield* openaiCompatTextOnlyChunks as any
143144
yield {
144-
choices: [{ delta: {}, finish_reason: 'length' }],
145-
} as any
145+
id: 'chatcmpl-token-limit',
146+
object: 'chat.completion.chunk',
147+
created: 0,
148+
model: 'deepseek-chat',
149+
choices: [{ index: 0, delta: {}, finish_reason: 'length' }],
150+
} satisfies ChatCompletionChunk
146151
})(),
147152
{ providerName: 'DeepSeek', onComplete }
148153
)

0 commit comments

Comments
 (0)