From 382ab63ea15d1472ca805ee6c84f22a6699f00e4 Mon Sep 17 00:00:00 2001 From: "roomote[bot]" <219738659+roomote[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 17:33:44 -0400 Subject: [PATCH] feat: add zai-org/GLM-4.5-turbo model to Chutes provider (#8157) Co-authored-by: Roo Code --- 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 15dea58263..d05bd489b1 100644 --- a/packages/types/src/providers/chutes.ts +++ b/packages/types/src/providers/chutes.ts @@ -29,6 +29,7 @@ export type ChutesModelId = | "tngtech/DeepSeek-R1T-Chimera" | "zai-org/GLM-4.5-Air" | "zai-org/GLM-4.5-FP8" + | "zai-org/GLM-4.5-turbo" | "moonshotai/Kimi-K2-Instruct-75k" | "moonshotai/Kimi-K2-Instruct-0905" | "Qwen/Qwen3-235B-A22B-Thinking-2507" @@ -274,6 +275,15 @@ export const chutesModels = { description: "GLM-4.5-FP8 model with 128k token context window, optimized for agent-based applications with MoE architecture.", }, + "zai-org/GLM-4.5-turbo": { + maxTokens: 32768, + contextWindow: 131072, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 1, + outputPrice: 3, + description: "GLM-4.5-turbo model with 128K token context window, optimized for fast inference.", + }, "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8": { maxTokens: 32768, contextWindow: 262144, diff --git a/src/api/providers/__tests__/chutes.spec.ts b/src/api/providers/__tests__/chutes.spec.ts index 398f86ce60..70ee06a923 100644 --- a/src/api/providers/__tests__/chutes.spec.ts +++ b/src/api/providers/__tests__/chutes.spec.ts @@ -253,6 +253,28 @@ describe("ChutesHandler", () => { ) }) + it("should return zai-org/GLM-4.5-turbo model with correct configuration", () => { + const testModelId: ChutesModelId = "zai-org/GLM-4.5-turbo" + 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: 131072, + supportsImages: false, + supportsPromptCache: false, + inputPrice: 1, + outputPrice: 3, + description: "GLM-4.5-turbo model with 128K token context window, optimized for fast inference.", + temperature: 0.5, // Default temperature for non-DeepSeek models + }), + ) + }) + 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({