Repository navigation
test: compare LLM HTTP gateways under equal resource budgets - #1205
Merged
Merged
Conversation
…-20261116 docs(design): evaluate local-first Rust architecture and agent runtimes
…-comparison-20261116 test(benchmark): measure live-model native Rust, Rig and Deep Agents
…functional-20261116 test: qualify agent parity and separate Python/Rust runtime costs
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.
Summary
Add an isolated HTTP-only comparison of LangChain ChatOpenAI, direct Python HTTPX, and a native Rust calling flow served by Axum/reqwest. All send the same complete Responses request and require observed provider completion, exact streamed text and model identity.
The primary cohort contains 12 direct real-model calls and 1,800 immediate response-replay calls. A separate 17,784-call paced replay ramp verifies identical one-CPU/256 MiB/zero-swap/8,192-FD budgets across 63 cells. Largest tested concurrency meeting the predeclared success ≥99%, p95 ≤3s threshold in every repeat: LangChain 64, direct Python 128, Rust 512. Rust passed the test ceiling; this is not its maximum capacity or real-provider throughput.
Changes
Measured results and limitations · Reproduction · CHAGELOG.md
Intent
User-requested fair HTTP calling comparison following the separate agent-level work in #1204. No product runtime, deployment, agent feature/maturity or release change.
Blast radius
Diff budget
End-to-end verification
Executed tests/llm_http/run.py against the actual HTTPS provider and the Axum replay fixture: all 12 primary live calls report gpt-6.1-sol and 44/19/63 tokens; all 1,800 replay calls have matching outbound/upstream counts. Each gateway rejects an actual 400 and a truncated stream after one attempt. Export validation independently checks observed text/deltas/model/usage, current source and release-binary hashes, CPU affinity and warm provider TCP socket reuse.
Executed tests/llm_http/scale.py using user-systemd cgroup v2 services: 63/63 cells, 17,784/17,784 qualified stress calls, 1,976 driver-baseline calls and nine warmups. Kernel budget values, fresh service PIDs, FD limits, fixture affinity and equal upstream counts were verified. All transient services/processes were stopped. Both exporters also rejected actual interrupted evidence. Exact commands and raw archives are linked in the report.
Rust release build and release clippy -- -D warnings (both --locked with the manifest under tests/llm_http/rust) ran through /home/catow/.local/bin/with-build-slot; cargo fmt --check passed. make ci-lint passes with 0 type errors/949 reported warnings. Separate typing of all five benchmark Python files has 0 errors/0 warnings. uv run pytest tests/ -q: 37 passed, 0 skipped.
Limits
Only three warm live samples per candidate; no reliable live latency winner. Actual completion medians were 1.937s/1.641s/2.073s while CPU and RSS were lower in Rust. The concurrent ramp uses synthetic waiting with captured response content, not additional LLM calls. The shared WSL host is not a reserved physical core. Complete HTTP stacks differ, so the results do not isolate language, GIL or one pool algorithm. No multicore, long-output/backpressure, client cancellation, rate-limit recovery or memory-capacity ceiling claim. No OOM was observed.
GitHub Actions is not claimed: user-reported billing limits require local evidence. Product make quality/smoke and UI checks were not run for this isolated benchmark addition.
Testing
Quality Bar self-check
Integration review — 2026-11-17
Integrated latest main
0455ebcdwhile preserving all original measurement source/binary hashes and history. Reviewed every added source, report and locked dependency set. Both published summaries exactly match independent recomputation from the complete original 12 live, 1,800 replay, six rejection and 17,784 ramp request records (all 63 cells). No new live calls were required.Fresh review execution passes 1,800 real-HTTP replay calls and six rejection/truncation checks, one attempt per call, process exit0. Used
with-build-slotand the independently hash-verified unchanged release binary. Root tests: 43 passed / 0 skipped, exit0. Canonical lockedmake ci-lint: Ruff and format940files pass, type gate 0 errors / 964 warnings. Fixture-only typing 0 errors / 0 warnings, Cargo fmt exit0. Review timings on the shared host are functional qualification and do not replace original performance measurements; the full paced ramp was independently validated from its original archive, not rerun.Separate public review evidence:
review-20261117.json.gz, SHA256383c53e3dad2d72d69e72cc6df9052accd3a5c9b91eb4412dff513a82c6f68f5. Updated CHAGELOG.md. No product runtime, API, version or deployment change. Hosted checks are qualified only after actual exact-head inspection.