refactor(server): serve libsy algorithms without profiles#98
Merged
Conversation
nachiketb-nvidia
force-pushed
the
nachiketb/libsy-server
branch
from
July 20, 2026 21:32
018f51d to
fbde70e
Compare
|
nachiketb-nvidia
force-pushed
the
nachiketb/libsy-server
branch
from
July 20, 2026 21:55
e7855c6 to
afe1dbe
Compare
grahamking
force-pushed
the
grclark/llm-client-crate
branch
from
July 21, 2026 16:45
ae15075 to
4ec1acf
Compare
nachiketb-nvidia
force-pushed
the
nachiketb/libsy-server
branch
from
July 21, 2026 21:04
f61aace to
48ee966
Compare
WalkthroughThe pull request replaces the Rust profile-config server with a libsy algorithm-based HTTP server, routes profile-config serving through Python, removes obsolete bindings, and updates Responses translation for signed reasoning and tool-call arguments. ChangesLibsy HTTP server
Responses translation contracts
Python profile-serving path
Estimated code review effort: 4 (Complex) | ~60 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
nachiketb-nvidia
force-pushed
the
nachiketb/libsy-server
branch
from
July 21, 2026 21:29
48ee966 to
6b79ac8
Compare
grahamking
approved these changes
Jul 21, 2026
Signed-off-by: nachiketb <nachiketb@nvidia.com>
Signed-off-by: nachiketb <nachiketb@nvidia.com>
Signed-off-by: nachiketb <nachiketb@nvidia.com>
Signed-off-by: nachiketb <nachiketb@nvidia.com>
nachiketb-nvidia
force-pushed
the
nachiketb/libsy-server
branch
from
July 21, 2026 21:37
6b79ac8 to
2425ab7
Compare
nachiketb-nvidia
enabled auto-merge (squash)
July 21, 2026 21:38
This was referenced Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replace the components-v2 profile server with a thin HTTP host for libsy algorithms.
ServerStatemaps route model IDs directly toArc<dyn Algorithm>values.--route MODEL=TARGET[,TARGET...]arguments create independent libsyRandomalgorithms over one shared
TranslatingLlmClient.through the selected algorithm, and encoded back to the caller's format.
switchyard-protocol::Metadata::from_headersand retained forupstream forwarding.
Python wrapper for the Rust server are removed.
switchyard serve --configremains on the existing Python FastAPI path instead of dispatchingprofile-only configs to Rust.
Provider-specific Responses tool-turn translation is intentionally split into #111.
Why
The Rust server should own HTTP transport and algorithm dispatch while libsy owns routing behavior.
Keeping YAML parsing, profile construction, and profile-specific state in the server duplicated the
old architecture and prevented the server from being a small host for arbitrary libsy algorithms.
How
Each inbound request selects an algorithm by its
model, translates the wire payload into a libsyrequest, calls
Algorithm::run, and converts the buffered or streaming result directly into an Axumresponse. The CLI currently builds uniform-random algorithms only; all configured targets share one
upstream base URL, API key, and wire format.
The server retains canonical HTTP errors, routing headers,
/v1/models,/health, TLS, streaming,and
--dry-run. The removed Rust stats endpoints depended on the deleted profile runtime and arenot part of the libsy server surface.
What to review
Algorithm::run-> direct buffered/SSE response conversion.Randomcorrectness.Validation
cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo test -p switchyard-server(7 passed)git diff --check origin/main#79 is merged and this branch is based directly on
main.