Laravel AI SDK 1.4 lets agents recover from a failed tool call
A thrown exception used to kill the agent run outright. Now the SDK feeds the failure back to the model as a failed tool result, so it can explain itself or try something else.
Laravel AI SDK 1.4 shipped today, and the main change is how the SDK handles a tool that throws. Previously, an exception inside a tool call ended the run and fired AgentFailed. Now the SDK catches it and sends the exception’s message back to the model as a failed tool result, so the model can explain the problem or attempt something else instead of the whole run just dying.
The release also lets agent fakes resume tool approvals in tests, so approval workflows can be exercised end to end rather than stubbed out. Raw HTTP responses are now exposed on classification, embedding, transcription, image and reranking calls, for reaching provider fields the SDK doesn’t map itself. OpenAI insufficient-credit and quota errors now get their own handling rather than being treated as generic rate limits, and conversation title generation now reports as its own agent run with proper token and failure metadata.
class Support extends Agent
{
// a tool that throws no longer kills the run;
// the model sees the failure as a tool result
}
Why it matters: if you’re building agents on this SDK, tool code that used to need its own try/catch to keep a run alive can often drop that now, and the model gets a chance to recover or report the failure on its own. Code that depended on a tool exception ending the run via AgentFailed will need to change, since that no longer happens by default.