Skip to content

fix(studio): keep GGUF compaction for multimodal chats - #10158

Merged
oobabooga merged 6 commits into
unslothai:mainfrom
Biotrioo:fix/issue-10155
Sep 9, 2026
Merged

oobabooga merged 6 commits into
unslothai:mainfrom
Biotrioo:fix/issue-10155

Conversation

@Biotrioo

@Biotrioo Biotrioo commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #10155

Queued local runs now retain the GGUF/llama.cpp serving verdict captured when they were queued. The adapter applies the same isServedByLlamaCpp decision used by the model settings, including opaque Ollama/native paths where a catalog suffix or quant is absent. The verdict is threaded through queued runtime snapshots and loaded-model resolution, so selecting another provider while a local follow-up waits cannot silently disable compaction.

Merged current main (191b69c), preserving its updated queued runtime and maintainer changes. Removed unrelated pre-commit formatting churn from the original branch.

Validation: 69 focused compaction, rolling-window, sampling-seed, model-config and reservation tests passed; the queue contract test passed 16/16; frontend application/test typechecks passed; targeted ESLint now reports only the 14 pre-existing chat-adapter findings from current main; git diff --check passed. GPU/backend inference and full desktop queue execution remain CI coverage, so this PR remains a draft.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-09T20:03:18.699173Z f1a1dc0 Manual request
🔒 Security Review ⚠️ Failed 2026-09-09T19:59:55.112564Z f1a1dc0 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member

Confirmed the media request in studio/frontend/src/features/chat/api/chat-adapter.ts still keys compaction off the catalog row, so a GGUF selected by native path or raw .gguf misses it, and routing that through isServedByLlamaCpp looks right. Will get this reviewed.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 8, 2026
@oobabooga

Copy link
Copy Markdown
Member

@codex review

@oobabooga

Copy link
Copy Markdown
Member

@codex security review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 8, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 33dcbff4bc

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 8, 2026
@oobabooga

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 7a36a98554

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 9, 2026
@oobabooga

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@oobabooga

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Provided git ref f1a1dc0f56c3fd76ddfa8e022900fdd9d1767586 does not exist
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: f1a1dc0f56

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@oobabooga

Copy link
Copy Markdown
Member

Thanks @Biotrioo. I confirmed the failure this fixes. Load a GGUF from a filesystem path, let the idle auto-unload free it, then return to the Studio window: that model's row drops out of the catalog, and on main the next chat request goes out with no context_overflow. That is what turns a long thread into "Message too long", even though the model is still there and about to be reloaded from its saved cache. Captured request bodies show main omitting the field and this branch sending truncate_oldest. The same request against the same model returns 400 without it and 200 with it.

I pushed two commits to the branch while reviewing. One reads the verdict from isServedByLlamaCpp instead of a catalog row. The other carries loadedIsGguf on the queued-run settings snapshot, which covers a queued local turn after the picker has moved to an external provider.

I did not reproduce the specific case in #10155, where attaching an image failed while text worked. If that symptom survives this build, please reopen it with fresh logs. The compaction loss fixed here is real either way. Everything live was exercised on Linux, and the four red checks at merge time all reproduce on a clean main checkout.

@oobabooga
oobabooga merged commit 7da85a0 into unslothai:main Sep 9, 2026
33 of 37 checks passed
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.

[Bug] Cannot attach image when historical token count exceeds limit, even though post-compaction context has room

3 participants