Skip to content

refactor(responses): migrate the single-pass example chains to one parse - #1375

Open
cdoern wants to merge 1 commit into
praxis-proxy:mainfrom
cdoern:refactor/responses-migrate-remaining-chains
Open

cdoern wants to merge 1 commit into
praxis-proxy:mainfrom
cdoern:refactor/responses-migrate-remaining-chains

Conversation

@cdoern

@cdoern cdoern commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Progresses #741. Independent of #1374 — they touch disjoint files and neither needs the other.

Change

Swap openai_responses_format for openai_responses_request in the nine example chains that classify only Responses traffic, so each create body is parsed once rather than twice.

Migrated: response-store, response-store-postgres-mtls, responses-routing, vllm-agentic-api, doc-extract, file-resolve, model-rewrite, http-passthrough, mcp-outbound-chain.

One chain needed more than a rename

responses-routing branches on the classifier's published results. A branch condition must name the filter it is attached to, since every other filter's results are cleared before it is evaluated, so renaming the filter alone left a condition that could never match.

Configuration validation rejects this at load with an explicit message rather than failing silently at runtime, which is how it surfaced:

branch 'stateful': on_result.filter 'openai_responses_format' must name the filter
the branch is attached to ('openai_responses_request')

Worth knowing for the chains still to migrate: a rename is not always sufficient, and the failure is loud rather than silent.

Not migrated, and why

Nineteen example chains still run the previous pair. They are not mechanical swaps:

  • Three use the classifier for non-Responses traffic — unified-gateway, format-routing, and time-to-first-token classify Anthropic and Chat Completions bodies. openai_responses_request recognizes Responses operations only, so these need the Chat Completions registry work in feat(chat-completions): register operations for request-head classification #1048 rather than a swap.
  • The translation chains rewrite the path away from /v1/responses, so head-based matching no longer recognizes the operation when the chain re-enters. That is a design problem, not a configuration one.
  • The agentic-loop chains follow the translation work.

Verification

Full integration suite: 754 passed. The 26 failures are all examples::openai_agentic_loop, which fail identically on this machine without these changes and pass in CI; none are attributable to this change.

Unit tests 4513 pass, 0 fail. make lint passes, including the lean build and generated-doc sync checks.

Checklist

  • Unit tests
  • Integration tests
  • Example config in examples/configs/
  • Functional integration test for the example config
  • Generated filter documentation regenerated

Swap `openai_responses_format` for `openai_responses_request` in the nine
example chains that classify only Responses traffic, so each create body
is parsed once instead of twice.

`responses-routing` also needed its `on_result` branch retargeted. A
branch condition must name the filter it is attached to, because every
other filter's results are cleared before it is evaluated, so the rename
alone left a condition that could never match. Configuration validation
rejects that at load rather than failing silently at runtime, which is
how it surfaced.

Chains left on the previous pair need more than a swap. Three use the
classifier for Anthropic and Chat Completions traffic, which this filter
does not handle, and the translation chains rewrite the path away from
`/v1/responses` so the operation is no longer recognizable on re-entry.

Signed-off-by: Charlie Doern <cdoern@redhat.com>
@cdoern
cdoern requested review from a team and franciscojavierarceo September 25, 2026 17:30
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