Skip to content

Commit 557ab70

Browse files
fix: enhance GLM-4.6-turbo test with type helper and handler-level temperature assertion
Co-authored-by: Qwen-Coder <[email protected]>
1 parent 002796b commit 557ab70

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,19 @@ describe("ChutesHandler", () => {
495495

496496
it("should include zai-org/GLM-4.6-turbo in chutesModels", () => {
497497
// This test ensures the GLM-4.6-turbo model exists to prevent regressions
498-
// Compile-time assertion that GLM-4.6-turbo is part of ChutesModelId
499-
const _: ChutesModelId = "zai-org/GLM-4.6-turbo"
500-
expect(chutesModels).toHaveProperty("zai-org/GLM-4.6-turbo")
498+
const modelId: ChutesModelId = "zai-org/GLM-4.6-turbo"
499+
// Compile-time assertion that GLM-4.6-turbo is part of ChutesModelId (no unused var)
500+
const expectType = <T>(_value: T) => {}
501+
expectType<ChutesModelId>(modelId)
502+
expect(chutesModels).toHaveProperty(modelId)
503+
504+
// Handler-level assertion that GLM-4.6-turbo uses the default non-DeepSeek temperature (0.5)
505+
const handlerWithModel = new ChutesHandler({
506+
apiModelId: "zai-org/GLM-4.6-turbo",
507+
chutesApiKey: "test-chutes-api-key",
508+
})
509+
const selected = handlerWithModel.getModel()
510+
expect(selected.info.temperature).toBe(0.5)
501511
})
502512

503513
it("should have correct pricing and context for zai-org/GLM-4.6-turbo", () => {

0 commit comments

Comments
 (0)