Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion crates/switchyard-py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ serde_json = "1"
switchyard-core = { path = "../switchyard-core" }
switchyard-components = { path = "../switchyard-components" }
switchyard-components-v2 = { path = "../switchyard-components-v2" }
switchyard-server = { path = "../switchyard-server" }
switchyard-translation = { path = "../switchyard-translation" }
tokio = { version = "1", features = ["rt", "rt-multi-thread", "sync"] }
tracing = { version = "0.1", default-features = false, features = ["std"] }
2 changes: 0 additions & 2 deletions crates/switchyard-py/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ mod errors;
mod libsy_bindings;
mod profile_bindings;
mod py_serde;
mod server_bindings;
mod translation;

#[pymodule]
Expand All @@ -20,6 +19,5 @@ fn _switchyard_rust(module: &Bound<'_, PyModule>) -> PyResult<()> {
component_bindings::register(module)?;
libsy_bindings::register(module)?;
profile_bindings::register(module)?;
server_bindings::register(module)?;
Ok(())
}
60 changes: 0 additions & 60 deletions crates/switchyard-py/src/server_bindings.rs

This file was deleted.

7 changes: 3 additions & 4 deletions crates/switchyard-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[package]
name = "switchyard-server"
version = "0.1.0"
description = "Rust HTTP server surface for Switchyard profiles"
description = "Rust HTTP server surface for libsy algorithms"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand All @@ -18,10 +18,9 @@ axum-server = { version = "0.8", features = ["tls-rustls"] }
rustls = { version = "0.23" }
clap = { version = "4", features = ["derive", "env"] }
futures-util = "0.3"
serde = { version = "1", features = ["derive"] }
libsy = { package = "switchyard-libsy", path = "../libsy" }
switchyard-llm-client = { path = "../libsy-llm-client" }
serde_json = "1"
switchyard-components-v2 = { path = "../switchyard-components-v2" }
switchyard-core = { path = "../switchyard-core" }
switchyard-translation = { path = "../switchyard-translation" }
tokio = { version = "1", features = ["macros", "net", "rt-multi-thread", "signal"] }
tracing = { version = "0.1", default-features = false, features = ["std"] }
Expand Down
15 changes: 15 additions & 0 deletions crates/switchyard-server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# switchyard-server

`switchyard-server` exposes libsy algorithms through OpenAI Chat Completions, OpenAI Responses,
and Anthropic Messages endpoints. The current CLI builds uniform-random routes over one shared
upstream backend.

```bash
cargo run -p switchyard-server -- \
--route switchyard/general=model/a,model/b \
--route switchyard/coding=model/c,model/d \
--base-url https://example.com/v1 \
--api-key "$API_KEY"
```

Select a route by sending its `switchyard/*` ID as the request's `model`.
Loading
Loading