Skip to content

Commit fb08b14

Browse files
committed
feat: add new Chutes provider models
- Added Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8 model - Added moonshotai/Kimi-K2-Instruct model - Added corresponding tests for both new models Fixes #6698
1 parent d90bab7 commit fb08b14

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

packages/types/src/providers/chutes.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ export type ChutesModelId =
2323
| "Qwen/Qwen3-30B-A3B"
2424
| "Qwen/Qwen3-14B"
2525
| "Qwen/Qwen3-8B"
26+
| "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8"
2627
| "microsoft/MAI-DS-R1-FP8"
2728
| "tngtech/DeepSeek-R1T-Chimera"
2829
| "zai-org/GLM-4.5-Air"
2930
| "zai-org/GLM-4.5-FP8"
31+
| "moonshotai/Kimi-K2-Instruct"
3032

3133
export const chutesDefaultModelId: ChutesModelId = "deepseek-ai/DeepSeek-R1-0528"
3234

@@ -258,4 +260,22 @@ export const chutesModels = {
258260
description:
259261
"GLM-4.5-FP8 model with 128k token context window, optimized for agent-based applications with MoE architecture.",
260262
},
263+
"Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8": {
264+
maxTokens: 32768,
265+
contextWindow: 131072,
266+
supportsImages: false,
267+
supportsPromptCache: false,
268+
inputPrice: 0,
269+
outputPrice: 0,
270+
description: "Qwen3 Coder 480B A35B Instruct FP8 model, optimized for coding tasks.",
271+
},
272+
"moonshotai/Kimi-K2-Instruct": {
273+
maxTokens: 32768,
274+
contextWindow: 131072,
275+
supportsImages: false,
276+
supportsPromptCache: false,
277+
inputPrice: 0,
278+
outputPrice: 0,
279+
description: "Moonshot AI Kimi K2 Instruct model.",
280+
},
261281
} as const satisfies Record<string, ModelInfo>

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

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,50 @@ describe("ChutesHandler", () => {
231231
)
232232
})
233233

234+
it("should return Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8 model with correct configuration", () => {
235+
const testModelId: ChutesModelId = "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8"
236+
const handlerWithModel = new ChutesHandler({
237+
apiModelId: testModelId,
238+
chutesApiKey: "test-chutes-api-key",
239+
})
240+
const model = handlerWithModel.getModel()
241+
expect(model.id).toBe(testModelId)
242+
expect(model.info).toEqual(
243+
expect.objectContaining({
244+
maxTokens: 32768,
245+
contextWindow: 131072,
246+
supportsImages: false,
247+
supportsPromptCache: false,
248+
inputPrice: 0,
249+
outputPrice: 0,
250+
description: "Qwen3 Coder 480B A35B Instruct FP8 model, optimized for coding tasks.",
251+
temperature: 0.5, // Default temperature for non-DeepSeek models
252+
}),
253+
)
254+
})
255+
256+
it("should return moonshotai/Kimi-K2-Instruct model with correct configuration", () => {
257+
const testModelId: ChutesModelId = "moonshotai/Kimi-K2-Instruct"
258+
const handlerWithModel = new ChutesHandler({
259+
apiModelId: testModelId,
260+
chutesApiKey: "test-chutes-api-key",
261+
})
262+
const model = handlerWithModel.getModel()
263+
expect(model.id).toBe(testModelId)
264+
expect(model.info).toEqual(
265+
expect.objectContaining({
266+
maxTokens: 32768,
267+
contextWindow: 131072,
268+
supportsImages: false,
269+
supportsPromptCache: false,
270+
inputPrice: 0,
271+
outputPrice: 0,
272+
description: "Moonshot AI Kimi K2 Instruct model.",
273+
temperature: 0.5, // Default temperature for non-DeepSeek models
274+
}),
275+
)
276+
})
277+
234278
it("completePrompt method should return text from Chutes API", async () => {
235279
const expectedResponse = "This is a test response from Chutes"
236280
mockCreate.mockResolvedValueOnce({ choices: [{ message: { content: expectedResponse } }] })

0 commit comments

Comments
 (0)