Skip to content

Conversation

@kiloconnect
Copy link
Contributor

@kiloconnect kiloconnect bot commented Dec 22, 2025

Related GitHub Issue

Cherry-picked from: RooCodeInc/Roo-Code#10271

Description

This PR cherry-picks the changes from PR #10271 to add basic support for the GLM-4.7 model to the Z.ai provider.

Changes made:

  • Added GLM-4.7 documentation link to the file header comments
  • Added glm-4.7 entry to internationalZAiModels with the following configuration:
    • maxTokens: 98,304
    • contextWindow: 200,000 (matching GLM-4.6)
    • supportsImages: false
    • supportsPromptCache: true
    • supportsNativeTools: true
    • defaultToolProtocol: "native"
    • Pricing aligned with GLM-4.6
  • Added glm-4.7 entry to mainlandZAiModels with similar configuration but using mainland China pricing

This follows the existing pattern used for GLM-4.5 and GLM-4.6 models already in the codebase.

Test Procedure

  • Configuration change only - follows existing model patterns
  • TypeScript types are consistent with existing models

Screenshots / Videos

N/A - This is a data/configuration change only.

Documentation Updates

  • No documentation updates are required.

Additional Notes

This PR adds basic support for GLM-4.7 as requested in the original issue. The issue mentions that GLM-4.7 may have "thinking capabilities" - if extended thinking/reasoning support is needed in the future, that can be added in a follow-up PR.

- Added GLM-4.7 documentation link to the file header comments
- Added glm-4.7 entry to internationalZAiModels with:
  - maxTokens: 98,304
  - contextWindow: 200,000 (matching GLM-4.6)
  - supportsImages: false
  - supportsPromptCache: true
  - supportsNativeTools: true
  - defaultToolProtocol: native
  - Pricing aligned with GLM-4.6
- Added glm-4.7 entry to mainlandZAiModels with similar configuration but using mainland China pricing

Cherry-picked from PR #10271
@changeset-bot
Copy link

changeset-bot bot commented Dec 22, 2025

⚠️ No Changeset found

Latest commit: 25090e3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kiloconnect
Copy link
Contributor Author

kiloconnect bot commented Dec 22, 2025

✅ No Issues Found

1 file reviewed | Confidence: 95% | Recommendation: Merge

Review Details

Files: packages/types/src/providers/zai.ts

Checked: Security, bugs, type safety, code patterns

Summary: This PR adds GLM-4.7 model configuration to the Z.ai provider. The changes:

  • Follow established patterns for model definitions (matching GLM-4.5, GLM-4.6 structure)
  • Include all required ModelInfo fields with correct types
  • Add appropriate documentation link in header comments
  • Use consistent pricing structure (international vs mainland)
  • Correctly implement defaultToolProtocol: "native" per the schema

No security, bug, or type safety concerns identified.

@chrarnoldus chrarnoldus deleted the feature/add-glm-4.7-zai-provider branch December 22, 2025 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants