From e02ac08089136377990f0bb49d3fbe78bb5c5670 Mon Sep 17 00:00:00 2001 From: "roomote[bot]" <219738659+roomote[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 23:24:40 -0400 Subject: [PATCH] feat: add new Chutes provider models (#6699) Co-authored-by: Roo Code --- packages/types/src/providers/chutes.ts | 20 ++++++++++ src/api/providers/__tests__/chutes.spec.ts | 44 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/packages/types/src/providers/chutes.ts b/packages/types/src/providers/chutes.ts index 95946122a3..539d251f2a 100644 --- a/packages/types/src/providers/chutes.ts +++ b/packages/types/src/providers/chutes.ts @@ -23,10 +23,12 @@ export type ChutesModelId = | "Qwen/Qwen3-30B-A3B" | "Qwen/Qwen3-14B" | "Qwen/Qwen3-8B" + | "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8" | "microsoft/MAI-DS-R1-FP8" | "tngtech/DeepSeek-R1T-Chimera" | "zai-org/GLM-4.5-Air" | "zai-org/GLM-4.5-FP8" + | "moonshotai/Kimi-K2-Instruct-75k" export const chutesDefaultModelId: ChutesModelId = "deepseek-ai/DeepSeek-R1-0528" @@ -258,4 +260,22 @@ export const chutesModels = { description: "GLM-4.5-FP8 model with 128k token context window, optimized for agent-based applications with MoE architecture.", }, + "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8": { + maxTokens: 32768, + contextWindow: 262144, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0, + outputPrice: 0, + description: "Qwen3 Coder 480B A35B Instruct FP8 model, optimized for coding tasks.", + }, + "moonshotai/Kimi-K2-Instruct-75k": { + maxTokens: 32768, + contextWindow: 75000, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0.1481, + outputPrice: 0.5926, + description: "Moonshot AI Kimi K2 Instruct model with 75k context window.", + }, } as const satisfies Record diff --git a/src/api/providers/__tests__/chutes.spec.ts b/src/api/providers/__tests__/chutes.spec.ts index 911c848b12..0596a911df 100644 --- a/src/api/providers/__tests__/chutes.spec.ts +++ b/src/api/providers/__tests__/chutes.spec.ts @@ -231,6 +231,50 @@ describe("ChutesHandler", () => { ) }) + it("should return Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8 model with correct configuration", () => { + const testModelId: ChutesModelId = "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8" + const handlerWithModel = new ChutesHandler({ + apiModelId: testModelId, + chutesApiKey: "test-chutes-api-key", + }) + const model = handlerWithModel.getModel() + expect(model.id).toBe(testModelId) + expect(model.info).toEqual( + expect.objectContaining({ + maxTokens: 32768, + contextWindow: 262144, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0, + outputPrice: 0, + description: "Qwen3 Coder 480B A35B Instruct FP8 model, optimized for coding tasks.", + temperature: 0.5, // Default temperature for non-DeepSeek models + }), + ) + }) + + it("should return moonshotai/Kimi-K2-Instruct-75k model with correct configuration", () => { + const testModelId: ChutesModelId = "moonshotai/Kimi-K2-Instruct-75k" + const handlerWithModel = new ChutesHandler({ + apiModelId: testModelId, + chutesApiKey: "test-chutes-api-key", + }) + const model = handlerWithModel.getModel() + expect(model.id).toBe(testModelId) + expect(model.info).toEqual( + expect.objectContaining({ + maxTokens: 32768, + contextWindow: 75000, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0.1481, + outputPrice: 0.5926, + description: "Moonshot AI Kimi K2 Instruct model with 75k context window.", + temperature: 0.5, // Default temperature for non-DeepSeek models + }), + ) + }) + it("completePrompt method should return text from Chutes API", async () => { const expectedResponse = "This is a test response from Chutes" mockCreate.mockResolvedValueOnce({ choices: [{ message: { content: expectedResponse } }] })