Add responses_format classifier filter for AI API body-aware routing#372
Open
nerdalert wants to merge 1 commit into
Open
Add responses_format classifier filter for AI API body-aware routing#372nerdalert wants to merge 1 commit into
nerdalert wants to merge 1 commit into
Conversation
Collaborator
PR too largeThis PR adds 2100 lines (limit: 500). Large PRs are difficult to review and more likely to introduce subtle bugs. Please break this contribution into smaller, focused PRs that each address a single concern. See our coding conventions for guidance.
|
a908123 to
db27174
Compare
shaneutt
requested changes
May 21, 2026
032a241 to
bf97d1e
Compare
Add responses_format body classifier for AI routing Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
bf97d1e to
f893be7
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
This is the first in a stacked implementation for Epic #354, “Responses API and Agentic Loop Orchestration.” It establishes the body-aware routing foundation that later PRs will build on for Responses orchestration, state, tool calls, and streaming. This is long but want to add some framing here.
responses_formatbuilt-in HTTP filter that classifies request bodies as Responses API (input), Chat Completions (messages), unknown JSON, invalid JSON, or non-JSONformat,model,stream,store,previous_response_idpresence,conversationpresence) to internal routing headers(
x-praxis-ai-*), durable metadata, and filter resultsfilter_resultsfrom pre-read body inspection into request-phase branch evaluation soon_resultcan route using classifier outputReadOnlyaccess withStreamBufferon_invaliddefaults tocontinuefor mixed-traffic listeners; configurable torejectfor AI-only listenersArchitectural callouts worth mentioning:
This PR lays the pre-upstream classification and policy-routing groundwork for a future agentic Responses orchestrator, while keeping the actual model/tool.
loop out of branch re-entry because that lifecycle needs response-aware orchestration.
x-praxis-ai-* internal headers for router matching, durable metadata for later lifecycle phases, and filter_results for branch-chain decisions.
Test plan
responsesresponsesmessagesclassified aschat_completionsunknownon_invalid: rejecton_invalidon_invalid: rejectmodelvalues are not promotedresponsesvschat_completionsvs default)filter_resultsviaon_resultx-praxis-ai-*headers stripped before upstreamall_example_configs_parse)Issues: Responses API format detection and routing #361, partial OpenAI Responses API: stateless pass-through mode #355, part of Epic: Responses API and Agentic Loop Orchestration #354