Skip to content

Conversation

sfeng33
Copy link
Contributor

@sfeng33 sfeng33 commented Sep 6, 2025

Purpose

Refactors the embedding and classification endpoints to use the new CompletionRenderer for consistent prompt processing across all API endpoints.

Issue: #22880
Previous PR: #24010

Test Plan

  1. Unit test
pytest tests/entrypoints/test_renderer.py -v
  1. Manual test
# Embedding endpoint
python -m vllm.entrypoints.openai.api_server \
      --model BAAI/bge-base-en-v1.5 \
      --port 8000

curl -X POST http://localhost:8000/v1/embeddings \
-H "Content-Type: application/json" \
-d '{
  "model": "BAAI/bge-base-en-v1.5",
  "input": "Hello this is a test sentence for embeddings"
}'

# Classification endpoint
python -m vllm.entrypoints.openai.api_server \
    --model nie3e/sentiment-polish-gpt2-small \
    --port 8000 


curl http://localhost:8000/classify \
  -H "Content-Type: application/json" \
  -d '{
    "input": "hello",
    "model": "nie3e/sentiment-polish-gpt2-small"
  }'

@sfeng33 sfeng33 marked this pull request as ready for review September 6, 2025 02:53
@mergify mergify bot added the frontend label Sep 6, 2025
Copy link
Member

@DarkLight1337 DarkLight1337 left a comment

Choose a reason for hiding this comment

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

LGTM if tests pass. However CI is broken right now so let's try merging after that's fixed

@sfeng33
Copy link
Contributor Author

sfeng33 commented Sep 6, 2025

Sounds good, thanks for the review!

Signed-off-by: sfeng33 <[email protected]>
Signed-off-by: sfeng33 <[email protected]>
Signed-off-by: sfeng33 <[email protected]>
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) September 7, 2025 05:16
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 7, 2025
@DarkLight1337 DarkLight1337 merged commit 0661cb9 into vllm-project:main Sep 7, 2025
39 checks passed
@sfeng33 sfeng33 deleted the renderer branch September 7, 2025 16:32
eicherseiji pushed a commit to eicherseiji/vllm that referenced this pull request Sep 9, 2025
skyloevil pushed a commit to skyloevil/vllm that referenced this pull request Sep 13, 2025
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants