From cea0fe925f268f6fa8ce8322db87d056a74a0ab0 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Tue, 22 Jul 2025 06:13:46 +0000 Subject: [PATCH 1/2] feat: add Qwen/Qwen3-235B-A22B-Instruct-2507 model to Chutes AI provider - Added model ID to ChutesModelId type - Added model configuration with 262,144 token context window - Added test case to verify model configuration - Fixes #6050 --- packages/types/src/providers/chutes.ts | 10 ++++++++++ src/api/providers/__tests__/chutes.spec.ts | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/packages/types/src/providers/chutes.ts b/packages/types/src/providers/chutes.ts index 524f8420595..d85750b47d3 100644 --- a/packages/types/src/providers/chutes.ts +++ b/packages/types/src/providers/chutes.ts @@ -18,6 +18,7 @@ export type ChutesModelId = | "deepseek-ai/DeepSeek-R1-Zero" | "deepseek-ai/DeepSeek-V3-0324" | "Qwen/Qwen3-235B-A22B" + | "Qwen/Qwen3-235B-A22B-Instruct-2507" | "Qwen/Qwen3-32B" | "Qwen/Qwen3-30B-A3B" | "Qwen/Qwen3-14B" @@ -226,4 +227,13 @@ export const chutesModels = { outputPrice: 0, description: "TNGTech DeepSeek R1T Chimera model.", }, + "Qwen/Qwen3-235B-A22B-Instruct-2507": { + maxTokens: 32768, + contextWindow: 262144, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0, + outputPrice: 0, + description: "Qwen3 235B A22B Instruct 2507 model with 262K 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 cf8d9a6e13c..419ac50dfde 100644 --- a/src/api/providers/__tests__/chutes.spec.ts +++ b/src/api/providers/__tests__/chutes.spec.ts @@ -163,6 +163,28 @@ describe("ChutesHandler", () => { expect(model.info).toEqual(expect.objectContaining(chutesModels[testModelId])) }) + it("should return Qwen3-235B-A22B-Instruct-2507 model with correct configuration", () => { + const testModelId: ChutesModelId = "Qwen/Qwen3-235B-A22B-Instruct-2507" + 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 235B A22B Instruct 2507 model with 262K 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 } }] }) From 3f0cb402469ae8f53f36a15134bc3ec71723d327 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Tue, 22 Jul 2025 21:09:45 -0400 Subject: [PATCH 2/2] Update chutes.ts --- packages/types/src/providers/chutes.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/types/src/providers/chutes.ts b/packages/types/src/providers/chutes.ts index d85750b47d3..5d817992238 100644 --- a/packages/types/src/providers/chutes.ts +++ b/packages/types/src/providers/chutes.ts @@ -164,6 +164,15 @@ export const chutesModels = { outputPrice: 0, description: "DeepSeek V3 (0324) model.", }, + "Qwen/Qwen3-235B-A22B-Instruct-2507": { + maxTokens: 32768, + contextWindow: 262144, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 0, + outputPrice: 0, + description: "Qwen3 235B A22B Instruct 2507 model with 262K context window.", + }, "Qwen/Qwen3-235B-A22B": { maxTokens: 32768, contextWindow: 40960, @@ -227,13 +236,4 @@ export const chutesModels = { outputPrice: 0, description: "TNGTech DeepSeek R1T Chimera model.", }, - "Qwen/Qwen3-235B-A22B-Instruct-2507": { - maxTokens: 32768, - contextWindow: 262144, - supportsImages: false, - supportsPromptCache: false, - inputPrice: 0, - outputPrice: 0, - description: "Qwen3 235B A22B Instruct 2507 model with 262K context window.", - }, } as const satisfies Record