Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jan 21, 2026

Summary

Adjusts Z.ai API temperature settings as requested in COM-538.

Changes

  • Updated ZAI_DEFAULT_TEMPERATURE from 0.6 to 1
  • Added top_p parameter set to 0.95 for all Z.ai API calls
  • Updated both thinking models (GLM-4.7) and non-thinking models to use the new parameters
  • Updated test expectations to include the top_p parameter

Testing

  • ✅ All Z.ai provider tests pass (33/33)
  • ✅ Lint checks pass
  • ✅ Type checks pass

View task on Roo Code Cloud


Important

Adjusts Z.ai API by setting default temperature to 1 and adding top_p=0.95, updating ZAiHandler and tests accordingly.

  • Behavior:
    • Updated ZAI_DEFAULT_TEMPERATURE from 0.6 to 1 in zai.ts.
    • Added top_p parameter set to 0.95 in createStreamWithTopP() and createStreamWithThinking() in zai.ts.
    • Updated createStream() in zai.ts to handle top_p for non-thinking models and thinking mode for GLM-4.7.
  • Testing:
    • Updated test expectations in zai.spec.ts to include top_p parameter.
    • All tests pass (33/33).
  • Misc:
    • No changes to the API's external behavior, only internal parameter adjustments.

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

- Update ZAI_DEFAULT_TEMPERATURE from 0.6 to 1
- Add top_p parameter set to 0.95 for all Z.ai API calls
- Update both thinking and non-thinking model implementations
- Update test expectations to include top_p parameter

Fixes COM-538
@roomote
Copy link
Contributor Author

roomote bot commented Jan 21, 2026

Rooviewer Clock   See task on Roo Cloud

✅ Review Summary

This PR correctly implements the Z.ai temperature and top_p adjustments as requested in COM-538.

Changes Verified

  1. Temperature Update: ZAI_DEFAULT_TEMPERATURE updated from 0.6 to 1 in packages/types/src/providers/zai.ts:226

  2. top_p Parameter Addition: Added top_p: 0.95 to both:

  3. Test Updates: Test expectations updated to include the top_p parameter at zai.spec.ts:398

Verification

  • ✅ All 33 Z.ai provider tests pass
  • ✅ Lint checks pass with zero warnings
  • ✅ Code follows existing patterns and is well-documented

LGTM - Ready to merge! 🎉

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

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.

✅ Review Complete

All changes verified and tests pass. This PR is ready to merge.

Summary:

  • Temperature updated from 0.6 → 1
  • Added top_p: 0.95 to all Z.ai API calls
  • All 33 tests pass
  • Lint checks pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants