Skip to content

test(vllm): cover upstream token metadata fast path - #2174

Closed
jthomson04 wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
jthomson04:jthomson04/test-vllm-native-token-metadata
Closed

jthomson04 wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
jthomson04:jthomson04/test-vllm-native-token-metadata

Conversation

@jthomson04

@jthomson04 jthomson04 commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add regression coverage for producer-supplied prompt token IDs, generation token IDs, and generation log probabilities
  • verify the vLLM model proxy preserves those fields through response validation
  • verify the existing compatibility /tokenize fallback is not awaited when native metadata is present

Why

NeMo-RL can return the exact token metadata already held by its vLLM engine. Gym already supports that response contract and skips its compatibility tokenization request, but the native fast path was not covered directly.

This is intentionally test-only; the existing fallback remains unchanged.

Testing

  • uv run pytest tests/test_app.py -k preserves_upstream_token_metadata_without_tokenizing -q (1 passed)
  • ruff check tests/test_app.py
  • ruff format --check tests/test_app.py

Producer implementation: NVIDIA-NeMo/RL#3390

Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

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.

1 participant