Skip to content

feat: Add Zai provider with GLM model support#1194

Draft
Gibbz wants to merge 2 commits into
0xPlaygrounds:mainfrom
Gibbz:feature/zai-provider
Draft

feat: Add Zai provider with GLM model support#1194
Gibbz wants to merge 2 commits into
0xPlaygrounds:mainfrom
Gibbz:feature/zai-provider

Conversation

@Gibbz

@Gibbz Gibbz commented Dec 26, 2025

Copy link
Copy Markdown
  • Implement Zai provider compatible with Anthropic API
  • Add support for GLM models (GLM-4.7, GLM-4.6, GLM-4.5 series)
  • Include streaming support and tool integration
  • Add three examples: basic agent, streaming, and tools
  • API endpoint: https://api.z.ai/api/anthropic
  • Environment variable: ZAI_API_KEY

Models added:

  • GLM_4_7: Latest flagship with SOTA coding, reasoning, and agentic capabilities
  • GLM_4_6: High performance, strong coding, 200K context
  • GLM_4_5, GLM_4_5_X, GLM_4_5_AIR, GLM_4_5_AIRX, GLM_4_5_FLASH: Various performance/speed options

- Implement Zai provider compatible with Anthropic API
- Add support for GLM models (GLM-4.7, GLM-4.6, GLM-4.5 series)
- Include streaming support and tool integration
- Add three examples: basic agent, streaming, and tools
- API endpoint: https://api.z.ai/api/anthropic
- Environment variable: ZAI_API_KEY

Models added:
- GLM_4_7: Latest flagship with SOTA coding, reasoning, and agentic capabilities
- GLM_4_6: High performance, strong coding, 200K context
- GLM_4_5, GLM_4_5_X, GLM_4_5_AIR, GLM_4_5_AIRX, GLM_4_5_FLASH: Various performance/speed options
@Gibbz
Gibbz marked this pull request as ready for review December 27, 2025 10:48
@Gibbz

Gibbz commented Dec 27, 2025

Copy link
Copy Markdown
Author

i'm using this in my own project and its working fine :)

@joshua-mo-143

joshua-mo-143 commented Dec 27, 2025

Copy link
Copy Markdown
Contributor

Hi @Gibbz, thanks for opening a PR!

Please remove the markdown files that Claude (or whatever coding AI assistant you've used) has created.

@Gibbz

Gibbz commented Dec 28, 2025

Copy link
Copy Markdown
Author

Ah sorry one slipped through. Ive removed that file 👍

@Gibbz
Gibbz marked this pull request as draft December 29, 2025 10:41
@Gibbz

Gibbz commented Dec 29, 2025

Copy link
Copy Markdown
Author

ive made it a draft, as ill investigate just using openai as an endpoint. That may be all thats needed!

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