feat(filters): add grid_route#339
Open
nerdalert wants to merge 2 commits into
Open
Conversation
nerdalert
force-pushed
the
grid-route
branch
2 times, most recently
from
July 16, 2026 01:55
1ad1e9f to
acd6e4a
Compare
nerdalert
force-pushed
the
grid-route
branch
4 times, most recently
from
July 23, 2026 14:23
44c354a to
ad0b52e
Compare
nerdalert
marked this pull request as ready for review
July 23, 2026 15:09
praxis-bot
reviewed
Jul 23, 2026
praxis-bot
left a comment
Collaborator
There was a problem hiding this comment.
Review: feat(filters): add grid_route
Clean, well-structured PR. The filter design is sound: static candidate scoring, deterministic selection, MCP precedence over model header, proper fail-closed behavior. Validation is thorough (bounds on all identifiers, reserved header prefix rejection, duplicate detection). Unit test coverage in route.rs and descriptor.rs is excellent.
Findings
| Severity | Count |
|---|---|
| Critical | 0 |
| Large | 0 |
| Medium | 1 |
One medium finding below regarding test coverage for the MCP example config.
Add AI-owned grid_route inference and MCP tool routing under praxis-ai-filters and register it from praxis-ai-proxy. The filter selects ctx.cluster from static candidates, prefers fresh candidates over stale, applies local-site preference on equal freshness, and routes MCP tools/call by mcp metadata with precedence over model-header routing. Add docs, examples, and schema coverage for the new filter. Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
Add an end-to-end schema test for the MCP grid_route example. The test runs the mcp filter, routes a tools/call request through grid_route, and verifies the selected tool-owning backend responds. Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
This was referenced Jul 24, 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.
Summary
Adds
grid_routetopraxis-ai-filtersand registers it frompraxis-ai-proxy.Architecturally, this is the AI/Grid-owned routing filter that consumes a static site/capability descriptor and selects the upstream cluster for the request. The Grid operator can render candidate overlays from provider state, and the AI proxy can consume those candidates without requiring Praxis core to understand models, tools, sites, freshness, or Grid-specific routing policy.
This keeps the split intentional:
load_balancer.In a gateway pipeline,
grid_routesits after request classification and beforeload_balancer:grid_routeis the cluster-selecting filter for this path. It writes ctx.cluster, and load_balancer forwards to that selected cluster. No router filter is required between them.What changed
Boundary
This PR keeps AI/Grid-specific semantics in the AI repo:
Praxis core remains responsible for generic proxy primitives:
Additional reviewer context
This PR adds the Praxis AI
grid_routefilter, which is the request-time half of the Grid routing handoff.Grid does not route live HTTP requests itself. Grid renders a routing overlay from
GridNetwork,GridSite,InferenceProvider, metrics, SWIM/CRDT state, and access-policy decisions. Praxis AI then consumes that overlay throughgrid_route.Grid side quests:
Grid architecture overview:
https://github.com/praxis-proxy/grid/blob/main/docs/architecture/overview.md
Routing architecture and overlay handoff:
https://github.com/praxis-proxy/grid/blob/main/docs/architecture/routing.md
Consumer ConfigMap /
grid-config.jsonhandoff:https://github.com/praxis-proxy/grid/blob/main/docs/architecture/consumer-config.md
Scoring model that determines overlay candidate order:
https://github.com/praxis-proxy/grid/blob/main/docs/architecture/scoring.md
Credential and auth boundary:
https://github.com/praxis-proxy/grid/blob/main/docs/architecture/auth.md
Kind/E2E validation docs:
https://github.com/praxis-proxy/grid/blob/main/docs/architecture/ci-kind-e2e.md
Grid README with current validation commands:
https://github.com/praxis-proxy/grid/blob/main/README.md
Grid/Praxis AI responsibility split:
grid_routecandidate selection, and forwarding to a preconfiguredload_balancercluster.grid_routedoes not call Kubernetes, Grid, SWIM, or CRDT at request time.grid_routedoes not create upstream clusters dynamically. Any cluster named by a Grid candidate must already exist in the Praxis AIload_balancerconfig.grid_credential_injectpath.Validation