Skip to content

Commit 7fa7e16

Browse files
author
xiaose
committed
feat: fix test
1 parent c4aaf94 commit 7fa7e16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/providers/__tests__/minimax.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ describe("MiniMaxHandler", () => {
230230
expect(mockCreate).toHaveBeenCalledWith(
231231
expect.objectContaining({
232232
model: modelId,
233-
max_tokens: modelInfo.maxTokens,
233+
max_tokens: Math.min(modelInfo.maxTokens, Math.ceil(modelInfo.contextWindow * 0.2)),
234234
temperature: 1,
235235
messages: expect.arrayContaining([{ role: "system", content: systemPrompt }]),
236236
stream: true,

0 commit comments

Comments
 (0)