ui: use server modalities in non-router mode#24874
Merged
Merged
Conversation
Contributor
Author
|
@ServeurpersoCom or @allozaur can anyone take a look at this? I've been using it for several weeks, floating it on top of the latest Is anyone planning to address this bug a different way? If not... maybe we could merge this? |
allozaur
approved these changes
Jul 10, 2026
ServeurpersoCom
approved these changes
Jul 10, 2026
Contributor
Author
|
Thanks! |
CowboyTim
pushed a commit
to aardbeiplantje/llama.cpp
that referenced
this pull request
Jul 21, 2026
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.
Overview
Fixes a bug where regenerating a response from a message that had an image attachment would send it without the image attachment. This has been annoying me for months, and finally annoyed me enough to try to figure out what was going on.
The underlying issue is that I'm not using "router mode". I use an external router (llama-swap), which works with more than just llama-server. From what I can tell, this bug likely did not exist in router mode.
In non-router-mode, the model name lookup fails, so the code decides that the model probably isn't multimodal and strips the image attachments. But, when we're not in router mode, we shouldn't care about the name of the model that was used to generate the previous message. It truly does not matter.
For each of these two videos, there are three tests: sending a new message with an image, regenerating the response, and editing the previous message with the attachment and sending it again. Only the second case would fail under the previous code. All three cases pass with the updated code.
Before:
before.mov
(Test 2 fails: regenerate sends the message without the image attachment.)
After:
after.mov
(All 3 tests pass.)
Requirements