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) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
schema_version = 1
# Native Switchyard runner configuration.
# This StageRouter policy makes no routing-time model calls.
[llm_clients.dynamo]
format = "openai_chat"
base_url = "http://switchyard-gateway/v1"
[targets.qwen-small]
id = "Qwen/Qwen3-0.6B"
llm_client = "dynamo"
[targets.qwen-large]
id = "Qwen/Qwen3-1.7B"
llm_client = "dynamo"
[routes.stage]
id = "auto"
type = "stage_router"
efficient_target = "qwen-small"
capable_target = "qwen-large"
picker = "efficient_first"
confidence_threshold = 0.5