-
Notifications
You must be signed in to change notification settings - Fork 235
Move prefix cache update from PreRequest to ResponseReceived #2125
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zetxqx The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
53b7b1f to
7da5041
Compare
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/assign @liu-cong |
| var ( | ||
| _ framework.Scorer = &Plugin{} | ||
| _ requestcontrol.PreRequest = &Plugin{} | ||
| _ requestcontrol.ResponseReceived = &Plugin{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just as a clarification for any reviewer - the extension point ResponseReceived is called when the response HEADERS are received, it is NOT waiting for the body to arrive.
(naming selection here is bad, we have an open issue to update the extension point name).
gateway-api-inference-extension/pkg/epp/requestcontrol/plugins.go
Lines 41 to 47 in c68bbe5
| // ResponseReceived is called by the director after the response headers are successfully received | |
| // which indicates the beginning of the response handling by the model server. | |
| // The given pod argument is the pod that served the request. | |
| type ResponseReceived interface { | |
| plugins.Plugin | |
| ResponseReceived(ctx context.Context, request *types.LLMRequest, response *Response, targetEndpoint *datalayer.EndpointMetadata) | |
| } |
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR updates the prefixCacheScorer plugin to defer updating the cache index and recording metrics until
the ResponseReceived phase. This will prevent the case when request is shedded the prefix cache index is still updated.
See: #971 (comment) and #971 (comment)
Changes:
the cache (avoiding updates from shedded requests).
ResponseReceivedonly havetargetPod *datalayer.EndpointMetadata.Which issue(s) this PR fixes:
Fixes partially #971
Does this PR introduce a user-facing change?: