Switchyard lets LLM applications route traffic across models and providers while preserving native OpenAI and Anthropic API compatibility - enabling flexible model selection, benchmarking, and cost/performance optimization.
Rust
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
//! Process-local JSON stats accounting for the Rust server.
mod accumulator;
mod algorithms;
mod cache_eligibility;
pub(crate) use accumulator::{StatsAccumulator, StatsSnapshot, TokenUsage};
pub(crate) use cache_eligibility::{prefix_probe, tracking_enabled_from_env};