解决多服务商大模型路由中对话连续性丢失问题
ContinuityBench: A Benchmark and Systems Study of Stateful Failover in Multi-Provider LLM Routing

- 设计有状态代理,故障时转发对话历史实现无缝切换
- 实测99.2%对话内容保留率,远超无状态方案的近0%
- 适合构建高可用、体验流畅的大模型服务系统
在生产环境的大语言模型部署中,高API可用性并不等同于对话连续性。当主服务商出现中断或严格限流时,传统的无状态故障转移虽能保持服务在线,却会无声丢弃对话历史,严重破坏用户体验。为此,我们提出两个新指标:连续性保留率(CPR)和连续性延迟开销(CLO)。设计一种基于历史前传策略的有状态多服务商代理架构,可在故障转移时无缝重建跨异构模型端点的对话状态。同时发布continuity-bench(https://github.com/Vishal-sys-code/continuity-bench),一个开源评估工具,用于在高并发服务商故障场景下压力测试上下文保留能力。在750次故障事件的实测中,该有状态代理实现99.20%的CPR(95%置信区间:98.27%,99.63%),相比标准无状态架构近乎0%的保留率显著提升。此外,我们分析了故障转移延迟分布,揭示异步指数退避加抖动对防止严格限流备用接口的级联重试风暴至关重要。研究为构建稳健、保持状态的多模型推理系统提供了理论基础。
原文摘要 · Abstract (English)
In production large language model (LLM) deployments, high API availability guarantees do not equate to conversational continuity. When a primary provider experiences an outage or strict rate-limiting, naive stateless failover mechanisms successfully maintain uptime but silently discard conversation history, severely disrupting the user experience. To rigorously quantify and resolve this failure mode, we introduce two novel metrics: Continuity Preservation Rate (CPR) and Continuity Latency Overhead (CLO). We propose a stateful, multi-provider proxy architecture utilizing a History-Forwarding strategy to seamlessly reconstruct conversational state across heterogeneous LLM endpoints during failover events. Furthermore, we release continuity-bench, https://github.com/Vishal-sys-code/continuity-bench, an open evaluation harness designed to stress-test context preservation under high-concurrency provider failure conditions. Our empirical evaluation ($N=750$ failover events) demonstrates that our stateful proxy achieves a 99.20\% CPR [95\% CI: 98.27\%, 99.63\%], cleanly transferring deep conversational context to fallback providers, compared to a near-0\% preservation rate for standard stateless architectures. Finally, we characterize failover latency distributions, identifying the critical necessity of asynchronous exponential backoff with jitter to prevent cascading retry storms against strict-limit fallback APIs. Our results provide a principled foundation for building robust, state-preserving multi-model inference systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。