Why Sume Agent Completions rejects assistant messages
An assistant turn in messages[] returns 400 invalid_request on Sume Agent Completions. Only system and user turns work; each call runs in a fresh thread.

Because the endpoint does not replay a prior conversation. The docs say assistant turns are rejected, not ignored, and every completion runs in a fresh thread, so a request that includes one fails with 400 invalid_request.
Everything here is from Agent Completions, read 2026-09-30.
Which roles and content shapes work?
system and user turns are accepted and joined, in order, into one prompt. content can be a string or an OpenAI-style array of text parts, with input_text accepted as an alias for text. input_image parts become attachments.
| Input | Result |
|---|---|
system turn | Accepted, joined into the prompt |
user turn | Accepted, joined into the prompt |
assistant turn | Rejected with 400 invalid_request |
Both instruction and messages | 400 invalid_request |
| Neither | 400 invalid_request |
Why reject instead of ignore?
Accepting an assistant turn would imply Sume replays a prior conversation, which the endpoint does not do yet. The receipt's thread_id tells you which thread the run used.
How do I carry context across calls?
Fold what the agent needs into the system or user text, or pass caller data in input. The docs say input is written whole to a file in the sandbox and treated as data, never as instructions.
{
"messages": [
{ "role": "system", "content": "You continue a product-copy task." },
{ "role": "user", "content": "Previous headline: Aurora Headphones, all day. Write three variants." }
],
"generation_spend_cap_usd": 2
}What other 400s are listed?
A missing generation_spend_cap_usd, a malformed input, or a model other than sume-agent also return 400 invalid_request. Attachment problems use invalid_attachment instead.
Does idempotency matter here?
Yes. Idempotency-Key behaves as it does on Action runs: replaying a key returns the original receipt with idempotency_hit: true, and reusing it with a different payload returns 409 idempotency_conflict. So if you fix an assistant turn error by editing the messages, use a new key for the corrected request.
Sources
Related posts
More in Developers
- Keep the source's channels and sample rate when extracting audio
Adobe lists Match Source audio channels and sample rate in Premiere 26.5. Sume audio-detach keeps both by default: channels source, sample_rate omitted, wav.
- Extract audio from a long video: the 900 s output cap and range
Audio detach takes sources up to 1800 s but outputs at most 900 s. For a longer track pass range and detach in two calls. Errors included.
- Bluesky video format not supported: the accepted MIME types
Bluesky's app accepts video/mp4, video/mpeg, video/webm, video/quicktime and image/gif. For anything else, re-encode to MP4 with Sume video trim.
- Bluesky video length limit: 10 minutes, and how to trim to fit
Bluesky's app sets VIDEO_MAX_DURATION_MS to 10 minutes, and 1.132.0 removed the 10-minute gate. Trim longer clips with Sume video trim first.
Written by Sume