Skip to content

docs(examples): gate full-flow-agentic translation on selected upstream (praxis#1241) - #1271

Draft
leseb wants to merge 1 commit into
praxis-proxy:mainfrom
leseb:leseb/agentic-yaml-translation-conditions
Draft

leseb wants to merge 1 commit into
praxis-proxy:mainfrom
leseb:leseb/agentic-yaml-translation-conditions

Conversation

@leseb

@leseb leseb commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

What

Draft the full-flow-agentic Responses gateway so one pipeline adapts to whichever inference upstream the load balancer selects, using the new selected_upstream filter condition from praxis-proxy/praxis#1241 (matches the selected cluster's typed http.application_protocol / http.application_provider).

Only examples/configs/openai/responses/full-flow-agentic.yaml changes.

Tracking: praxis-proxy/praxis#1141 — this PR is the Praxis AI functional example the issue calls for. Note it is cross-repo, so merging this PR will link but not auto-close #1141; that issue must be closed manually once the remaining acceptance criteria (integration test, generated-doc sync, streaming/agentic coverage) also land.

How

Inside the IRR inference step, the protocol-adaptive body builders now run after the step's unconditional load_balancer, each gated on the selected upstream's protocol:

Filter Gate
openai_responses_proxy when application_protocol: openai_responses (native)
responses_to_chat_completions when application_protocol: openai_chat_completions (vLLM/chat)
path_rewrite (/v1/responses/v1/chat/completions) when application_protocol: openai_chat_completions (+ POST path)
  • The inference cluster declares http: { application_protocol: openai_responses, application_provider: openai } by default, with a commented openai_chat_completions/vllm variant — flip that block to switch the whole gateway's protocol without touching the pipeline.
  • selected_upstream fails closed, so exactly one body builder fires per request (declare the protocol or neither runs).
  • openai_stream_events stays first and unconditional, with limits pinned at/above the converter's bounds so no client-visible frame is dropped from the store.
  • Header comments (canonical filter order, step 11, a new "Protocol-adaptive translation" note, and the direct-OpenAI variant) updated to stay truthful.

Why this ordering

praxis#1241 rejects a selected_upstream-gated filter unless an unconditional load balancer is guaranteed to run before it on every reachable path. Each IRR step is validated as its own isolated linear pipeline, and the step's load_balancer must live inside the step — so the gated builders go after it. At runtime the body builders' on_request_body runs after upstream selection and before dispatch, the correct window to read the selected cluster's protocol; keeping openai_stream_events first means the Chat→Responses translator runs before it on the response phase (which it requires).

Status — DRAFT / WIP

praxis-proxy/praxis#1241 is not yet merged. Until the pinned praxis-core rev in the root Cargo.toml is bumped to include it, the selected_upstream condition is unknown to the config parser and CI will fail. This PR is intentionally forward-looking and should land only after the praxis bump.

Draft the full-flow-agentic Responses gateway so a single pipeline adapts
to whichever inference upstream the load balancer selects, using the
`selected_upstream` filter condition from praxis-proxy/praxis#1241.

Inside the IRR inference step the protocol-adaptive body builders now run
AFTER the step's unconditional load_balancer (praxis#1241 rejects a
selected_upstream-gated filter unless a load balancer is guaranteed to run
before it on every reachable path; each IRR step is validated as its own
isolated linear pipeline):

- openai_responses_proxy         when application_protocol=openai_responses
- responses_to_chat_completions  when application_protocol=openai_chat_completions
- path_rewrite                   when application_protocol=openai_chat_completions

The inference cluster declares http.application_protocol/application_provider
(default native openai_responses/openai, commented openai_chat_completions/vllm
variant); flip that block to switch protocols without editing the pipeline.
selected_upstream fails closed, so exactly one body builder fires per request.
openai_stream_events stays first and unconditional, with limits pinned at or
above the converter's bounds so no client-visible frame is dropped from the
store. Header comments (canonical order, step 11, a new protocol-adaptive
note, and the direct-OpenAI variant) are updated to stay truthful.

WIP: praxis-proxy/praxis#1241 is not yet merged, so until the pinned
praxis-core rev in the root Cargo.toml includes it the selected_upstream
condition is unknown to the parser and CI will fail. Draft only.

Signed-off-by: Sébastien Han <seb@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant