Fix: Account for requests that have already been decoded by model server#4987
Merged
Aditi2424 merged 1 commit intoaws:masterfrom Jan 7, 2025
Merged
Fix: Account for requests that have already been decoded by model server#4987Aditi2424 merged 1 commit intoaws:masterfrom
Aditi2424 merged 1 commit intoaws:masterfrom
Conversation
Collaborator
Author
|
@andjsmi please review this when u have the chance. Can't add you as a reviewer for some reason |
4a4f56b to
34ba5fa
Compare
…ot decoding the request again if it is not already bytes or bytestream
34ba5fa to
702caef
Compare
Aditi2424
approved these changes
Jan 7, 2025
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.

Issue #, if available:
#4959
Description of changes:
Some model servers (MMS in specific) decode the request from bytes ahead of time if the content type of the request is in a known format.
In these scenarios, we should honor that logic. If the request by the time it gets to our decoder is no longer in a bytes / bytestream format then propagate it as is.
We should not get into the business of re-encoding it back into a bytes or bytestream format
In the first iteration: #4960 a regression was introduced. Fixed that here
Testing done:
Merge Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
unique_name_from_baseto create resource names in integ tests (if appropriate)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.