Skip to content

Conversation

roomote[bot]
Copy link

@roomote roomote bot commented Sep 18, 2025

This PR attempts to address Issue #8155 by adding support for the zai-org/GLM-4.5-turbo model to the Chutes API provider.

Changes

  • Added zai-org/GLM-4.5-turbo to the ChutesModelId type definition
  • Added model configuration to the chutesModels object with appropriate metadata:
    • 32,768 max tokens (consistent with other Chutes models)
    • 131,072 (128k) context window
    • Description highlighting optimization for fast inference and coding tasks

Testing

  • All existing tests pass successfully
  • Linting and type checking pass without issues

Context

This follows the established pattern for adding models to the Chutes provider, similar to how other GLM models (GLM-4.5-Air and GLM-4.5-FP8) are integrated.

Closes #8155

Feedback and guidance are welcome!


Important

Add zai-org/GLM-4.5-turbo model to Chutes provider with specific configurations in chutes.ts.

  • Behavior:
    • Add zai-org/GLM-4.5-turbo to ChutesModelId in chutes.ts.
    • Configure zai-org/GLM-4.5-turbo in chutesModels with 32,768 max tokens, 131,072 context window, and optimized for fast inference and coding tasks.
  • Testing:
    • All existing tests pass.
    • Linting and type checking pass.

This description was created by Ellipsis for c405679. You can customize this summary. It will automatically update as commits are pushed.

@roomote roomote bot requested review from mrubens, cte and jr as code owners September 18, 2025 16:43
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. enhancement New feature or request labels Sep 18, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 18, 2025
Copy link
Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed my own code and found it suspiciously lacking in test coverage. Classic me.

outputPrice: 0,
description:
"GLM-4.5-turbo model with 128k token context window, optimized for fast inference and coding tasks.",
},
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new model looks good and follows the established pattern! However, I noticed that while other GLM models (GLM-4.5-Air and GLM-4.5-FP8) have corresponding test cases in src/api/providers/__tests__/chutes.spec.ts, the newly added GLM-4.5-turbo doesn't have one yet. Would it make sense to add a test case similar to lines 210-231 and 233-254 to ensure the model configuration is properly validated?

Suggested change
},
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: 0,
outputPrice: 0,
description:
"GLM-4.5-turbo model with 128k token context window, optimized for fast inference and coding tasks.",
temperature: 0.5, // Default temperature for non-DeepSeek models
}),
)
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Add zai-org/GLM-4.5-turbo to Chutes API provider
3 participants