Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch release for older vllm engine lora support in gateway plugins #599

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions pkg/plugins/gateway/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,17 +410,18 @@ func (s *Server) HandleResponseBody(ctx context.Context, requestID string, req *
Key: "x-error-response-unmarshal", RawValue: []byte("true"),
}}},
err.Error()), complete
} else if res.Model != model {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This check is used to handle error messages from the vLLM model. I assumed "model" from request header should equal to "res.Model" returned from the response. If that is not the case, replacing with len(res.Model) == 0 is ok.

err = ErrorUnknownResponse
klog.ErrorS(err, "unexpected response", "requestID", requestID, "responseBody", string(b.ResponseBody.GetBody()))
complete = true
return generateErrorResponse(
envoyTypePb.StatusCode_InternalServerError,
[]*configPb.HeaderValueOption{{Header: &configPb.HeaderValue{
Key: "x-error-response-unknown", RawValue: []byte("true"),
}}},
err.Error()), complete
}
// } else if res.Model != model {
// err = ErrorUnknownResponse
// klog.ErrorS(err, "unexpected response", "requestID", requestID, "responseBody", string(b.ResponseBody.GetBody()))
// complete = true
// return generateErrorResponse(
// envoyTypePb.StatusCode_InternalServerError,
// []*configPb.HeaderValueOption{{Header: &configPb.HeaderValue{
// Key: "x-error-response-unknown", RawValue: []byte("true"),
// }}},
// err.Error()), complete
// }
// Do not overwrite model, res can be empty.
usage = res.Usage
}
Expand Down
Loading