feat(zai): add z.ai (GLM-4.6) as a new LLM provider#1039
Open
Vasilev Dmitrii (gHashTag) wants to merge 2 commits into
Open
feat(zai): add z.ai (GLM-4.6) as a new LLM provider#1039Vasilev Dmitrii (gHashTag) wants to merge 2 commits into
Vasilev Dmitrii (gHashTag) wants to merge 2 commits into
Conversation
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
Contributor
|
PR author is not in the allowed authors list. |
Contributor
|
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: You only need to sign once. After signing, this check will pass automatically. Troubleshooting
❌ 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ProviderType'zai'(types.ts)LLM_PROVIDERS.ZAIadded to the shared Zod schema (packages/shared/src/schemas/llm.ts)ZAI_APIconstant (https://api.z.ai/api/coding/paas/v4) inpackages/shared/src/constants/urls.tscreateZaiModelfactory inapps/server/src/lib/clients/llm/provider.tsusingcreateOpenAICompatibleglm-4.6(200k context), plusglm-4.5andglm-4.5-airinmodels-dev-data.jsonZAIicon from@lobehub/iconswired up inproviderIcons.tsxDEFAULT_BASE_URLSandproviderTypeOptionsextendedNotes
Diff stats
7 files changed, +69 / 0