Skip to content

Commit b104765

Browse files
refactor(python): remove deprecated server stack (#343)
Signed-off-by: nachiketb <nachiketb@nvidia.com>
1 parent 6df31a9 commit b104765

241 files changed

Lines changed: 325 additions & 41894 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/switchyard-stage-router-scorer/SKILL.md

Lines changed: 0 additions & 97 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Minimal steps to reproduce. Include the command line, the inbound request shape,
1616

1717
```bash
1818
# example
19-
switchyard serve --routes examples/route.yaml --port 4000
19+
switchyard-server --config routes.toml --port 4000
2020
curl -s http://localhost:4000/v1/chat/completions -d '{"model":"...","messages":[...]}'
2121
```
2222

.github/workflows/ci.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ jobs:
168168
runs-on: ubuntu-latest
169169
env:
170170
SWITCHYARD_DEFAULT_PACKAGE: "nemo-switchyard @ file://${{ github.workspace }}"
171-
SWITCHYARD_EXTRAS_PACKAGE: "nemo-switchyard[cli,server] @ file://${{ github.workspace }}"
171+
SWITCHYARD_EXTRAS_PACKAGE: "nemo-switchyard[cli] @ file://${{ github.workspace }}"
172172
steps:
173173
- uses: actions/checkout@v4
174174
- uses: astral-sh/setup-uv@v6
@@ -213,7 +213,7 @@ jobs:
213213
sys.exit(f"FAIL: heavy packages pulled into slim install: {extras}")
214214
print(f"OK: all {len(forbidden)} heavy packages absent from slim install.")
215215
PY
216-
- name: Verify CLI and server imports work with extras
216+
- name: Verify CLI works with its extra
217217
working-directory: /tmp
218218
run: |
219219
uv run --isolated --no-project --python 3.12 \
@@ -225,9 +225,6 @@ jobs:
225225
uv run --isolated --no-project --python 3.12 \
226226
--with "${SWITCHYARD_EXTRAS_PACKAGE}" \
227227
switchyard launch claude --help 2>&1 | grep -q -- '--config' || { echo 'FAIL: --config flag missing from help'; exit 1; }
228-
uv run --isolated --no-project --python 3.12 \
229-
--with "${SWITCHYARD_EXTRAS_PACKAGE}" \
230-
switchyard serve --help > /dev/null
231228
232229
# Single required check for branch protection. Gates on every job above so
233230
# the ruleset never needs editing when jobs are added or renamed.

.github/workflows/perf.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ jobs:
5555
run: uv pip install aiperf
5656

5757
# ------------------------------------------------------------------
58-
# Start a local zero-latency mock OpenAI upstream. This replaces the
59-
# The proxy serves a real `type: passthrough` chain that
58+
# Start a local zero-latency mock OpenAI upstream. The proxy serves a
59+
# real `type: passthrough` route that
6060
# forwards to this loopback stub, which returns a fixed completion
6161
# instantly. The extra loopback hop adds a small constant overhead.
6262
# ------------------------------------------------------------------
@@ -127,21 +127,30 @@ jobs:
127127
echo "STUB_PID=$!" >> "$GITHUB_ENV"
128128
129129
# ------------------------------------------------------------------
130-
# Start the proxy: a `type: passthrough` route pointed at the local stub.
130+
# Build and start the native proxy against the local stub.
131131
# ------------------------------------------------------------------
132+
- name: Build switchyard server
133+
run: cargo build --locked --release -p switchyard-server
134+
132135
- name: Start switchyard proxy
133136
run: |
134-
cat > bench.yaml <<YAML
135-
defaults:
136-
api_key: dummy
137-
base_url: http://localhost:$STUB_PORT/v1
138-
format: openai
139-
routes:
140-
mock-model:
141-
type: passthrough
142-
target: mock-model
143-
YAML
144-
uv run switchyard serve --routes bench.yaml --port $PROXY_PORT &
137+
cat > bench.toml <<TOML
138+
schema_version = 1
139+
140+
[llm_clients.stub]
141+
format = "openai_chat"
142+
base_url = "http://localhost:$STUB_PORT/v1"
143+
144+
[targets.mock]
145+
id = "mock-model"
146+
llm_client = "stub"
147+
148+
[routes.mock]
149+
id = "mock-model"
150+
type = "passthrough"
151+
target = "mock"
152+
TOML
153+
target/release/switchyard-server --config bench.toml --port $PROXY_PORT &
145154
echo "PROXY_PID=$!" >> "$GITHUB_ENV"
146155
147156
- name: Wait for proxy to be ready

0 commit comments

Comments
 (0)