-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: add GLM-4.6-turbo model to Chutes provider #8516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
1f3ad22
ab87040
eb45e7c
97de0c0
52fc407
9dea255
002796b
557ab70
dbb527c
70ee1a5
2e1c5c6
1c80935
3d9add9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -492,4 +492,34 @@ describe("ChutesHandler", () => { | |
| const model = handlerWithModel.getModel() | ||
| expect(model.info.temperature).toBe(0.5) | ||
| }) | ||
|
|
||
| it("should include zai-org/GLM-4.6-turbo in chutesModels", () => { | ||
| // This test ensures the GLM-4.6-turbo model exists to prevent regressions | ||
| const modelId = "zai-org/GLM-4.6-turbo" | ||
| // Compile-time assertion that GLM-4.6-turbo is part of ChutesModelId (no unused var) | ||
| const expectType = <T>(_value: T) => {} | ||
| expectType<ChutesModelId>(modelId) | ||
| expect(chutesModels).toHaveProperty(modelId) | ||
|
|
||
| // Handler-level assertion that GLM-4.6-turbo uses the default non-DeepSeek temperature (0.5) | ||
| const handlerWithModel = new ChutesHandler({ | ||
| apiModelId: "zai-org/GLM-4.6-turbo", | ||
| chutesApiKey: "test-chutes-api-key", | ||
| }) | ||
| const selected = handlerWithModel.getModel() | ||
| expect(selected.info.temperature).toBe(0.5) | ||
raulcorreia7 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| expect(selected.info).toEqual(expect.objectContaining(chutesModels[modelId])) | ||
| }) | ||
|
|
||
| it("should have correct pricing and context for zai-org/GLM-4.6-turbo", () => { | ||
| // This test ensures the GLM-4.6-turbo model has correct pricing > 0 and context window | ||
| // Assert exact values and capabilities to catch regressions | ||
raulcorreia7 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| const model = chutesModels["zai-org/GLM-4.6-turbo"] | ||
| expect(model.maxTokens).toBe(32768) | ||
raulcorreia7 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| expect(model.contextWindow).toBe(202752) | ||
| expect(model.supportsImages).toBe(false) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P3] Test coverage: Add a createMessage param-passthrough test specifically for "zai-org/GLM-4.6-turbo". The suite already verifies DeepSeek R1 and a generic non‑DeepSeek model; asserting this model’s call (model id, max_tokens 32768, temperature 0.5, stream true, stream_options { include_usage: true }) would catch mapping regressions that the generic case might miss. |
||
| expect(model.supportsPromptCache).toBe(false) | ||
| expect(model.inputPrice).toBe(1.15) | ||
| expect(model.outputPrice).toBe(3.25) | ||
| }) | ||
| }) | ||
Uh oh!
There was an error while loading. Please reload this page.