Skip to content

Conversation

@BenjaminBraunDev
Copy link
Contributor

@BenjaminBraunDev BenjaminBraunDev commented Dec 2, 2025

Small bugfix for latency routing profile picker (it wasn't returning an empty profile map when sending a request with predictor routing header set to false and the profiles all run).

This PR both corrects that logic and also turns predictor based routing to on by default (when deploying with latency based routing flag in helm charts) and replaces the old flag with a flag that turns it off when included instead.

@netlify
Copy link

netlify bot commented Dec 2, 2025

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit ad7455a
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/69335154a2cec000082b81a3
😎 Deploy Preview https://deploy-preview-1929--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 2, 2025
@BenjaminBraunDev BenjaminBraunDev changed the title fix infinite loop in profile picker when using latency routing with p… fix infinite loop in profile picker when using latency routing Dec 2, 2025
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 2, 2025
@BenjaminBraunDev BenjaminBraunDev changed the title fix infinite loop in profile picker when using latency routing fix infinite loop in profile picker when using latency routing w/ predictor based routing off Dec 2, 2025
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 2, 2025
…nd set predictor scheduling to true instead of flase when no flag is present
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 2, 2025
@BenjaminBraunDev BenjaminBraunDev changed the title fix infinite loop in profile picker when using latency routing w/ predictor based routing off [latency-based-routing] fix infinite loop in profile picker when using latency routing w/ predictor based routing off Dec 2, 2025
@BenjaminBraunDev BenjaminBraunDev changed the title [latency-based-routing] fix infinite loop in profile picker when using latency routing w/ predictor based routing off fix infinite loop in profile picker when using latency routing w/ predictor based routing off Dec 2, 2025
headerValue, ok := request.Headers[headerName]
if !ok {
return false, nil // Header not found, return 0 and false
return true, nil // Header not found, return true by default
Copy link
Contributor

Choose a reason for hiding this comment

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

If a Boolean header is not found, why should the default value be true?

Please revert this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kfswain @ahg-g @kaushikmitr and I discussed this and since this is all behind the helm deployment flag to begin with, it makes the most sense for this header to specifically be used to disable the predictive routing, it should be on by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated header to a clear "off" flag and updated documentation.

@shmuelk
Copy link
Contributor

shmuelk commented Dec 3, 2025

In general, the header utility functions should be removed from both the profile modified in this PR and in SLO Aware plugin package. They should be added as functions on the LLMRequest struct.

@BenjaminBraunDev
Copy link
Contributor Author

In general, the header utility functions should be removed from both the profile modified in this PR and in SLO Aware plugin package. They should be added as functions on the LLMRequest struct.

This was mainly done to keep all SLO routing change isolated to its associated plugins and modify as little non-plugin code as possible.

…d make it on by default when deploying with latency based routing
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 3, 2025
@BenjaminBraunDev BenjaminBraunDev changed the title fix infinite loop in profile picker when using latency routing w/ predictor based routing off fix infinite loop in profile picker and switch predictor based routing to on by default with a header to disable Dec 3, 2025
@BenjaminBraunDev
Copy link
Contributor Author

@ahg-g Could you help get this PR approved? It's part of what's necessary for vertex to do AB testing with latency prediction.

@kaushikmitr has a PR out for getting approval for the plugin package, but this affects a few files outside the package.

@ahg-g
Copy link
Contributor

ahg-g commented Dec 5, 2025

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 5, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, BenjaminBraunDev

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 5, 2025
@k8s-ci-robot k8s-ci-robot merged commit 78ffe61 into kubernetes-sigs:main Dec 5, 2025
12 checks passed
@shmuelk
Copy link
Contributor

shmuelk commented Dec 7, 2025

I don't understand why there is a header to disable the SLO based scheduling. Just don't use the plugin in the configuration.

Also the header name is strange. x-prediction-based-scheduling-off seems strange. It should have been x-disable-prediction-based-scheduling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants