arXiv:2610.22695cs.LGOct 2026

Manuscript Offprint

arXiv:2610.22695

Chance-Constrained Personalized LLM Routing with Online Preference Learning

Ameya Anjarlekar, Rasoul Etesami, R Srikant

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

Abstract

We study personalized LLM routing, where a router selects among heterogeneous models with different costs and capabilities. The router must minimize cumulative inference cost while ensuring reliable realized response quality, even though user preferences are unknown and must be learned from feedback during deployment. We formulate this problem as a constrained contextual bandit and develop a primal-dual GLM-UCB algorithm that learns preferences while balancing cost and quality. Under a logistic preference model and a strict-feasibility condition, we establish sublinear expected cost regret relative to an optimal stationary randomized contextual oracle and a high-probability guarantee on realized cumulative satisfaction. The framework extends beyond LLM routing to broader online model-selection problems with reliability requirements.

1. Introduction

Modern machine learning systems increasingly rely on collections of models with different capabilities and inference costs. Rather than using the same model for every input, a system can route each request to an appropriate model, using inexpensive models when they are sufficient and reserving more expensive models for difficult inputs. This model-routing paradigm is particularly relevant for large language models (LLMs), whose costs and capabilities can differ substantially across models (Chen et al., 2024a; Hu et al., 2024; Ong et al., 2025).

The challenge becomes more subtle when the appropriate model depends not only on the request but also on the user. Different users may prefer different models for the same request, and these preferences may not be known before deployment. A router must therefore learn a user's preferences from feedback while making routing decisions, gradually discovering which model is more likely to satisfy that user for a given request. This connection between personalization and online learning has long been studied through contextual-bandit methods for personalized recommendation (Li et al., 2010; Xu et al., 2020), and recent work has begun to explore personalized and online LLM routing (Dai et al., 2025; Xie et al., 2025; Zeng et al., 2026). These developments motivate an online routing problem in which user preferences are unknown and must be learned from the outcomes of the models selected by the router.

Learning user preferences, however, is only part of the challenge. In many deployments, consistently poor responses may be unacceptable even if average satisfaction is high. A router may instead need to ensure that at least a (1−ϵ)(1 - \epsilon) fraction of responses satisfy a desired quality criterion over a horizon of TT requests, with probability at least 1−δ1 - \delta. If Yt∈{0,1}Y_t \in \{0,1\} indicates whether the response at round tt satisfies the user's requirements, this requirement is

P(∑t=1TYt≥(1−ϵ)T)≥1−δ(1)\mathbb{P}\left(\sum_{t=1}^{T}Y_{t}\geq(1-\epsilon)T\right)\geq1-\delta \tag{1}

Here, the satisfaction outcome depends on both the selected model and the user's preferences. Therefore, the router must learn the preferences governing satisfaction likelihood while ensuring that the resulting sequence of outcomes remains sufficiently reliable by satisfying the chance constraint.

This leads to a challenging online decision problem. The router must learn from the limited feedback generated by its own model choices, keep cumulative inference cost low, and ensure that the realized number of satisfactory responses does not fall too far below the target. This differs from an expectation-level constraint, which can balance expected cost and expected satisfaction through a Lagrangian objective. Here, controlling expected satisfaction alone does not directly control the probability of falling below the desired level in the realized sequence. The router must therefore account for both uncertainty in what it has learned about the user's preferences and randomness in the resulting satisfaction outcomes.

We formulate this setting as a constrained contextual bandit with known model costs and unknown preference parameters. At each round, the learner observes the request context, selects one model, incurs its cost, and observes only the satisfaction feedback from that model. The goal is to minimize cumulative cost while satisfying the high-probability requirement in (1).

Our solution follows a simple principle: learn what the user prefers while continuously monitoring whether the routing decisions are keeping pace with the desired satisfaction level. The router maintains optimistic estimates of how likely each model is to satisfy the user, allowing it to explore uncertain choices while favoring cost-effective ones. At the same time, it keeps track of any accumulated deficit in satisfaction. When the router begins to fall behind, it shifts toward models that are more likely to satisfy the user. We use this idea to propose an algorithm and provide sublinear regret bounds with respect to a stationary routing policy while ensuring that the chance constraints are met.

Although personalized LLM routing motivates our study, the framework applies more broadly. It applies whenever a system repeatedly chooses among heterogeneous models, services, or alternatives with different costs, while learning an unknown preference or satisfaction model from feedback and seeking to maintain a reliability requirement. This includes, for example, personalized recommendation and online advertising under resource or budget constraints (Zhao & Yang, 2024), cloud or edge service selection subject to cost, quality-of-service, and reliability requirements (Ma et al., 2026), and dynamic procurement among suppliers with heterogeneous costs and uncertain quality under operational constraints (Vassos et al., 2023).

These considerations lead to the following contributions:

  • We formulate personalized online LLM routing as a contextual bandit with unknown user preferences and a cumulative requirement on realized satisfaction, going beyond the usual expectation-level cost-quality formulation.

  • We develop a primal-dual GLM-UCB algorithm that combines optimistic preference learning with a virtual satisfaction-deficit queue and a safety buffer.

  • Under a logistic preference model and a uniform strict-feasibility condition, we establish sublinear expected cost regret relative to an optimal stationary randomized contextual oracle while guaranteeing the required realized cumulative satisfaction with high probability.

  • Finally, we provide numerical experiments to demonstrate the effectiveness of our algorithm. We evaluate its performance through synthetic experiments and a real-world LLM routing case study, examining chance constraint satisfaction, routing cost, personalization, and finite-horizon behavior.

Table 1. Comparison of LLM routing approaches.

MethodOnlinePersonalizedSafety
FrugalGPT✕✕✕
RouteLLM✕✕✕
PersonalizedRouter✕✓✕
MetaRouter✓✓✕
BaRP✓✓✕
Conformal Routing✕✕✓
SLARouter✓✕✓
Ours✓✓✓

References: 1) FrugalGPT (Chen et al., 2024a); 2) RouteLLM (Ong et al., 2025); 3) PersonalizedRouter (Dai et al., 2025); 4) MetaRouter (Zeng et al., 2026); 5) BaRP (Wei et al., 2025a); 6) Conformal Routing (Uddin & Bauer, 2026); 7) SLARouter (Woisetschläger et al., 2026).