t3code
t3code copied to clipboard
Muse provider: image sets over ~7 MB fail turn start with generic error; pre-flight the MSP frame size
What happens: a few phone photos in one message on the Muse provider fail the turn with the generic "The provider could not start this turn." The real cause (Muse turn/start failed: frame exceeds the inbound limit) only lands in the provider session's lastError, so users can't tell it's a size problem.
Root cause:
packages/provider-muse/src/server/adapter.ts(prompt()) embeds every attached image as full-size base64 in a singleturn/startframe, with no size check.muse serveenforces a 10 MiB inbound frame budget, so ~9.9 MB of JPEGs (≈13.1 MB base64) is rejected at admission.failure.tscurates the transport detail away, hence the generic message.
Repro: Muse provider, one message with 3 phone photos (4.4 + 2.9 + 2.1 MB). Turn fails in <1s, every time; text-only turns on the same session work.
Suggestions:
- Pre-flight the outgoing frame size in
prompt()(budget ~9 MB to leave headroom under serve's 10 MiB). - When over budget, degrade gracefully instead of failing: send text + the existing saved-path mentions and let Muse read the files itself (or keep one image inline + rest as paths), and/or downscale images before embedding.
- Add a curated failure reason (like
attachment_unreadable) so the UI says the images are too large for one turn, with the ~7 MB/turn guidance.
Env: T3 nightly 0.1.10-nightly.20261114.4709, muse 1.4.20, @muse-code/sdk 1.4.6, Windows.