RetryRoute: Retry-Aware Model Routing for Agentic Image Editing Services

Hanshuai Cui, Zhiqing Tang, Zhi Yao, Jun Luo, Weijia JiaarXiv 2026

TL;DR

RetryRoute is a novel model router designed for agentic image editing services that use "critique-and-retry" loops. It identifies and exploits "sticky failures"—the phenomenon where a model that fails an edit is significantly more likely to fail it again—by dynamically planning retries, escalations, and abandonment based on failure history and real-time system load.

What Problem Does This Paper Address?

In modern agentic workflows, image editing is often performed in a loop: an agent calls a model, a vision-language "judge" evaluates the result, and if it fails, the agent retries. There is a massive cost spread between models—distilled models can be 30x to 190x cheaper than state-of-the-art heavyweights.

Existing serving systems use "cascades" (trying cheap models first, then escalating) or "routers" (picking one model per request). However, these systems share a flawed assumption: they treat each retry as an independent event with the same success probability as the first try.

The authors identify a critical gap: failures are sticky. If a model fails to follow an instruction once, its chance of succeeding on a second try with a different seed is often less than half of its initial success rate. This "stickiness" means that blindly retrying the same cheap model is often a waste of resources, yet existing systems lack the awareness to decide when to escalate or give up based on this history.

Methods

The authors propose RetryRoute, which treats the routing problem as a sequential decision process over "failure states."

  1. Success Estimation ($p(a|s)$): Instead of assuming independent draws, RetryRoute estimates the probability that model $a$ will succeed given the current failure state $s$ (how many times each model has already failed on this specific request). They use a shrinkage estimator to pool data across categories while maintaining accuracy for specific failure histories.
  2. Dynamic Programming (DP) Planner: The system solves a Bellman equation to find the optimal policy. It balances the probability of success against a cost weight ($\lambda$), deciding at each step whether to retry the current model, escalate to a more powerful one, or abandon the request entirely.
  3. Load-Aware Re-planning: Crucially, the "cost" in RetryRoute isn't just GPU time; it includes live queue waits. If a cheap model's queue is backed up, the planner might decide it's actually "cheaper" (in terms of total latency) to escalate to a more expensive but idle model.
  4. Online Learning: For scenarios with "cold starts" (no prior logs) or "drift" (changing model performance), they provide a variant using LinUCB to learn success probabilities on the fly.

Datasets

The researchers evaluated RetryRoute using a massive collection of over 30,000 edited images generated across:

  • GEdit-Bench (English & Chinese): A benchmark for general image editing.
  • GEditBench v2: An updated version with human-aligned instructions.
  • ImgEdit: A dataset focused on diverse editing categories.
  • GenEval: Used for cross-domain validation in text-to-image generation tasks.

They tested six open-source editing models, including FLUX.2, Qwen-Image-Edit, VIBE, LongCat, and Step1X.

Key Insights and Ideas

  • The "Sticky Failure" Discovery: Across six models and multiple benchmarks, a retry after a failure succeeds only 17–53% as often as a first try. This is the "aha moment" that invalidates simple retry logic.

    Sticky failures: A model that fails once is likely to fail again, whereas a different model might succeed.
  • Latent Difficulty Explains Stickiness: The paper proves mathematically that "stickiness" arises because requests have heterogeneous difficulty. If a model fails, it's a strong signal that the request falls into that model's "hard" zone.

  • Escalation vs. Resampling: Because failures are sticky, escalating to a different model is often more cost-effective than resampling the same model, even if the second model is more expensive.
  • Queue-Awareness is Vital: Fixed escalation plans (e.g., "try A twice, then B") collapse under high load. RetryRoute’s ability to re-plan based on live queue lengths allows it to maintain high "goodput" even when the system is busy.

    Figure 2: Four findings behind RetryRoute. Panels a and b use English GEdit-Bench with bands over four pool-1 groups, and panel c replays the logged edits under load on 3 GPUs.

Key Results

  • Superior Success Rates: At a fixed budget, RetryRoute outperformed the strongest of 11 baselines (including FrugalGPT and RouteLLM) by 2.8 points on average.
  • Efficiency Gains: It matches the success rate of the strongest single model at a cost up to 6.4x lower.
  • Testbed Performance: In a real-world GPU serving testbed, it increased the share of edits delivered within a 300s service-level objective (SLO) by 5.0–6.3 points over the best prior baseline across all load levels.
  • Robustness: The system generalizes well to unseen categories and benchmarks, and its online learner reaches 97% of the optimal reward within just 100 requests.

Limitations and Future Work

  • Judge Dependency: The system relies on the accuracy of vision-language judges. While the authors used an ensemble and validated it against human annotators, judge errors can still propagate into routing decisions.
  • State Space Scaling: While the DP planner is very fast for 3-6 models, the state space grows exponentially with the number of models and retry limits.
  • Future Directions: The authors suggest that "failure-aware planning" could be applied to other agentic tools that are prone to repeated failures, such as code interpreters or search engines.

Summary updated

Abstract

Web agents increasingly edit images by calling open editing models in a critique-and-retry loop, and these models differ in cost by more than an order of magnitude. After every rejected edit, a service must decide whether to retry the same model, escalate to another or give up. Existing routers pick one model per request, and cascades escalate in a fixed order. However, both treat a retry as an independent draw. We identify sticky failures, meaning that a retry after a failure succeeds only 17-53% as often as a first try across six open models, three benchmarks and two judges. Based on this finding, we propose RetryRoute, a retry-aware router that estimates each model's chance of success given the request's failure history. It plans retries, escalations and abandonment over failure states and adds live queue waits to the cost, so the same plan becomes load-aware dispatch. At the main budget, RetryRoute's success under the in-loop judge exceeds the strongest of eleven prior baselines by 2.8 points on average over eight groups. On a GPU serving testbed it raises the share of edits delivered within the service-level objective by 5.0-6.3 points over the best prior baseline at every load.
BibTeX
@misc{cui2026retryroute,
  author = {Hanshuai Cui and Zhiqing Tang and Zhi Yao and Jun Luo and Weijia Jia},
  title = {{RetryRoute: Retry-Aware Model Routing for Agentic Image Editing Services}},
  year = {2026},
  eprint = {2610.41460},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.41460},
}
Figure