TECHNOLOGY

OpenHands fallback retries transient model failures per call

In this article
THE QUICK TAKE

Use fallback for the documented transient failure classes and inspect actual model usage; it neither permanently switches the conversation nor repairs invalid credentials or requests.

Locate fallback at the model-call boundary

An agent’s model request times out and an alternative model returns a response. The OpenHands fallback guide describes this as per-call behavior: each new request starts with the primary model again. This differs from switching the conversation’s active model profile. A successful alternative call therefore does not establish that all later reasoning will use the same alternative route.

Classify the error before expecting an alternative

Fallback applies to transient errors such as rate limits, timeouts and connection problems. Authentication failures and bad requests are raised without trying alternatives. The exception guide supplies typed error categories. An invalid input schema should be corrected at its source; a list of fallback models is not a general-purpose way to make an unsupported request valid. Preserve the error class when reporting failure to the calling application.

Resolve alternatives as usable profiles

Fallback configurations are referenced by saved profile names and tried in the specified order. The profile-store guide explains the stored artifact and secret behavior. Verify that the strategy uses the intended profile directory and that loaded alternatives have working credentials and required capabilities. A model that can answer plain text may still be unsuitable for a tool-using task or a multimodal request.

Preserve the original failure and actual usage

If all alternatives fail, the guide says the original primary error is raised. That exception alone does not enumerate every attempted route. Usage from fallback calls is merged into primary metrics, with model names available in usage records. Retain enough observations to distinguish a primary-only failure from an exhausted alternative list. Do not describe the primary model as having produced a response merely because the result arrived through its configured LLM object.

Verify continuation against the task contract

A successful model response still needs to produce correct agent behavior and a verified artifact. Response-contract guidance distinguishes accepted output from completed application work; tool observations tie later actions to real results. Record the active fallback order and model usage with the run. If task requirements depend on a particular capability or data route, assess alternatives before treating a transient-failure recovery as an equivalent execution.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles