Skip to content

Share Responses body size limits#701

Merged
shaneutt merged 2 commits into
mainfrom
codex/issue-213-responses-body-limits
Jun 23, 2026
Merged

Share Responses body size limits#701
shaneutt merged 2 commits into
mainfrom
codex/issue-213-responses-body-limits

Conversation

@franciscojavierarceo

@franciscojavierarceo franciscojavierarceo commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Part of #213.

Summary

  • add a shared Responses body-size alias for filters that inspect or transform Responses request bodies
  • switch Responses validation to the shared 64 MiB Responses limit
  • keep the format classifier on the generic JSON inspection default

Stack

Validation

  • cargo test -p praxis-proxy-filter --lib --features ai-inference openai::responses
  • cargo test -p praxis-tests-integration openai_responses_to_chat_completions
  • make lint

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>

@praxis-bot praxis-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Share Responses body size limits

Clean constant-extraction refactor. The validate filter's local 64 MiB constant moves to the shared body/limits.rs module as OPENAI_RESPONSES_BODY_MAX_BYTES, and the format classifier's local 10 MiB constant is replaced by the existing shared DEFAULT_JSON_BODY_MAX_BYTES. No behavioral changes.

Severity Count
Medium 1

The OPENAI_RESPONSES_BODY_MAX_BYTES re-export in body/mod.rs bypasses limits -- consumers can import from body::OPENAI_RESPONSES_BODY_MAX_BYTES instead of body::limits::OPENAI_RESPONSES_BODY_MAX_BYTES. The store filter already imports MAX_JSON_BODY_BYTES directly from body::limits:: (line 60 of store/filter.rs), so the two access patterns are inconsistent across the codebase. Not blocking, but worth aligning in a follow-up.

Comment thread filter/src/body/mod.rs Outdated
@github-project-automation github-project-automation Bot moved this to Backlog in AI Gateway Jun 23, 2026
@shaneutt shaneutt moved this from Backlog to Review in AI Gateway Jun 23, 2026
@shaneutt shaneutt added this to the v0.4.0 milestone Jun 23, 2026
Comment thread filter/src/body/limits.rs Outdated
…imports

Remove the OPENAI_RESPONSES_BODY_MAX_BYTES constant (identical alias
of MAX_JSON_BODY_BYTES) and unify all body-limit imports through the
body:: re-export facade. Make the limits module private since no
consumer needs to reach into it directly.

Signed-off-by: Francisco Javier Arceo <francisco.arceo@gmail.com>
@shaneutt shaneutt enabled auto-merge (squash) June 23, 2026 21:06
@shaneutt shaneutt merged commit d1fe779 into main Jun 23, 2026
16 checks passed
@shaneutt shaneutt deleted the codex/issue-213-responses-body-limits branch June 23, 2026 21:12
@github-project-automation github-project-automation Bot moved this from Review to Done in AI Gateway Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants