Skip to content

Conversation

zetxqx
Copy link
Contributor

@zetxqx zetxqx commented Oct 14, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add non streaming response to prefix cache, several points to pay attention:

  1. This is only for non-streaming response, streaming response will be added in a followup PR.
  2. The PR is based on Break PostResponse requestcontrol plugin into 3 separate plugins to add streamed request functionality #1661
  • Also changed the ResponseComplete to accept a *types.LLMResponse which has richer structure.
  1. The response will be concatenated to the previous request.
  2. The encoding of ChatCompletions messages for prefix caching is now standardized via MarshalMessagesToJSON to improve caching accuracy for multi-turn conversations.
  3. Currently only the first choice and the content will be prefix cached. (not role is added but could be a follow up)

Which issue(s) this PR fixes:

Fixes Partially #971

Does this PR introduce a user-facing change?:


@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 14, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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 needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 14, 2025
Copy link

netlify bot commented Oct 14, 2025

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

Name Link
🔨 Latest commit eec941c
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/68f094798b2986000862f149
😎 Deploy Preview https://deploy-preview-1719--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.

@zetxqx zetxqx force-pushed the prefix-cache-resp branch from a7ddc30 to 7476ad3 Compare October 16, 2025 05:00
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 16, 2025
@zetxqx zetxqx force-pushed the prefix-cache-resp branch 2 times, most recently from 7857fa6 to e1f9e73 Compare October 16, 2025 06:18
@zetxqx zetxqx force-pushed the prefix-cache-resp branch from e1f9e73 to eec941c Compare October 16, 2025 06:45
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. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants