Repository navigation
llama-server: text never carries the media marker (#98) - #112
Merged
Merged
Conversation
/props publishes the marker that stands for an image in the prompt, so a tool that read /props put it into a chat. mtmd then expected one image more than the request had, and that request and every later one in the chat failed with "Failed to tokenize prompt" (HTTP 400). patches/0022 writes the marker as [media marker] in all message text and tool definitions before the images get theirs. tests/server_media_marker_test.py, run by scripts/test-fleet.sh, sends the marker in a user message, a tool result and a tool definition to /apply-template and checks that it reaches the prompt only as [media marker], and that chat, messages and responses still answer. Applied on llama.cpp 970b51c after patches 0001-0018 and patches/fleet; a second pass of scripts/apply-patches.sh skips it. On macOS the new test passes, and fails without the server-common.cpp change. On the console with memfix8 (same pin): /props in a message, as a tool result, an image, and an image with the marker in its text were all answered (before: HTTP 400). From github.com/MCsumz/PS5LM-memfix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dem3SmAW35vh3Kc6DxfxPm
# Conflicts: # CHANGELOG.md
cobanov
approved these changes
Nov 25, 2026
cobanov
left a comment
Owner
There was a problem hiding this comment.
Thanks @MCsumz, this checks out. 0022 is the next free number, and it applies on d2bceda3d after #103's patches as well as on the old pin. The marker is stripped before oaicompat_content_load_media puts the real markers in, and tool definitions are covered too. The /apply-template check fails without the change, and your console runs cover the mtmd side.
I merged main into the branch (a CHANGELOG conflict only), so CI now runs on the new pin. I'll merge once it's green.
One optional thing: taking the string by j.get_ref<const std::string &>() for the find would save copying every base64 image string.
MCsumz
added a commit
to MCsumz/PS5LM-memfix
that referenced
this pull request
Nov 27, 2026
…stream docs/UPSTREAM-TESTS.md: the 27 November runs, main 5e96235 on the PS5 Pro and main + cobanov#114 + cobanov#117 on the PS5 Fat. The README's fix table now says where each fix is upstream: the heap (cobanov#110), the keep-alive fix (with the llama.cpp move, cobanov#103), the Qwen3.5 cache (cobanov#88) and the media marker (cobanov#112) are on main; the scratch fix is next. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
First of the three from #98.
patches/0022: 0021 went to #111 this morning./propspublishes the marker that stands for an image in the prompt, so a tool that read/propsput it into the chat. mtmd then expected one image more than the request had, and that request and every later one in the chat failed with "Failed to tokenize prompt" (HTTP 400).patches/0022writes the marker as[media marker]in all message text and tool definitions, before the images get theirs.scripts/apply-patches.shon 970b51c, after 0001-0018 andpatches/fleettests/server_media_marker_test.py(new, intest-fleet.sh)server-common.cppchange/propsin a message, as a tool result, an image, and an image with the marker in its text: all answered (before: HTTP 400)I haven't checked it against #103 (b12600) yet, since that's still a draft.
🤖 Generated with Claude Code