mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #4350] [Feature]: Add Z.AI (GLM-Image) as a native Image Generation service #2359
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#2359
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 @koolara on GitHub (Jul 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4350
Originally assigned to: @SpicyMarinara on GitHub.
What problem does this solve?
The Image Generation provider currently ships 15 services, and Z.AI is not one of them (docs/media/image-providers.md). That leaves three imperfect paths for anyone holding a Z.AI API key:
This is a little odd given that the Engine already speaks to Z.AI natively on the text side — the changelog has entries about fixing native Z.AI GLM connections and their thinking parameters.
Describe the solution you'd like
Add a Z.AI tile to the Service grid in the Image Generation connection editor, alongside Venice.ai and the other cloud services.
Suggested defaults:
https://api.z.ai/api/paas/v4Authorization: Bearer <key>POST /images/generations{ "model": "glm-image", "prompt": "...", "size": "1024x1024" }glm-imageand the CogView line (cogview-4, etc.), either as a short static list or via Fetch Models from APIsizestring — much like the model-aware sizing already added for Venice.ai in #3682data[0].url, not base64, so the file has to be downloaded and stored locally before the link expiresAPI reference: https://docs.z.ai/api-reference/image/generate-image
Reference images could be a later phase — GLM-Image does support image-to-image, editing and identity-preserving generation, but a text-to-image-only first pass would already be useful.
Why is this important? (Use Case)
One key, one bill, both halves of the app. Plenty of users already hold a Z.AI key for GLM chat models, and right now that key is useless for avatars, sprites, scene backgrounds and storyboards even though the same account can generate them.
GLM-Image is also a genuinely different tool from what's on the list today: its stated strength is text rendering inside the image and bilingual Chinese/English prompts. That matters for Game Mode storyboards, signage, book covers, UI-ish props — the places where FLUX and SD tend to produce scribbles.
Additional context
Venice.ai landed in v2.3.2 (#3682) with authenticated model discovery, native endpoint support and model-aware sizing. Z.AI would follow essentially the same shape, so there is a recent template to copy.
One gotcha worth encoding in the default: Z.AI has two endpoint families. General API keys use
https://api.z.ai/api/paas/v4; GLM Coding Plan keys usehttps://api.z.ai/api/coding/paas/v4and are not interchangeable. If image generation is only served on the general endpoint, a clear error for coding-plan keys would save a lot of confused bug reports.Happy to test a build against a live Z.AI key if that helps.
I DID NOT read this template and provide the requested details.
@SpicyMarinara commented on GitHub (Jul 31, 2026):
SpicyMarinara is taking this in
agent/issue-sweep-4350-4361. Work is tracked in draft PR #4362.