Repository navigation
Conversation
|
Documentation preview: https://vllm--41510.org.readthedocs.build/en/41510/ |
There was a problem hiding this comment.
Code Review
This pull request extends the /tokenize endpoint to support the Responses API, allowing users to get token IDs for rendered model inputs from raw completion prompts, chat-completion messages, or Responses API inputs. The implementation refactors the OpenAIServingResponses class to extract input rendering into a shared render_response_inputs method, which is now utilized by both the Responses API and the tokenization service. Additionally, the PR introduces the TokenizeResponsesRequest protocol and includes comprehensive unit tests for the new functionality. I have no feedback to provide as there were no review comments to assess.
|
PTAL: #38084 |
|
This pull request has merge conflicts that must be resolved before it can be |
Based on the contract and test direction in upstream PR vllm-project#41510. This branch is for the llm-d routing experiment and is not a competing upstream submission. Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
|
This pull request has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this pull request should remain open. Thank you! |
56d23a7 to
3ad0440
Compare
|
Rebased onto current |
|
Policy/status correction: the latest rebase and test/doc updates used AI assistance. I have converted this PR back to draft so it is not presented as review-ready before the human submitter has reviewed every changed line and can defend the revision end-to-end, per the repository's current The duplicate-work checks and test evidence remain recorded in the PR body. No maintainer CI label is being requested while the human-review gate is outstanding. |
Route Responses-style /tokenize requests through the existing Responses renderer so token IDs match the prompt sent to /v1/responses. Add focused unit coverage and clarify tokenizer endpoint docs. Co-authored-by: OpenAI Codex <codex@openai.com>
Add endpoint parsing, state wiring, previous-response, tools, and online parity coverage for Responses-style /tokenize requests. Tighten the Responses renderer type and document concrete usage examples. Co-authored-by: OpenAI Codex <codex@openai.com>
3ad0440 to
ef1fdef
Compare
Fixes #40556
Summary
/tokenizerequest schema/v1/responsesDuplicate-work check
40556,responses tokenize, andtokenize responses api; no other open PR adds Responses API input support to/tokenize.Tests
uvx ruff checkon all changed Python files — passeduvx ruff format --checkon all changed Python files — passedpython3 -m py_compileon all changed Python files — passedPYTHONPATH=$PWD .../.venv/bin/python -m pytest -q tests/entrypoints/serve/tokenize/test_serving_tokenization.py tests/entrypoints/openai/responses/test_serving_responses.py— passed (42 passed, 1 xfailed)git diff --check— passedThe online tokenizer test module was collected but cannot run end-to-end on this macOS arm64 host because vLLM cannot infer a supported runtime device. The focused CPU-runnable tests above cover schema discrimination, route parsing, handler wiring, Responses rendering, previous-response context, tool forwarding, error propagation, and token strings.
Rebase update
Rebased on current
mainafter the online-serving layout refactor. The implementation now usesOnlineRenderer, the currentvllm.entrypoints.generate.api_routerpath, and the reorganized online-serving docs.AI assistance disclosure
AI assistance was used to analyze the code paths, rebase and draft this revision, and strengthen tests/docs. This PR is now a draft pending the human submitter reviewing every changed line and being able to defend the change end-to-end, as required by
AGENTS.md.