ExAgent.ModelRetry exception (ExAgent v3.0.0)

View Source

A tool or output validator can ask the model to correct its input with raise ExAgent.ModelRetry, message: "Use the current code". A string argument is also accepted. Request a retry only when repeating the operation is safe. Raise it; returning the struct, alone or in {:error, _}, is an invalid result. A tool can also return {:retry, message}.

Stability — Stable.