mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5963] [Feature]: Add Z.AI (GLM) as a native text provider, with GLM 5.3 and GLM 5.3 Flash in the model list #3303
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3303
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Sep 8, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5963
Originally assigned to: @SpicyMarinara on GitHub.
What problem does this solve?
The connection editor's provider list (
PROVIDERSinpackages/shared/src/constants/providers.ts) has no Z.AI entry for text. Someone holding a Z.AI key today picks Custom (OAI-Compatible), typeshttps://api.z.ai/api/paas/v4by hand, and types the model ID by hand.That is odd for three reasons:
glm-request-compat.tsrecognisesapi.z.ai, knows GLM 5.3 always reasons, and maps reasoning effort onto the three levels Z.AI accepts (low / high / max). The wire is right; only the front door is missing.ZAI_MODELSlist stops atglm-5.2.glm-5.3andglm-5.3-flash— the models the compat layer was written for — are not in it, so even the Custom path offers no picker entry for them.Proposed solution
Add Z.AI as a text provider the way NanoGPT was added in #117, minus the image and video parts:
zaiinAPIProvider, the connection Zod enum, and the DB enum (packages/shared/src/types/connection.ts,packages/shared/src/schemas/connection.schema.ts,packages/server/src/db/schema/connections.ts).PROVIDERS.zai: name Z.AI, default base URLhttps://api.z.ai/api/paas/v4,modelsEndpoint: "/models", Bearer auth. Z.AI servesGET /modelson that base (checked today with a live key: 200, ten GLM models includingglm-5.3andglm-5.3-flash), so Fetch Models from API works as-is.provider-registry.ts: routezaito the OpenAI-compatible provider, whereapplyGlmThinkingParametersalready fires for the native endpoint.MODEL_LISTS.zai = ZAI_MODELS, and addglm-5.3andglm-5.3-flashtoZAI_MODELS(1M context, 128K max output, per Z.AI's model pages).customkeeps its current seed.API_KEY_LINKS.zaiinConnectionEditor.tsx→https://z.ai/manage-apikey/apikey-list.zaiconnection with a GLM 5.3 model: offer only low / high / max, default max (Z.AI's documented default). "none" / disabled is rejected by the API with code 1210 — checked live today.docs/connections/providers-reference.md, an[Unreleased]changelog line, English UI strings as localization keys, and a[docs-i18n]follow-up issue.One default worth encoding, the same gotcha #4350 called out for images: Z.AI's Coding Plan endpoint (
/api/coding/paas/v4) is licensed for their listed tools only under their usage policy, so the provider should default to the pay-as-you-go endpoint and the docs entry should say why.Alternatives considered
glm-5.3/glm-5.3-flashtoZAI_MODELS. Fixes the stale list, not the front door.Additional context
/models, and no image/video defaults.OneWayGondola/Marinara-Engine) with a draft PR againststagingopen from the first commit, per CONTRIBUTING. Happy to trim or reshape scope to whatever the team prefers.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Sep 12, 2026):
Owner: @SpicyMarinara (Codex). The maintainer has requested that this issue be completed in the assigned issue sweep, tracked in draft PR #6072. Existing contributor patches and previously completed translations will be reviewed and reused with attribution; the final PR will document the implementation and verification before this issue is closed.
@SpicyMarinara commented on GitHub (Sep 12, 2026):
Fixed in #6072, merged into
staging.Native Z.AI text connections, GLM 5.3 model metadata, supported reasoning choices, and actionable empty-response diagnostics are in staging. Contributor work from #5965 is preserved and credited; provider request and output-budget regressions passed. Paid live generation remains a manual verification item.