CherryHQ / CherryHQ/cherry-studio
[Bug]: Pasting long text into chat produces no output and no error with CherryIN Google Gemini 3.1 Pro (empty assistant turn)
@Pleasurecruise is already working on this.
Since Aug 24, 2026.
- Dominant language
- TypeScript
- Stars
- 52k
- Forks
- 5k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 603
Description
Issue Checklist
- I understand that issues are for feedback and problem solving, not for complaining in the comment section, and will provide as much information as possible to help solve the problem.
- My issue is not listed in the FAQ (https://github.com/CherryHQ/cherry-studio/issues/3881).
- I've looked at pinned issues and searched for existing Open Issues, Closed Issues, and Discussions, no similar issue or discussion was found.
- I've filled in short, clear headings so that developers can quickly identify a rough idea of what to expect when flipping through the list of issues.
- I've confirmed that I am using the latest version of Cherry Studio.
Platform
macOS
Version
v2.0.0-rc.5
Bug Description
In a normal chat using model cherryin::google/gemini-3.1-pro-preview, pasting a long block of text (Cmd+V) into the composer and sending produces NO assistant output and NO error — the turn appears empty. Saving the exact same content as a .txt file and attaching it sends fine and gets a normal reply.
Steps To Reproduce
- Chat model: CherryIN → google/gemini-3.1-pro-preview.
- Copy a long text (~5k+ chars, i.e. >1500 chars) and paste directly into the composer (Cmd+V), then send.
- The assistant turn produces nothing (only an empty bubble / step-start), no error message.
- The same content saved as a .txt file and attached (or dropped) sends fine and gets a full reply.
Expected Behavior
Long pasted text should either be sent as inline text and get a reply, or be converted to an attachment (as designed for >1500 chars) and replied to. It should never silently produce an empty turn; if the upstream short-circuits, Cherry should surface an error.
Additional Context
Evidence from local DB (message table, timestamps 06:49–06:52, same model):
- Failing turn (topic bc8c39bf): user message is a 17,959-byte plain-text message (no attachment). Assistant message(s): parts
[{"type":"step-start"}]only; statsinputTokens=0, outputTokens=0, generationDurationMs≈1500. - Working turns (same model; 52KB content attached as .txt, topics 91ccad14 / 8a49371e): assistant
inputTokens=20256/32468,outputTokens=6559/6341, model reads the file via the read_file tool and replies fully.
Code path: the composer editor's handlePaste (HorizontalScrollContainer-BO7Df1cE.js) intends to convert pasted text >1500 chars into a temp .txt attachment (shouldDelegateLongTextPasteToFileHandler→handlePastewritestemp_file_*_pasted_text.txt), but in this case the text went through as inline text. CherryIN routesgoogle/*to the Gemini endpoint (https://open.cherryin.net/v1beta/models).
The empty reply (0 input / 0 output tokens, ~1.5s) looks like the CherryIN gateway returns an empty successful response for a very long single text user message — worth reporting to CherryIN too. Related: #16329 removed the long-paste-to-file settings while keeping the auto behavior; the auto-conversion path should be verified.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.