You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
An attachment larger than the model's context breaks every later run in the chat #480
Found while adding PDF attachments (#479). Attachments are capped at 1.5 MB per message (the hosted-channel row cap), which counts bytes, not tokens. A large text file or PDF can fit under that cap and still exceed the model's context: Keynote's multilingual license PDF extracted to about 1 MB of text, about 466K tokens, over Haiku's 200K window.
Actual: that run fails, and every later run in the chat fails the same way until the message is deleted (#467 deletion replaces it in context). Expected: the oversized attachment is refused or trimmed when sent, or the run explains what happened and the chat stays usable.
Possible directions: check the attachment's estimated tokens against the chosen model's context window where the channel knows it (pi-ai model metadata), or have the context edit drop or summarize an attachment that overflows.
Present since #469 (text attachments). Part of #26 and #5.
Activity