feat: migrate to Praxis filter-based proxy architecture#27
Open
franciscojavierarceo wants to merge 1 commit into
Open
feat: migrate to Praxis filter-based proxy architecture#27franciscojavierarceo wants to merge 1 commit into
franciscojavierarceo wants to merge 1 commit into
Conversation
bc59f20 to
acba3a5
Compare
Replace the Axum HTTP server with Praxis as the core proxy runtime. All request handling logic is now implemented as composable Praxis filters (responses_proxy, ogx_state, agentic_loop, tool_dispatch), wired together via YAML configuration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
acba3a5 to
a4f8dc1
Compare
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
Replaces the hand-rolled Axum proxy with Praxis, a composable filter-based reverse proxy framework built on Pingora. Each gateway concern — proxying, auth, state hydration, tool dispatch, agentic looping — is an independent filter wired together via YAML configuration.
Why Praxis
HttpFilterwith hooks for request/response. Filters don't know about each other.What changed
Filters introduced:
responses_proxy— setsctx.upstreamto vLLM's/v1/responsesendpoint and injects auth credentials. Praxis/Pingora handles the actual proxying and streaming natively.state_hydration— stub filter for conversation-state hydration. Inspects request body forprevious_response_idand will call the state store to hydrate conversation history.agentic_loop— stub filter for agentic re-inference. Inspects response body forfunction_calloutput items and will re-enter the inference loop.tool_dispatch— stub filter for tool execution. Inspects response body for tool calls and will dispatch them.Removed:
src/app.rs,src/proxy.rs,src/server.rs— replaced by filters + Praxis server runtimebenches/proxy_bench.rs— benchmark harness for the old Axum proxy (will be re-added)Dependencies:
praxis,praxis-proxy-core,praxis-proxy-filter,praxis-test-utils) via git at rev2f7ea31/v1are normalized to avoid/v1/v1/responsesdouble-prefixDocs:
README.mdwith architecture diagram, filter table, and run instructionsdocs/index.mdwith architecture overview and Praxis contextdocs/architecture/index.mdwith Mermaid diagram, filter pipeline reference, streaming details, and component descriptionsHealth endpoint:
admin: { address: "127.0.0.1:9901" }in config)Filter pipeline
Test plan
cargo buildsucceedscargo clippy --all-targets -- -D warningscleancargo fmt -- --checkcleanpre-commit run --all-filescleantest_non_stream_passthrough— JSON request/response round-triptest_stream_passthrough— SSE streaming passthroughtest_auth_injection— API key injected from configtest_client_auth_precedence— client-supplied auth preservedtest_vllm_http_error_passthrough— upstream 429 forwardedtest_mid_stream_failure_closes_cleanly— partial stream handledtest_connect_error_maps_to_502— unreachable vLLM returns 502