fix(file-resolve): make outbound_chain optional to match callout filters - #1235
Merged
Merged
Conversation
PR praxis-proxy#1186 made openai_file_resolve's `outbound_chain` effectively required: registration failed the pipeline build when the key was omitted. The sibling SSRF-hardening filter openai_file_search_callout (PR praxis-proxy#1185) treats the chain as optional, defaulting to an empty inline passthrough. Align file_resolve with that pattern so all three outbound callout filters share identical handling. - config: `outbound_chain` is now `#[serde(default = ...)] ChainRef` defaulting to an empty inline passthrough chain (was `Option<ChainRef>`). - mod: `outbound_chain_ref` returns the resolved `ChainRef`, not an `Option`. - register: drop the "outbound_chain is required" gate; the defaulted chain binds and callouts still route through the bound pipeline. A provided-but-unbuildable chain still fails the build. - Regenerated the openai_file_resolve filter docs. An omitted chain still routes file_id callouts through the bound outbound pipeline with allow_private_upstreams enforcement, identical to file_search_callout, so SSRF protection is unchanged. file_resolve continues to accept named chains because it runs at the top pipeline level, not nested inside an iterative_request_router step. Refs praxis-proxy#1186 Signed-off-by: Sébastien Han <seb@redhat.com>
leseb
enabled auto-merge
September 18, 2026 08:53
franciscojavierarceo
approved these changes
Sep 18, 2026
franciscojavierarceo
left a comment
Contributor
There was a problem hiding this comment.
reviewed the current head against main and the existing review context. the config defaulting, registration path, and focused tests are consistent with the file-search callout pattern. no actionable correctness, security, or architectural issues found, and no inference recording is needed for this deterministic config/registration change.
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
PR #1186 made
openai_file_resolve'soutbound_chaineffectively required — registration failed the pipeline build whenever the key was omitted — which diverged from the sibling SSRF-hardening filteropenai_file_search_callout(PR #1185) that treats the chain as optional and defaults it to an empty inline passthrough. This change makesoutbound_chainoptional onopenai_file_resolvetoo (#[serde(default)]→ empty inline passthrough chain), so all three outbound-callout filters (openai_web_search,openai_file_search_callout,openai_file_resolve) share one identical pattern. An omitted chain still routes configuredfile_idcallouts through the bound outbound pipeline withallow_private_upstreamsenforcement, so SSRF protection is unchanged; a provided-but-unbuildable chain still fails the build.file_resolvecontinues to accept named chains because it runs at the top pipeline level, not nested inside aniterative_request_routerstep.Related issue
Refs #1186
Validation
cargo test -p praxis-ai-apis -- file_resolve(252 passed),cargo test -p praxis-ai-filters -- register(7 passed, incl. newfile_resolve_binds_when_outbound_chain_omittedandfile_resolve_rejects_unbuildable_outbound_chain)build_with_chainsproves an omitted chain binds and an unbuildable chain fails closed; existingexamples/configs/openai/responses/file-resolve.yamlremains validmake lint(exit 0),make doc(exit 0),make build(exit 0)Checklist
outbound_chainand stays valid.docs/filters/openai_file_resolve.md).Signed-off-bytrailer.Breaking changes
None — strictly permissive. A configuration that previously failed the build (omitting
outbound_chain) now succeeds with an empty inline passthrough default; configurations that already specifyoutbound_chainare unaffected.