Skip to content

Say what happened: own-key fallback, failed background replies, delete-project counts, legacy Office files, and no 4,096 cap on custom endpoints - #224

Merged
bencode merged 2 commits into
mainfrom
fix/say-what-happened
Oct 26, 2026
Merged

bencode merged 2 commits into
mainfrom
fix/say-what-happened

Conversation

@bencode

@bencode bencode commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Five places where the app either stayed silent about something that went wrong or said something untrue. Each fix changes only the part that was silent or untrue.

#164: a conversation's own-key model is gone

When a conversation was on a model behind the reader's own key and that model is no longer configured, it now says so before the next message is sent, for example: "relay-chat (your key) is no longer set up, so this conversation now uses GLM-5.3 (free)."

  • The check runs in attachAgent. It covers opening the conversation and removing the provider while the conversation is open, because removal rebuilds the runtime.
  • It uses the panel's existing error alert. The notice clears on the next send, as before, or when the reader picks a model.
  • The fallback itself is unchanged.
  • Free models that fall back after a deployment change are not flagged.

#199: custom endpoints are no longer capped at 4,096 tokens

  • customModel now has maxTokens: 0, meaning unknown, like its contextWindow.
  • pi always sends an output limit of at least 1 token, so a 0 alone would send 1. A large fixed number is not safe either: many compatible endpoints reject a limit above the model's own with a 400 (DeepSeek accepts 1–8192).
  • So the custom provider's streamSimple drops max_tokens and max_completion_tokens from the request when the caller set no limit, which is the case for chat. The endpoint then applies the model's own limit.
  • Callers that set a limit keep it: titles (200), image analysis (4096) and compaction, which uses its own share now that model.maxTokens is 0.

#206: a failed background reply is marked as failed

  • Activity gains 'failed'. A background run that threw, or ended with an error, settles to it instead of 'unread'.
  • The recent list shows a separate "Reply failed" icon with role="img", so it isn't told apart by colour alone.
  • A failed session stays in memory until the reader opens it, so the reason and the draft it handed back are still there. letGo releases it after that.
  • Opening the conversation clears the mark, as it does for 'unread'.

#183: the delete-project dialog describes what will be deleted and saved

  • Files and attachments are counted separately: "This deletes 22 files, 1 attachment and 1 conversation…".
  • With attachments present, the dialog says that Save to folder first leaves them out and that each can be saved with Save as…. If the button isn't offered, it says to save them that way before deleting.
  • Save to folder first now appears only when there are non-attachment files to save. An attachments-only project no longer offers a button that saves nothing.

#162: older .doc/.xls files are no longer called readable

  • legacyOfficeFormat in core/files.ts names .doc and .xls.
  • getReadability reports them as not readable, with a reason that names the conversion: "Save it as .docx to read it." list and read both go through it, so they agree.
  • The preview page no longer promises "can be used as context in a later iteration". For .doc/.xls it says "Save it as .docx to open it here."; for other formats, "There is no preview for this format."
  • Not every unsupported file is marked unreadable, as the issue proposed: text files with unknown extensions (.vue, .proto) read fine as UTF-8 today.
  • The UTF-8 error text is left for Read plain text in the encodings readers actually have — GBK .txt meets 'Preview unavailable', and the assistant answers 'import a UTF-8 copy' #160.

Verification

Closes #164, closes #199, closes #206, closes #183, closes #162

…ails, or a file cannot be read, and stop capping custom endpoints at 4,096 tokens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment