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.

4 min readSume
All posts

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.

From the Agent Completions docs, read 2026-09-30: https://docs.sume.com/agents/completions
InputResult
system turnAccepted, joined into the prompt
user turnAccepted, joined into the prompt
assistant turnRejected with 400 invalid_request
Both instruction and messages400 invalid_request
Neither400 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

All Developers posts

Written by Sume