Repository navigation
[Fix] Render GLM-5.3-Flash assistant media as placeholder markers - #2193
Merged
jayhenry merged 2 commits intoOct 23, 2026
Merged
Conversation
This was referenced Oct 16, 2026
ShilohYu
force-pushed
the
fix/glm53-media-placeholder-render
branch
2 times, most recently
from
October 19, 2026 08:13
667d39e to
80b8fd2
Compare
ShilohYu
changed the base branch from
main
to
fix/glm53-structured-tool-response
October 19, 2026 09:10
ShilohYu
force-pushed
the
fix/glm53-structured-tool-response
branch
from
October 19, 2026 14:42
81b3780 to
d3401f1
Compare
ShilohYu
force-pushed
the
fix/glm53-media-placeholder-render
branch
from
October 19, 2026 14:42
80b8fd2 to
e7e9355
Compare
ShilohYu
force-pushed
the
fix/glm53-structured-tool-response
branch
from
October 20, 2026 06:42
d3401f1 to
9f00e57
Compare
ShilohYu
force-pushed
the
fix/glm53-media-placeholder-render
branch
from
October 20, 2026 06:42
e7e9355 to
76690ac
Compare
ShilohYu
force-pushed
the
fix/glm53-media-placeholder-render
branch
3 times, most recently
from
October 23, 2026 10:16
69699d7 to
fac9750
Compare
ShilohYu
changed the base branch from
fix/glm53-structured-tool-response
to
main
October 23, 2026 10:16
ShilohYu
force-pushed
the
fix/glm53-media-placeholder-render
branch
from
October 23, 2026 11:15
fac9750 to
3ab7fbb
Compare
jayhenry
reviewed
Oct 23, 2026
| ) | ||
|
|
||
|
|
||
| def _visible_text(content: Any, _literal_spans=None, _offset: int = 0) -> str: |
Collaborator
There was a problem hiding this comment.
这个重复函数可以去掉, 复用或者改为调用 glm52 里的
Collaborator
There was a problem hiding this comment.
已修改:glm53 的 _visible_text 现在委托给 glm52 的共享实现,并传入 _MEDIA_PLACEHOLDER,保留 GLM-5.3 的媒体占位符行为(commit 9fea4c1)。验证:tests/datasets/test_glm53_chat.py 45 passed;ruff、ruff-format、mypy 和 pre-commit 检查通过。
jayhenry
approved these changes
Oct 23, 2026
jayhenry
force-pushed
the
fix/glm53-media-placeholder-render
branch
from
October 23, 2026 12:05
9fea4c1 to
b772b2f
Compare
jayhenry
marked this pull request as ready for review
October 23, 2026 12:05
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.
改动:glm53_chat 落地本地 _assistant_content_and_reasoning——函数体与 glm52 版相同,但 _visible_text 按定义处模块解析:import glm52 的版本会把 assistant 媒体降级成 < reminder >,本地版走 glm53 的 placeholder。
同一个输入(assistant 消息带一张图):
改前(main): <|assistant|>You are unable to process this image ...ANS<|endoftext|>
改后(本 PR): <|assistant|><|begin_of_image|><|image|><|end_of_image|>ANS<|endoftext|>