Skip to content

Conversation

@michaelfeil
Copy link
Contributor

@michaelfeil michaelfeil commented Jan 8, 2026

Signed-off-by: michaelfeil me@michaelfeil.eu

Overview:

I am hunting down a memory bug. This is super uncritical, but using usize::max here is not appropriate for error messages.

Details:

Where should the reviewer start?

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

Summary by CodeRabbit

  • Bug Fixes
    • Improved error response handling by implementing configurable limits on HTTP response body sizes, enhancing system stability and performance when processing error responses.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: michaelfeil <me@michaelfeil.eu>
@michaelfeil michaelfeil requested a review from a team as a code owner January 8, 2026 10:52
@copy-pr-bot
Copy link

copy-pr-bot bot commented Jan 8, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

👋 Hi michaelfeil! Thank you for contributing to ai-dynamo/dynamo.

Just a reminder: The NVIDIA Test Github Validation CI runs an essential subset of the testing framework to quickly catch errors.Your PR reviewers may elect to test the changes comprehensively before approving your changes.

🚀

@github-actions github-actions bot added the external-contribution Pull request is from an external contributor label Jan 8, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 8, 2026

Walkthrough

The pull request modifies HTTP response body limit handling in the OpenAI service middleware. Specifically, it replaces an unlimited body size constraint (usize::MAX) with a configurable limit obtained from get_body_limit() when reading error responses from HTTP 422 status codes.

Changes

Cohort / File(s) Summary
HTTP Response Body Limit Configuration
lib/llm/src/http/service/openai.rs
Replaced unlimited body size limit (usize::MAX) with configurable limit from get_body_limit() for HTTP 422 error response handling

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A single line hops into place,
From infinite bounds to config grace,
The error response finds its true measure,
No longer unbounded—a sensible treasure!

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description covers the overview and context (memory bug investigation), but lacks specific details about which files were changed and doesn't properly fill the template's 'Details' and 'Where should the reviewer start' sections. Complete the 'Details' section with specific changes made, fill 'Where should the reviewer start' to guide reviewers to openai.rs, and replace the placeholder issue reference with an actual GitHub issue number.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title accurately describes the main change: replacing usize::MAX with a configurable get_body_limit() for constraining the body size limit when reading error responses in the HTTP service middleware.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@michaelfeil michaelfeil changed the title fix: get_body_limit() body limit size fix: get_body_limit() body limit size for response middleware. Jan 8, 2026
Copy link
Contributor

@rmccorm4 rmccorm4 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the contribution @michaelfeil !

@rmccorm4
Copy link
Contributor

/ok to test e5e615e

@rmccorm4 rmccorm4 enabled auto-merge (squash) January 11, 2026 01:58
@rmccorm4 rmccorm4 added memory frontend `python -m dynamo.frontend` and `dynamo-run in=http|text|grpc` labels Jan 11, 2026
@rmccorm4 rmccorm4 changed the title fix: get_body_limit() body limit size for response middleware. fix: Limit max response middleware body size with get_body_limit() instead of usize::MAX Jan 11, 2026
@rmccorm4 rmccorm4 merged commit c94d097 into ai-dynamo:main Jan 11, 2026
41 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contribution Pull request is from an external contributor fix frontend `python -m dynamo.frontend` and `dynamo-run in=http|text|grpc` memory size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants