Repository navigation
Add BigModel GLM-Image generation for canvas and Agent - #251
Open
unicorn1125 wants to merge 2 commits into
Open
unicorn1125 wants to merge 2 commits into
unicorn1125 wants to merge 2 commits into
Conversation
unicorn1125
requested review from
hsliuustc0106 and
princepride
as code owners
November 10, 2026 01:03
unicorn1125
force-pushed
the
codex/glm-image-237-implementation
branch
from
November 10, 2026 01:13
e45823b to
5d9b9d2
Compare
FayeSpica
requested changes
Nov 10, 2026
FayeSpica
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for adding GLM-Image support, and please check whether it respects the “Remove watermark” setting.
|
|
||
| export const PROVIDER_PRESETS: ProviderPreset[] = [ | ||
| { | ||
| id: "bigmodel", |
Collaborator
There was a problem hiding this comment.
Please keep OpenAI compatible first in the image provider dropdown.
| if spec.kind == 'image' and input_rules(config)['profile'] == 'moss-image': | ||
| params.update(prompt_enhance=False, watermark=not self.settings.get()['removeWatermark']) | ||
| if spec.kind == 'image' and input_rules(config)['profile'] == 'bigmodel-glm-image': | ||
| params = dict(size=params['size'], watermark_enabled=not self.settings.get()['removeWatermark']) |
Collaborator
There was a problem hiding this comment.
The generated GLM-Image output did not follow the Remove watermark setting in local testing. Please verify the output with the setting on and off.
8 tasks
Collaborator
|
please fix conflicts |
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 GLM-Image text-to-image generation through a BigModel connection, available from both the canvas and Agent commands. Includes the provider preset, supported sizes, and Chinese and English setup guides.
The adapter uses BigModel's synchronous image endpoint, validates downloaded image bytes, and saves results as project assets and candidates. Credentials stay off CDN requests. Download recovery reuses the saved result URL, and uncertain submissions are never automatically reposted.
Linked issue
Labels
type:feat,area:provider,area:canvas,area:agent, andmodality:image.Test plan
After rebasing onto current main (
e0b411f):.venv/bin/python -m pytest tests -q: 1,384 passed, 6 skipped, including all 38 GLM-Image cases with mocked HTTP and real image bytes.node --test tests/*.test.ts: 699 passed.The detailed record is in
docs/development/glm-image-validation.md.Evidence that it works
Canvas result adopted into the project:
Canvas output:
Reopened Agent project, showing the model and prompt:
Agent output:
Provider verification
Tested with a real BigModel account: a 1280×1280 canvas image and a 960×1728 image through AgentTools. Both were adopted and verified after reopening their projects. The Agent check covers business tools, not conversational model orchestration. The original acceptance submitted three requests: two succeeded and one timed out with unknown acceptance. Two further requests verified the watermark setting off and on, bringing the total to five. Billing for the timed-out request was not verified.
Bilingual UI
zh-CNanden-USare included for the preset, errors, and setup documentation.Review follow-up
OpenAI compatible is first in the image provider dropdown again, with a regression check for its position. A Chinese/English note appears above Generate when BigModel is selected and Remove watermark is on, explaining the signed-waiver requirement and its location in the BigModel account settings.
Tested the same prompt at 1280×1280 with Remove watermark off and on. The actual request sent
watermark_enabled=trueandfalserespectively, matching the saved execution settings. Both returned images still contained a visible mark. This reproduces the reported behavior despite the correct request mapping. BigModel documents that disabling watermarks requires a signed waiver; the account's waiver status and removal for a signed account remain unverified. Provider output is preserved.Follow-up validation: 80 selected Python tests and 700 frontend tests passed, along with the production build, i18n and generated-contract checks. Browser checks covered both languages, the note appearing/disappearing when the setting changes, and provider order.