mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-12 23:01:21 +00:00
feat: add zai-org/GLM-4.5-Air model to Chutes AI provider (#6377)
Co-authored-by: Roo Code <roomote@roocode.com>
This commit is contained in:
parent
2c2a7842c4
commit
039154e938
2 changed files with 34 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ export type ChutesModelId =
|
|||
| "Qwen/Qwen3-8B"
|
||||
| "microsoft/MAI-DS-R1-FP8"
|
||||
| "tngtech/DeepSeek-R1T-Chimera"
|
||||
| "zai-org/GLM-4.5-Air"
|
||||
|
||||
export const chutesDefaultModelId: ChutesModelId = "deepseek-ai/DeepSeek-R1-0528"
|
||||
|
||||
|
|
@ -236,4 +237,14 @@ export const chutesModels = {
|
|||
outputPrice: 0,
|
||||
description: "TNGTech DeepSeek R1T Chimera model.",
|
||||
},
|
||||
"zai-org/GLM-4.5-Air": {
|
||||
maxTokens: 32768,
|
||||
contextWindow: 151329,
|
||||
supportsImages: false,
|
||||
supportsPromptCache: false,
|
||||
inputPrice: 0,
|
||||
outputPrice: 0,
|
||||
description:
|
||||
"GLM-4.5-Air model with 151,329 token context window and 106B total parameters with 12B activated.",
|
||||
},
|
||||
} as const satisfies Record<string, ModelInfo>
|
||||
|
|
|
|||
|
|
@ -185,6 +185,29 @@ describe("ChutesHandler", () => {
|
|||
)
|
||||
})
|
||||
|
||||
it("should return zai-org/GLM-4.5-Air model with correct configuration", () => {
|
||||
const testModelId: ChutesModelId = "zai-org/GLM-4.5-Air"
|
||||
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: 151329,
|
||||
supportsImages: false,
|
||||
supportsPromptCache: false,
|
||||
inputPrice: 0,
|
||||
outputPrice: 0,
|
||||
description:
|
||||
"GLM-4.5-Air model with 151,329 token context window and 106B total parameters with 12B activated.",
|
||||
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 } }] })
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue