Skip to content

Conversation

@kiloconnect
Copy link
Contributor

@kiloconnect kiloconnect bot commented Dec 22, 2025

This PR cherry-picks the changes from RooCodeInc/Roo-Code#10271

Changes

  • Adds GLM-4.7 model support to Z.ai provider (both international and mainland China configurations)
  • Adds defaultToolProtocol: "native" to all Z.ai models for improved tool calling
  • Includes changeset documentation

Original Author

Original commit by: Roo Code roomote@roocode.com

Testing

  • Verified that the model configurations are properly added
  • Ensured original author attribution is preserved in git history

@changeset-bot
Copy link

changeset-bot bot commented Dec 22, 2025

🦋 Changeset detected

Latest commit: 8121f0a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

Not sure what this means? Click here to learn what changesets are.

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

…t without mentioning the defaultToolProtocol configuration.
@kiloconnect
Copy link
Contributor Author

kiloconnect bot commented Dec 22, 2025

✅ No Issues Found

2 files reviewed | Confidence: 95% | Recommendation: Merge

Review Details

Files:

  • .changeset/add-glm-4-7-model.md - Changeset for patch version bump
  • packages/types/src/providers/zai.ts - Model configuration additions

Changes Verified:

  • ✅ GLM-4.7 model added to both international and mainland configurations
  • defaultToolProtocol: "native" added to all models with supportsNativeTools: true
  • ✅ Model structure follows existing patterns (contextWindow, pricing, etc.)
  • ✅ Type compatibility verified against ModelInfo schema

Checked: Security, bugs, type safety, consistency with existing patterns

@kiloconnect
Copy link
Contributor Author

kiloconnect bot commented Dec 22, 2025

✅ No Issues Found

2 files reviewed | Confidence: 95% | Recommendation: Merge

Review Details

Files:

  • .changeset/add-glm-4-7-model.md - Standard changeset documentation
  • packages/types/src/providers/zai.ts - Model configuration additions

Changes Verified:

  • ✅ New GLM-4.7 model added for both international and mainland China APIs
  • defaultToolProtocol: "native" added consistently to all Z.ai models with supportsNativeTools: true
  • ✅ Model configuration follows established patterns (pricing, context windows, capabilities)
  • ✅ Type safety maintained - values conform to ModelInfo schema

Checked: Security, type safety, pattern consistency, breaking changes

@Bigpet
Copy link

Bigpet commented Dec 22, 2025

Should it be added here too?

// kilocode_change start
function shouldDisableReasoning(modelId: string, reasoningEffort: ReasoningEffortExtended | undefined) {
const supportsReasoningToggle =
modelId.startsWith("deepseek/deepseek-v3.1") ||
modelId.startsWith("deepseek/deepseek-chat-v3.1") ||
modelId.startsWith("x-ai/grok-4-fast") ||
modelId.startsWith("z-ai/glm-4.6")
return supportsReasoningToggle && reasoningEffort === "minimal"

@mcowger
Copy link
Contributor

mcowger commented Dec 23, 2025

Should it be added here too?

// kilocode_change start
function shouldDisableReasoning(modelId: string, reasoningEffort: ReasoningEffortExtended | undefined) {
const supportsReasoningToggle =
modelId.startsWith("deepseek/deepseek-v3.1") ||
modelId.startsWith("deepseek/deepseek-chat-v3.1") ||
modelId.startsWith("x-ai/grok-4-fast") ||
modelId.startsWith("z-ai/glm-4.6")
return supportsReasoningToggle && reasoningEffort === "minimal"

Don't think so - reasoning seems to be fine on 4.7

@chrarnoldus chrarnoldus linked an issue Dec 23, 2025 that may be closed by this pull request
@chrarnoldus chrarnoldus merged commit 7fd0925 into main Dec 23, 2025
12 checks passed
@chrarnoldus chrarnoldus deleted the cherry-pick-pr-10271 branch December 23, 2025 08:34
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.

can not choose glm 4.7 in z.ai provider

7 participants