Skip to content

Commit 8888492

Browse files
authored
feat: Extract from switchyard-server into switchyard-runner (#517)
* feat: Extract from switchyard-server into switchyard-runner These pieces will be shared by integrations, particularly the NeMo-Relay plugin. Implements: #514 Assisted-by: Codex:5.6 Sol high Assisted-by: Claude:Opus 5 medium Signed-off-by: Graham King <grahamk@nvidia.com>
1 parent 053a61e commit 8888492

14 files changed

Lines changed: 3176 additions & 2497 deletions

File tree

Cargo.lock

Lines changed: 19 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ members = [
88
"crates/libsy-llm-client",
99
"crates/switchyard-py",
1010
"crates/protocol",
11+
"crates/switchyard-runner",
1112
"crates/switchyard-server",
1213
"crates/switchyard-skill-distillation",
1314
"crates/switchyard-soak",
@@ -40,6 +41,7 @@ serde_json = { version = "1", features = ["preserve_order"] }
4041
switchyard-libsy = { path = "crates/libsy", version = "0.2.0" }
4142
switchyard-llm-client = { path = "crates/libsy-llm-client", version = "0.2.0" }
4243
switchyard-protocol = { path = "crates/protocol", version = "0.2.0" }
44+
switchyard-runner = { path = "crates/switchyard-runner", version = "0.2.0" }
4345
switchyard-server = { path = "crates/switchyard-server", version = "0.2.0" }
4446
switchyard-translation = { path = "crates/switchyard-translation", version = "0.2.0" }
4547
thiserror = "2"

crates/switchyard-py/src/server_bindings.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,8 @@ impl PyServer {
4444
.map_err(|error| ServerConfigError::new_err(error.to_string()))?;
4545
let caller_auth_by_model = state
4646
.models()
47-
.map(|model| {
48-
state
49-
.caller_auth_kind(model)
50-
.map(|kind| (model.to_string(), kind))
51-
})
52-
.collect::<ServerResult<HashMap<_, _>>>()
53-
.map_err(server_error)?;
47+
.map(|model| (model.to_string(), state.caller_auth_kind(model)))
48+
.collect::<HashMap<_, _>>();
5449
let runtime = pyo3_async_runtimes::tokio::get_runtime();
5550
let server = {
5651
let _guard = runtime.enter();
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
[package]
5+
name = "switchyard-runner"
6+
version.workspace = true
7+
description = "Configured routing execution for Switchyard serving surfaces"
8+
authors.workspace = true
9+
edition.workspace = true
10+
homepage = "https://github.com/NVIDIA-NeMo/Switchyard"
11+
license.workspace = true
12+
repository.workspace = true
13+
rust-version.workspace = true
14+
publish = ["crates-io"]
15+
16+
[dependencies]
17+
libsy = { package = "switchyard-libsy", path = "../libsy", version = "0.2.0" }
18+
reqwest.workspace = true
19+
serde.workspace = true
20+
serde_json.workspace = true
21+
switchyard-llm-client.workspace = true
22+
switchyard-protocol.workspace = true
23+
thiserror.workspace = true
24+
toml = "1.1"
25+
tracing.workspace = true
26+
27+
[dev-dependencies]
28+
async-trait.workspace = true
29+
futures-util.workspace = true
30+
tokio.workspace = true

0 commit comments

Comments
 (0)