Skip to content

ui: use server modalities in non-router mode#24874

Merged
allozaur merged 1 commit into
ggml-org:masterfrom
coder543:master
Jul 10, 2026
Merged

ui: use server modalities in non-router mode#24874
allozaur merged 1 commit into
ggml-org:masterfrom
coder543:master

Conversation

@coder543

Copy link
Copy Markdown
Contributor

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

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES, AI helped research the issue and wrote a different solution initially, but the solution here is one that I decided on, and AI wrote these lines in the correct place. It is a tiny PR, easily verified by human eyes.

@coder543
coder543 requested a review from a team as a code owner June 21, 2026 13:57
@coder543

coder543 commented Jul 9, 2026

Copy link
Copy Markdown
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 master, and it has been helpful.

Is anyone planning to address this bug a different way? If not... maybe we could merge this?

@allozaur
allozaur requested a review from ServeurpersoCom July 10, 2026 12:36
@allozaur
allozaur merged commit 9f623c6 into ggml-org:master Jul 10, 2026
6 checks passed
@coder543

Copy link
Copy Markdown
Contributor Author

Thanks!

CowboyTim pushed a commit to aardbeiplantje/llama.cpp that referenced this pull request Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants