Skip to content

Commit 81acfac

Browse files
committed
cleanup comments
1 parent c5c0a59 commit 81acfac

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/models/__tests__/openai.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,7 @@ describe('OpenAIModel', () => {
192192
const provider = new OpenAIModel({ modelId: 'gpt-4o', client: mockClient })
193193

194194
await expect(async () => {
195-
for await (const _ of provider.stream([])) {
196-
// Should not reach here
197-
}
195+
await collectEvents(provider.stream([]))
198196
}).rejects.toThrow('At least one message is required')
199197
})
200198

src/models/openai.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,6 @@ export class OpenAIModel implements Model<OpenAIModelConfig, ClientOptions> {
436436
}
437437
}
438438

439-
// Validate that n=1 for streaming (if n is in params)
440-
if (this._config.params?.n && typeof this._config.params.n === 'number' && this._config.params.n > 1) {
441-
throw new Error('Streaming with n > 1 is not supported. Multiple choices cannot be streamed simultaneously.')
442-
}
443-
444439
// Spread params object last for forward compatibility
445440
if (this._config.params) {
446441
Object.assign(request, this._config.params)

0 commit comments

Comments
 (0)