Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Oct 1, 2025

Summary

This PR attempts to address Issue #8425 by adding support for two new models to the Chutes AI provider:

  • zai-org/GLM-4.6-FP8 - 200K context window model with state-of-the-art performance
  • meituan-longcat/LongCat-Flash-Thinking-FP8 - 128K context window model optimized for complex reasoning and coding tasks

Changes Made

Model Definitions

  • Added both model IDs to the ChutesModelId type union
  • Added complete model configurations with proper context windows and descriptions

Test Coverage

  • Added comprehensive unit tests for both new models
  • Tests verify all model properties including context windows and temperature settings
  • All existing tests continue to pass

Testing

  • ✅ All unit tests pass (npx vitest run api/providers/__tests__/chutes.spec.ts)
  • ✅ Type checking passes (pnpm check-types)
  • ✅ Linting passes (pnpm lint)

Related Issue

Fixes #8425

Feedback and guidance are welcome!


Important

Add zai-org/GLM-4.6-FP8 and meituan-longcat/LongCat-Flash-Thinking-FP8 models to Chutes AI provider with configurations and tests.

  • Model Additions:
    • Add zai-org/GLM-4.6-FP8 and meituan-longcat/LongCat-Flash-Thinking-FP8 to ChutesModelId in chutes.ts.
    • Define configurations for both models in chutesModels with context windows and descriptions.
  • Testing:
    • Add unit tests in chutes.spec.ts for zai-org/GLM-4.6-FP8 and meituan-longcat/LongCat-Flash-Thinking-FP8.
    • Tests verify model properties like context windows and temperature settings.
  • Misc:
    • Ensure all existing tests pass and maintain compatibility with new models.

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

@roomote roomote bot requested review from cte, jr and mrubens as code owners October 1, 2025 02:12
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 1, 2025
Copy link
Contributor 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.

Self-review engaged: grading my own code like a mirror that files bug reports.

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. Enhancement New feature or request labels Oct 1, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 27, 2025
@daniel-lxs daniel-lxs force-pushed the feat/add-glm-4.6-longcat-models branch from 42ae920 to f55e0b3 Compare October 27, 2025 17:32
@roomote
Copy link
Contributor Author

roomote bot commented Oct 27, 2025

Code Review Summary

I've reviewed the changes and identified issues that need to be addressed:

Issues Found

  • Test failure: GLM-4.6-FP8 test expects contextWindow: 200000 but actual model definition has 202752
  • Test failure: GLM-4.6-FP8 test expects a short description but actual model has a detailed multi-line description

View Job

@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Oct 27, 2025
expect(model.info).toEqual(
expect.objectContaining({
maxTokens: 32768,
contextWindow: 200000,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test will fail: contextWindow value doesn't match the actual model definition. The test expects 200000 but the model configuration in packages/types/src/providers/chutes.ts defines it as 202752. Update this to match the actual value.

@daniel-lxs daniel-lxs changed the title feat: add GLM-4.6-FP8 and LongCat-Flash-Thinking-FP8 models to Chutes AI provider feat: add LongCat-Flash-Thinking-FP8 models to Chutes AI provider Oct 27, 2025
- Updated GLM-4.6-FP8 test to match resolved merge configuration (contextWindow: 202752, detailed description)
- Added missing test for GLM-4.6-turbo model with correct configuration
- All 25 tests now pass
@hannesrudolph hannesrudolph added PR - Needs Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Oct 27, 2025
Copy link
Contributor 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.

No issues found.

@mrubens mrubens merged commit e76ac42 into main Oct 27, 2025
12 checks passed
@mrubens mrubens deleted the feat/add-glm-4.6-longcat-models branch October 27, 2025 17:48
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Oct 27, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request lgtm This PR has been approved by a maintainer PR - Needs Review size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add GLM 4.6 and LongCat Flash Thinking for Chutes AI provider

5 participants