arXiv:2610.17431cs.CROct 2026

Manuscript Offprint

arXiv:2610.17431

VeriRouter: Towards Verifiable LLM Routing

Mengyu Yao, Ziqi Zhang, Shaofei Li, Yifeng Cai, Ding Li, Yao Guo, Ning Luo

Abstract

Large language model (LLM) routers are increasingly deployed to optimize quality, latency, and cost through dynamic model selection and request rewriting. However, a compromised router can cause ineligible selection on the control plane, unendorsed rewriting or unfaithful relay on the data plane, undermining LLM routing integrity. We present VERIROUTER, a verifiable LLM routing framework. Under an endorsed public context binding a private semantic index and rewrite banks, VERIROUTER combines ZK proofs with a provider-issued serving certificate to establish integrity across both planes while keeping the router's private routing assets hidden from clients. For model selection, we design an efficient ZK proof for semantic search. For rewriting, local checks enforce message preservation and additions from committed banks. On real-world workloads, VERIROUTER's model-selection and rewrite proofs average 21.92 s and 4.24 s, yielding 1,307×1,307 \times and 101×101 \times speedups over the fastest completing baselines. Relative to serving without verification, VERIROUTER adds only 4.08 s under per-turn selection and 0.11 s under session-pinned selection.

1 Introduction

LLM routing service. As large language models (LLMs) become more capable but increasingly heterogeneous in quality, latency, and cost, LLM routing services have seen growing adoption [7, 25, 27, 42, 58, 68, 72, 74, 81]. These platforms provide a unified interface to multiple models and select different models for different queries [2, 32, 71, 82]. They offer broader model availability through a single API [58, 72, 74, 81], reduce cost by matching model capability to query difficulty [7, 25, 27, 42, 68], and support practical features such as prompt optimization [67, 80]. OpenRouter, one of the largest LLM routing platforms, reports over 300T monthly tokens, more than 10M users, and over 500 models [72], illustrating the broad real-world adoption of LLM routing.

Router workflow. An LLM routing service involves clients C, an LLM router R, and external model providers P offer-

Figure

Figure 1: LLM routing workflow and integrity risks. The router R selects a model on the control plane, then rewrites and forwards the request and relays the response on the data plane. An untrusted router can cause ineligible selection, unendorsed rewrite, or unfaithful relay.

ing a pool of LLM models. As shown in Fig. 1, R mediates three steps. ① Model selection. On the control plane, it selects an eligible model, often through semantic search on its semantic index. ② Request rewriting. On the data plane, it forms the model-received request, possibly adding endorsed router-supplied content such as hidden system instructions or provider-specific formatting, and forwards it to the selected model's provider. ③ Response relay. The provider returns a response, which R relays to C on the data plane.

Integrity without disclosure. The same architecture that makes routing useful, however, also makes it opaque. Because the semantic index and router-supplied content are private, the router hides its model-selection and request-rewriting processes from clients. This allows a compromised router to deviate at each step in Fig. 1. ① Ineligible selection. On the control plane, it can route the illustrated medical request to an ineligible cheaper model while claiming specialist service. ② Unendorsed rewrite. Before inference on the data plane, it can remove a client directive or insert unendorsed instructions or other content, analogous to deployment-side prompt injection [21, 55–57, 87]. ③ Unfaithful relay. After inference, it can alter the response or attribute a cheaper model’s output to a premium model [18, 104]. A client receiving a problematic response cannot tell whether it reflects router misconduct or the serving model’s ordinary behavior or limitations. This uncertainty weakens reputational deterrence and lets a paid router reduce upstream costs while charging for the advertised service or favor affiliated models or sponsored content.

Limitations of existing approaches. A provider-issued serving certificate [15, 23] can address unfaithful relay by binding a response to the provider. However, it cannot establish selected-model eligibility or endorsed rewriting. Verifying these two properties without revealing the router's private data to the client calls for zero-knowledge (ZK) proofs. Recent advances have substantially improved general-purpose ZK proofs [10, 28, 30, 37], but directly proving routing execution remains too expensive. For semantic-search selection, the proof must certify its data-dependent traversal over a private semantic index. In our baselines, SP1 [89], the SOTA general-purpose zero-knowledge virtual machine (zkVM), takes 228.2–706.8 min, while the generic implementation by Jolt [4] and direct Plonky2 [101] exhaust 256 GiB of memory even at the smallest evaluated search-trace size. Request rewriting poses a separate challenge: its proof relation must cover common rewrites while hiding router-supplied content. Even after fixing this relation, proving the full request-assembly, hashing, and bank-lookup program takes 4.9–8.3 min in Jolt and 13.7–20.2 min in SP1. These costs are prohibitive for online routing.

Our building blocks: ZK data structures. Our starting point is that the major cost of proving LLM routing comes not from the search logic but from the mutable data structure it runs on. The search maintains a priority queue, and a general-purpose prover certifies it by replaying every operation along with the queue state it produces, so the circuit carries the entire history of a structure the verifier never needs to see. We observe that the queue state is more than the verifier needs: what must be established is only that the claimed sequence of removals is the one a valid queue would have produced. A trace of insertions and removals, together with a claimed final content, describes a valid priority queue if and only if 1) every inserted item is accounted for exactly once, 2) each item is removed only while it outranks everything then present, and 3) the final content is ordered by priority (Thm. 2). The first condition is a multiset equality and the third a local comparison; the second is the only global one, and we discharge it by observing that it is exactly the condition a monotone stack certifies. We therefore develop ZK checkers for both structures, each with constraint count linear in the trace length. On a 100K-operation trace, our checker takes 65.70 s versus SP1's 56.9 min, a 52.0× speedup.

VERIROUTER framework. Building on these ZK data structures, we present VERIROUTER, an extremely practical framework for verifiable LLM routing under an endorsed public context binding a committed semantic index and rewrite banks. In this context, it combines ZK proofs with a serving certificate, to establish integrity across both planes while keeping the committed index and rewrite-bank contents private from the client. ① For the control plane, we design a ZK proof for HNSW-based semantic search that establishes selected-model eligibility. ② For the data plane, the ZK rewrite proof preserves client messages and permits additions only from the context-bound banks and at allowed positions. ③ The provider-issued serving certificate authenticates the request processed by the selected model's provider and the response it returned, establishing faithful relay. In the end, the client checks the proofs together with the serving certificate, addressing the three deviations shown in Fig. 1.

Theorem 1 (Informal). Under standard security assumptions for cryptographic primitives, assuming a complete, knowledge-sound, and zero-knowledge argument system and honest, non-colluding model providers, VERIROUTER is a verifiable routing protocol in the sense of Def. 1: every supported honest serving event is accepted, and whenever a client accepts, the selected model is eligible under the applicable model-selection mode, the model received an endorsed rewrite of the client's request, and the response is that model's output on it. The cryptographic evidence reveals no additional information about the router's private data.

Evaluation. We evaluate VERIROUTER on real-world RouteLLM [68] and MT-Bench-101 multi-turn conversations [5]. Model-selection and rewrite proofs take 21.92 s and 4.24 s on average, yielding 1,307×1,307 \times and 101×101 \times speedups over the fastest completing general-purpose zkVM baseline. Serving certificates require only 3.84 ms on average. Compared with LLM routing without verification, the stronger per-turn selection mode adds 4.08 s (14.24%), while session-pinned selection amortizes one proof across the conversation and adds only 0.11 s (0.38%) per turn. It also scales to 10M-node semantic search graphs and 16K-capacity rewrite banks while keeping final proofs near 0.15 MiB.

References (81)