Skip to content

[Feat]: finished by finish reason#2061

Open
scarlet25151 wants to merge 1 commit intovllm-project:mainfrom
scarlet25151:feat/finished-by-finish-reason
Open

[Feat]: finished by finish reason#2061
scarlet25151 wants to merge 1 commit intovllm-project:mainfrom
scarlet25151:feat/finished-by-finish-reason

Conversation

@scarlet25151
Copy link
Copy Markdown
Collaborator

Pull Request Description

[Please provide a clear and concise description of your changes here]

Related Issues

Resolves: #2013

Important: Before submitting, please complete the description above and review the checklist below.


Contribution Guidelines (Expand for Details)

We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:

Pull Request Title Format

Your PR title should start with one of these prefixes to indicate the nature of the change:

  • [Bug]: Corrections to existing functionality
  • [CI]: Changes to build process or CI pipeline
  • [Docs]: Updates or additions to documentation
  • [API]: Modifications to aibrix's API or interface
  • [CLI]: Changes or additions to the Command Line Interface
  • [Misc]: For changes not covered above (use sparingly)

Note: For changes spanning multiple categories, use multiple prefixes in order of importance.

Submission Checklist

  • PR title includes appropriate prefix(es)
  • Changes are clearly explained in the PR description
  • New and existing tests pass successfully
  • Code adheres to project style and best practices
  • Documentation updated to reflect changes (if applicable)
  • Thorough testing completed, no regressions introduced

By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.

Signed-off-by: chenyu.jiang <chenyu.jiang@bytedance.com>
@scarlet25151 scarlet25151 force-pushed the feat/finished-by-finish-reason branch from 288e876 to 7493e95 Compare April 2, 2026 06:50
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a short-circuiting mechanism for prefill requests within the PD disaggregation algorithm. It enables the gateway to return an immediate response to the client if a specific finish reason is detected during the prefill phase, effectively bypassing subsequent processing steps. Key changes include modifications to the routing context, HTTP execution flow, and metrics handling, as well as the addition of utility functions for constructing Envoy-compatible immediate responses and new unit tests. I have no feedback to provide.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing finish_reason check in pd_disaggregation for trtllm

1 participant