Skip to content

feat: support Z.ai coding platform (#34)#35

Merged
warren618 merged 2 commits into
HKUDS:mainfrom
jiakeboge:feature/support-zai-platform
Apr 15, 2026
Merged

feat: support Z.ai coding platform (#34)#35
warren618 merged 2 commits into
HKUDS:mainfrom
jiakeboge:feature/support-zai-platform

Conversation

@jiakeboge

@jiakeboge jiakeboge commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds native support for the Z.ai (formerly Zhipu AI) coding platform as an LLM provider.
  • Integrates Z.ai into the vibe-trading init interactive setup for seamless onboarding.
  • Updates environment templates and multi-language documentation to include Z.ai.

Why

Closes #34. Currently, users cannot easily configure the Z.ai coding platform, and using it via generic OpenAI settings often leads to base URL resolution errors.

Changes

  • Core LLM Mapping: Updated agent/src/providers/llm.py to recognize ZAI_API_KEY and ZAI_BASE_URL.
  • Interactive CLI: Added Z.ai to the provider list in agent/cli.py, configured with the optimized glm-5.1 model and its dedicated coding endpoint.
  • Environment Template: Included Z.ai configuration examples in agent/.env.example.
  • Documentation: Synchronized README.md and all its translations (zh, ja, ko, ar) to reflect the new provider support and count.

Test Plan

  • Existing tests pass (pytest --ignore=agent/tests/e2e_backtest --tb=short -q)
  • New tests added (if applicable)
  • Tested manually: Verified that build_llm correctly maps Z.ai environment variables to OpenAI-compatible variables using a custom test script.

Checklist

  • No changes to protected areas without prior discussion
  • No hardcoded values (API keys, file paths, magic numbers)
  • Code follows [CONTRIBUTING.md] (../CONTRIBUTING.md) guidelines
  • Documentation updated (if user-facing change)

@warren618 warren618 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the contribution! A few things to address before merging:

  1. Missing tests: PR #33 added unit tests for the MiniMax provider mapping — please add a similar test_zai_provider test in agent/tests/test_llm.py to cover the ZAI_API_KEY / ZAI_BASE_URL mapping.

  2. README_ja.md trailing character: The last line adds a stray > — please remove it.

  3. Don't modify News sections: News entries are maintained by the maintainer as a daily summary of all commits. Please revert the News changes in all READMEs.

  4. Rebase needed: Once #33 is merged, please rebase onto the latest main since both PRs touch .env.example and llm.py.

@jiakeboge

jiakeboge commented Apr 14, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the contribution! A few things to address before merging:

  1. Missing tests: PR fix: update MiniMax provider config and fix temperature=0 API error #33 added unit tests for the MiniMax provider mapping — please add a similar test_zai_provider test in agent/tests/test_llm.py to cover the ZAI_API_KEY / ZAI_BASE_URL mapping.
  2. README_ja.md trailing character: The last line adds a stray > — please remove it.
  3. Don't modify News sections: News entries are maintained by the maintainer as a daily summary of all commits. Please revert the News changes in all READMEs.
  4. Rebase needed: Once fix: update MiniMax provider config and fix temperature=0 API error #33 is merged, please rebase onto the latest main since both PRs touch .env.example and llm.py.

Fixed. Thank you for your reply!

@warren618 warren618 merged commit eb969e7 into HKUDS:main Apr 15, 2026
@warren618

Copy link
Copy Markdown
Collaborator

LGTM, merged! Thanks @jiakeboge for the quick turnaround on all the feedback — clean work 👍

@twlun1986 Z.ai is now supported on main. Grab the latest and run vibe-trading init to set it up.

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

Labels

None yet

2 participants