Skip to content

feat(zai): add z.ai (GLM-4.6) as a new LLM provider#1039

Open
Vasilev Dmitrii (gHashTag) wants to merge 2 commits into
browseros-ai:mainfrom
gHashTag:zai-provider-clean
Open

feat(zai): add z.ai (GLM-4.6) as a new LLM provider#1039
Vasilev Dmitrii (gHashTag) wants to merge 2 commits into
browseros-ai:mainfrom
gHashTag:zai-provider-clean

Conversation

@gHashTag
Copy link
Copy Markdown

Summary

Adds z.ai (GLM-4.6) as a new first-class LLM provider, alongside the existing Moonshot / OpenAI / Anthropic / etc. providers.

What's included

  • New ProviderType 'zai' (types.ts)
  • LLM_PROVIDERS.ZAI added to the shared Zod schema (packages/shared/src/schemas/llm.ts)
  • ZAI_API constant (https://api.z.ai/api/coding/paas/v4) in packages/shared/src/constants/urls.ts
  • createZaiModel factory in apps/server/src/lib/clients/llm/provider.ts using createOpenAICompatible
  • Provider template with default model glm-4.6 (200k context), plus glm-4.5 and glm-4.5-air in models-dev-data.json
  • ZAI icon from @lobehub/icons wired up in providerIcons.tsx
  • DEFAULT_BASE_URLS and providerTypeOptions extended

Notes

Diff stats

7 files changed, +69 / 0

Adds z.ai with the OpenAI-compatible coding endpoint as a first-class provider:
- New ProviderType 'zai' and matching LLM_PROVIDERS.ZAI entry in the shared Zod schema
- ZAI_API constant (https://api.z.ai/api/coding/paas/v4) in shared/constants/urls
- createZaiModel factory in server/src/lib/clients/llm/provider.ts using createOpenAICompatible
- Provider template with default model glm-4.6 (200k context), plus glm-4.5 and glm-4.5-air in models-dev-data.json
- ZAI icon from @lobehub/icons wired up in providerIcons
- DEFAULT_BASE_URLS and providerTypeOptions extended
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 23, 2026

PR author is not in the allowed authors list.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 23, 2026

Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement.

To sign the CLA, please add a comment to this PR with the following text:

I have read the CLA Document and I hereby sign the CLA

You only need to sign once. After signing, this check will pass automatically.


Troubleshooting
  • Already signed but still failing? Comment recheck to trigger a re-verification.
  • Signed with a different email? Make sure your commit email matches your GitHub account email, or add your commit email to your GitHub account.
- - - I have read the CLA Document and I hereby sign the CLA - - - **0** out of **2** committers have signed the CLA.
Vasilev Dmitrii (@gHashTag)
Dmitrii Calzago (@dmitrii) Vasilev
**Dmitrii Vasilev** seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please [add the email address used for this commit to your account](https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/#commits-are-not-linked-to-any-user).
You can retrigger this bot by commenting **recheck** in this Pull Request. Posted by the **CLA Assistant Lite bot**.

- Add z.ai provider integration across agent, server, and OpenClaw
- Fix provider test to use generateText instead of streamText for clear API errors
- Fix dev-mode agent server URL to use VITE_BROWSEROS_SERVER_PORT directly
- Add CDP fallback for Browser.getTabs when using standard Chromium
- Remove --disable-browseros-extensions from web-ext config to allow agent extension loading
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.

1 participant