arXiv:2610.07816cs.AIOct 2026

Manuscript Offprint

arXiv:2610.07816

Do I Need the Cloud? Uncertainty-Aware Step-Level Handoff for Small Language Model Agents

Abolfazl Younesi

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Small language models (SLMs) are attractive as local agent controllers because they reduce remote inference, latency, and deployment footprint, yet structured tool errors can cause an agent step to fail. Existing routers typically select a model once per query. However, agents expose sequential decision points whose difficulty dynamically changes based on intermediate observations. We propose STEPGATE, an uncertainty-aware handoff framework that scores each local SLM action and selectively escalates challenging steps to a stronger model. On a 52-task held-out single-step BFCL-derived test split, the Qwen2.5-1.5B/7B pair attains 82.7% task success with 30.8% escalation, versus 67.3% local-only and 75.4% random escalation (which uses 33.8% escalation). In a separate multi-turn evaluation, STEPGATE achieves 69.0% trajectory success and 84.0% action success using only 30.0% cloud actions, compared with 48.0%/70.5% local-only, 60.0%/78.2% random escalation, and 57.0%/77.1% query-level routing (strong-only achieves 82.0% trajectory success at 100% cloud actions). These results suggest that step-level escalation recovers a large share of the performance gap to the stronger Qwen2.5-7B backend at a matched cloud-action rate while transmitting fewer tokens remotely. However, our evaluation is limited to one model family, a single stronger backend, and scripted tasks. Furthermore, the test sets are small, multi-turn comparisons rely on paired intervals and statistical tests, and our risk tiers serve as research annotations rather than formal safety guarantees.

1 Introduction

Agentic systems repeatedly invoke language models for narrow decisions: selecting a tool, filling arguments, interpreting an observation, or choosing the next action. This execution pattern strengthens the case for SLMs: many calls are repetitive and specialized, and heterogeneous systems can reserve large models for the minority of steps that truly require them (Belcak et al., 2025). The difficulty is reliability. Function calling is structurally unforgiving: a nearly correct natural-language answer may still be useful, whereas one wrong function name, entity identifier, enum value, or destructive argument can fail an entire trajectory. BFCL consequently evaluates serial/parallel calls, abstention, stateful multi-turn behavior, and increasingly holistic agentic behavior rather than text quality alone (Patil et al., 2025). Model routing is a natural response to heterogeneous capabilities. FrugalGPT, RouteLLM, Hybrid LLM, AutoMix, and related cascades show that selectively invoking stronger models can reduce cost while retaining quality (Chen et al., 2024; Ong et al., 2025; Ding et al., 2024; Aggarwal et al., 2024; Yue et al., 2024). However, these systems mostly route at query level and optimize answer quality/cost. An agent instead exposes a sequence of decisions whose difficulty can change after every tool result. A request such as “find my meeting and move it if the room is

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: SLMs for Agentic Systems, Paris, France, 2026.

Figure

Figure 1: STEPGATE routes each agent step. The local SLM first proposes an action. A lightweight gate estimates failure probability from action-structured uncertainty and risk. Only uncertain/high-risk steps disclose the required context to a stronger model.

"unavailable" may require an easy local search, a difficult disambiguation after observing multiple events, and a high-risk calendar mutation. Routing the entire request to the cloud wastes local capability. Committing the entire trajectory to an SLM compounds errors.

We therefore ask: Can an SLM predict, before execution, when its next agent action is likely to fail and use that uncertainty to escalate only the necessary step? This question differs from generic LLM routing in three ways. First, the decision unit is an action, not a user query. Second, uncertainty is action-structured: tool identity, arguments, schema validity, execution state, and action risk provide signals unavailable in ordinary QA. Third, the objective is multi-dimensional: cloud calls and monetary cost matter, but so do local latency/energy, end-to-end task success, and the amount of private context disclosed remotely.

Our contributions are fourfold. (1) We formulate action-level SLM–LLM handoff as a constrained risk minimization problem for tool-augmented agents, accounting for task failure, cloud invocation, latency/energy, and remote-context exposure. (2) We design an action-aware uncertainty representation that fuses token confidence, schema and argument structure, sample consistency, and external risk tiers. (3) We implement a calibrated, adaptive gate that improves on local-only and query-level routing at matched cloud-action rates, is positive but not clearly separated from random escalation, and matches self-consistency routing with fewer cloud actions in our multi-turn setting. (4) We evaluate both single-step and multi-turn agent trajectories: at a 30.0% cloud-action budget, STEP-GATE 1^{1} improves trajectory success from 48.0% (local-only) to 69.0% (versus 60.0% random and 57.0% query-level routing), with 55.0% of successful trajectories executing via mixed local/cloud collaboration. We report paired bootstrap intervals and McNemar tests for these comparisons and evaluate the risk features at an equal cloud budget (Sec. 4).

References (27)