Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Dec 17, 2025

Enables native tool calling by default for all Z.ai models by adding defaultToolProtocol: "native" to each model configuration.

This change addresses the observation that Z.ai models were defaulting to XML tool calling instead of native tool calling, reducing the native tool call rate in telemetry.

Changes

  • Added defaultToolProtocol: "native" to all international Z.ai models (glm-4.5, glm-4.5-air, glm-4.5-x, glm-4.5-airx, glm-4.5-flash, glm-4.5v, glm-4.6, glm-4-32b-0414-128k)
  • Added defaultToolProtocol: "native" to all mainland China Z.ai models (glm-4.5, glm-4.5-air, glm-4.5-x, glm-4.5-airx, glm-4.5-flash, glm-4.5v, glm-4.6)

Testing

  • All existing Z.ai provider tests pass
  • Type checking passes

View task on Roo Code Cloud


Important

Sets defaultToolProtocol: "native" for all Z.ai models in zai.ts, enabling native tool calling by default.

  • Behavior:
    • Sets defaultToolProtocol: "native" for all Z.ai models in zai.ts, affecting both international and mainland China models.
  • Testing:
    • All existing Z.ai provider tests pass.
    • Type checking passes.

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



Note

Cursor Bugbot is generating a summary for commit 08ef290. Configure here.

@roomote
Copy link
Contributor Author

roomote bot commented Dec 17, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

The change correctly adds defaultToolProtocol: "native" to all Z.ai models, which is:

  • Type-safe (valid enum value per ModelInfo)
  • Consistent with existing supportsNativeTools: true on all models
  • Following the same pattern used by other providers

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph marked this pull request as ready for review December 17, 2025 20:20
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. Enhancement New feature or request labels Dec 17, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 17, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Dec 17, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

The change correctly adds defaultToolProtocol: "native" to all Z.ai models, which is:

  • Type-safe (valid enum value per ModelInfo)
  • Consistent with existing supportsNativeTools: true on all models
  • Following the same pattern used by other providers (Anthropic, OpenAI, Gemini, etc.)

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@cte cte closed this Dec 17, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Dec 17, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Dec 17, 2025
@cte cte reopened this Dec 17, 2025
@github-project-automation github-project-automation bot moved this from Done to Triage in Roo Code Roadmap Dec 17, 2025
@github-project-automation github-project-automation bot moved this from Done to New in Roo Code Roadmap Dec 17, 2025
@cte cte merged commit 9e9d779 into main Dec 17, 2025
40 checks passed
@cte cte deleted the feature/zai-native-tool-calling-default branch December 17, 2025 20:26
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Dec 17, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Dec 17, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Dec 17, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

The change correctly adds defaultToolProtocol: "native" to all Z.ai models (both international and mainland China variants), which is:

  • Type-safe (valid enum value per ModelInfo schema)
  • Consistent with existing supportsNativeTools: true on all models
  • Following the established pattern used by other providers (Anthropic, OpenAI, Gemini, Mistral, xAI, etc.)

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

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 size:S This PR changes 10-29 lines, ignoring generated files.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants