Repository navigation
chore: add glm-5.4 to zai provider - #794
Open
LarsArtmann wants to merge 1 commit into
Open
LarsArtmann wants to merge 1 commit into
LarsArtmann wants to merge 1 commit into
Conversation
Z.ai serves GLM-5.4 on the GLM Coding Plan endpoint that the zai provider points at, but the catalog had no entry, so clients such as Crush do not list the model. 💘 Generated with Crush Assisted-by: Crush:glm-5.4
Author
|
I think this looks solid. |
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.
chore: add glm-5.4 to zai provider
Why
zaipoints at the GLM Coding Plan endpoint (https://api.z.ai/api/coding/paas/v4), and GLM-5.4 is live there for every plan: "All plans support GLM-5.4, GLM-5.3 and GLM-5.3-Flash" (Coding Plan overview). The catalog has noglm-5.4entry, so Crush doesn't list it.I've been working around that with a
model addline, which can't declare effort levels. On the wire that sends noreasoning_effortat all (Z.ai then runsmax), and without--thinkon the slot it sendsthinking: disabled.What changed
Adds
glm-5.4tointernal/providers/configs/zai.json, aboveglm-5.3-flash. Defaults are unchanged.1000000,default_max_tokens131072(128K) — GLM-5.4 guide; the switch guide also says "Set Context Window Size to 1000000". OpenRouter and models.dev don't list GLM-5.4 yet, so there is no second source for the numbers.alwayswithlow/high/max, defaultmax— that is Z.ai's own default ("The default level ismax").thinking.type: disabledis turned intolow("Continues the request; still performs lightweight thinking"), so there is no off switch — same shape asMiniMax-M3.1-Flashin chore: add minimax m3.1 flash #786.true. Input modality is Video / Image / Text / File.0/0until Z.ai publishes Model API pricing. GLM-5.4 is Coding-Plan-only for now and not on the pricing page.zhipu-coding.jsonandzhipu.jsonare untouched, I only checked docs.z.ai.Test plan
go run ./cmd/format→done: 0/43 files reformattedgo test ./...,go vet ./...,golangci-lint run ./...→0 issuesgo run .on this branch:GET /v3/providerslistsglm-5.4first underzaiwith the fields above;/v2/providersderivescan_reason: true,reasoning_levels: ["low", "high", "max"],default_reasoning_effort: "max",supports_attachments: trueCrush
v0.102.0on that server, wire-captured against a mock endpoint in an isolated config: with no slot flag the request is{"model":"glm-5.4","thinking":{"type":"enabled"},"reasoning_effort":"max","max_tokens":131072}, the same shape asglm-5.3andglm-5.3-flash;--reasoning-effort lowandhighputlowandhighon the wireSame setup against the live Coding Plan endpoint:
--reasoning-effort low,highandmaxeach return a completionI have read
CONTRIBUTING.md.I have created a discussion that was approved by a maintainer (for new features).
💘 Generated with Crush