Skip to content

Optimize routing for multimodal inputs with image/video URLs in the request#2666

Draft
rahulgurnani wants to merge 3 commits intokubernetes-sigs:mainfrom
rahulgurnani:multimodal-url
Draft

Optimize routing for multimodal inputs with image/video URLs in the request#2666
rahulgurnani wants to merge 3 commits intokubernetes-sigs:mainfrom
rahulgurnani:multimodal-url

Conversation

@rahulgurnani
Copy link
Copy Markdown
Contributor

@rahulgurnani rahulgurnani commented Mar 23, 2026

What type of PR is this?

Prefixing the text with image/video URL in prefix cache scorer, leads to better performance i.e. higher throughput and lower response latency.

This is an interim change until #2665 is ideated/finalised.

What this PR does / why we need it:
Prefixing with URL in prefix cache scorer to index on encoder cache, specifically valuable in case of multimodal inputs with URLs.
This is an interim change until #2665 is ideated/finalised.

Benchmarking results

By adding url as a prefix, the throughput/TTFT seem to improve like of the order of 40%. These numbers are comparing the changes in this PR with EPP on main. The same_url_multi_text.py takes like 14.41 seconds on main and it takes 9.06 seconds on this PR.

Which issue(s) this PR fixes:

This PR is related to #2665 in a way they support each other

Does this PR introduce a user-facing change?:


@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 23, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 23, 2026

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

Name Link
🔨 Latest commit 4e272b7
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/69c27f60368e650008ca9b9d
😎 Deploy Preview https://deploy-preview-2666--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
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rahulgurnani
Once this PR has been reviewed and has the lgtm label, please assign ahg-g for approval. For more information see the Code Review Process.

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

Details 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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 23, 2026
@rahulgurnani rahulgurnani changed the title Imrove multimodal processing for image/video URLs in EPP Improve processing for multimodal inputs with image/video URLs in the request Mar 23, 2026
@rahulgurnani rahulgurnani changed the title Improve processing for multimodal inputs with image/video URLs in the request Optimize routing for multimodal inputs with image/video URLs in the request Mar 24, 2026
@rahulgurnani rahulgurnani marked this pull request as ready for review March 24, 2026 10:39
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 24, 2026
@k8s-ci-robot k8s-ci-robot requested a review from liu-cong March 24, 2026 10:40
@rahulgurnani
Copy link
Copy Markdown
Contributor Author

/retest

type ContentBlock struct {
Type string `json:"type"`
Text string `json:"text,omitempty"`
ImageURL ImageBlock `json:"image_url,omitempty"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm wondering did you just append the image url before text? If so, probably this will cause issues when you have multiple image urls has the same prefix like gs://image-repo/xxxx

@rahulgurnani rahulgurnani marked this pull request as draft March 25, 2026 19:20
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 25, 2026
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 3, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions 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.

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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.

3 participants