Skip to content

[Bugfix] stream use text/event-stream media_type - #1011

Merged
YaoJiayi merged 1 commit into
LMCache:devfrom
Abirdcfly:dev
Jul 11, 2025
Merged

YaoJiayi merged 1 commit into
LMCache:devfrom
Abirdcfly:dev

Conversation

@Abirdcfly

Copy link
Copy Markdown
Contributor

Similar to how vLLM handles it, we set the Content-Type to text/event-stream for stream mode, and use application/json for the normal case.

While this doesn't affect basic curl testing, it can have an impact on automated testing tools.

For example, when using evalscope perf for benchmarking — it failed to work properly. After investigation, I found that evalscope perf strictly parses responses based on the Content-Type, and the mismatch caused the errors.

Although it's also reasonable to make evalscope perf more tolerant, we can improve the out-of-the-box experience by aligning our Content-Type usage with expectations.


PR Checklist (Click to Expand)

Thank you for your contribution to LMCache! Before submitting the pull request, please ensure the PR meets the following criteria. This helps us maintain the code quality and improve the efficiency of the review process.

PR Title and Classification

Please try to classify PRs for easy understanding of the type of changes. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:

  • [Bugfix] for bug fixes.
  • [CI/Build] for build or continuous integration improvements.
  • [Doc] for documentation fixes and improvements.
  • [Model] for adding a new model or improving an existing model. Model name should appear in the title.
  • [Core] for changes in the core LMCache logic (e.g., LMCacheEngine, Backend etc.)
  • [Misc] for PRs that do not fit the above categories. Please use this sparingly.

Note: If the PR spans more than one category, please include all relevant prefixes.

Code Quality

The PR need to meet the following code quality standards:

  • The code need to be well-documented to ensure future contributors can easily understand the code.
  • Please include sufficient tests to ensure the change is stay correct and robust. This includes both unit tests and integration tests.

What to Expect for the Reviews

To create a new tag for lmcache (Note: v prefix is required):
git tag vx.x.x
git push origin vx.x.x (same version again)

For example:
git tag v0.3.0
git push origin v0.3.0

In case the workflow fails, delete the tag and try again:
git tag -d vx.x.x
git push origin :refs/tags/vx.x.x

For example:
git tag -d v0.3.0
git push origin :refs/tags/v0.3.0

To create a new release and publish lmcache Python package to PyPi:
git remote add upstream git@github.com:LMCache/LMCache.git
gh release create vx.x.x --repo LMCache/LMCache --title "vx.x.x" --notes "<Add description>"

For example:
git remote add upstream git@github.com:LMCache/LMCache.git
gh release create v0.3.0 --repo LMCache/LMCache --title "v0.3.0" --notes "LMCache v0.3.0 is a feature release. Users are encouraged to upgrade for the best experience."

[!TIP]
The creation of a release and subsequent tag generation can be done alternatively from the LMCache releases page.

We aim to address all PRs in a timely manner. If no one reviews your PR within 5 days, please @-mention one of KuntaiDu, ApostaC or YaoJiayi.

@Shaoting-Feng Shaoting-Feng left a comment •

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.

LGTM. Please fix the DCO and update branch.

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
@Abirdcfly Abirdcfly changed the title [BUG] stream use text/event-stream media_type [Bugfix] stream use text/event-stream media_type Jul 11, 2025
@Abirdcfly

Abirdcfly commented Jul 11, 2025 •

Copy link
Copy Markdown
Contributor Author

fix the DCO and update branch.

Done

@YaoJiayi
YaoJiayi merged commit 83a91b3 into LMCache:dev Jul 11, 2025
Shaoting-Feng pushed a commit to Shaoting-Feng/LMCache that referenced this pull request Jul 15, 2025
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
YurianStormrage pushed a commit to YurianStormrage/LMCache that referenced this pull request Aug 26, 2025
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
KevinCheung2259 pushed a commit to KevinCheung2259/LMCache that referenced this pull request Nov 5, 2025
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
DongDongJu pushed a commit to DongDongJu/LMCache that referenced this pull request Feb 22, 2026
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
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.

3 participants