LlamaIndex failed function tools: decide Sume retries in the tool
LlamaIndex v0.14.25 stops retrying failed function tools. Decide inside your Sume tool which errors are safe to retry, and return a status string.

LlamaIndex v0.14.25 changed core to avoid retrying failed function tools, so assume nothing will retry a Sume call for you and make the retry decision inside the tool. Retry only the error categories Sume marks as retryable, always with the same idempotency key, and return a status string for anything else.
The LlamaIndex entry is one line in its release notes ("fix(core): avoid retrying failed function tools", #22841). Sume behavior is from Errors and credits and Jobs and results, read 2026-09-30.
What does a raised exception cost you now?
The release note gives only the headline, so check the source for exact behavior. One plausible reading is that a failed paid tool call is not silently tried again, so a transient queue error would end the tool call unless you handle it yourself.
Which Sume errors are safe to retry?
| Category | Documented action |
|---|---|
queue | Retry later with the same idempotency key |
generation_unavailable | Retry later |
generation_timeout | Poll status or retry later |
worker_timeout | Poll status or retry later |
validation | Fix input |
quota | Add funds or lower request cost |
What about a local timeout?
A timeout in your process is not a failed job. The docs say not to resubmit the original paid request just because a local process timed out; poll with backoff until completed, failed or canceled. Reuse the same key only for the same operation and payload.
What should the tool return?
Catch the error inside the tool and return text the agent can act on, such as "queued, job_id=job_123, poll status" or "validation error: fix the prompt". Keep the job_id in the message so the agent polls instead of resubmitting. A working image-tool example is in LlamaIndex image generation tool with Sume.
Sources
Related posts
More in Developers
- Mastra background tasks and Sume: reuse the idempotency key
Mastra 1.72.0 fences background tasks with leases. If a new owner restarts a Sume tool call, the same idempotency key returns the original job.
- MCP Apps _meta.ui.resourceUri: what a Sume tool call shows
MCP Apps tools point at a ui:// resource for the host to render. Sume's hosted MCP lists plain tools, so a host shows the tool result, not an app.
- MCP stream dropped: re-issue with the same idempotency_key
MCP 2026-07-28 says re-issue a broken request with a new request ID. On a paid Sume tool, keep the same idempotency_key so the retry is not a second charge.
- MCP tool name with a dot or underscore: tools.list vs tools_list
Sume MCP tool ids use underscores; a dotted alias such as tools.list is canonicalized on call. Retired aliases map to generate_image and generate_video.
Written by Sume