Skip to content

fix(token-id-capture): fingerprint the served response dialect - #3050

Open
ananthsub wants to merge 1 commit into
NVIDIA-NeMo:pthombre/tokcap/full-stackfrom
ananthsub:ananthsub/fix-token-capture-utility-paths
Open

fix(token-id-capture): fingerprint the served response dialect#3050
ananthsub wants to merge 1 commit into
NVIDIA-NeMo:pthombre/tokcap/full-stackfrom
ananthsub:ananthsub/fix-token-capture-utility-paths

Conversation

@ananthsub

@ananthsub ananthsub commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • defer external-staging ledger publication until API-specific Chat, Responses, or Messages conversion is complete
  • fingerprint the response representation the harness actually receives and can echo
  • normalize Anthropic thinking blocks as reasoning so they do not alter the assistant-content witness
  • retain exact captured token prefixes even when a Responses harness omits standalone reasoning on the next request

This is the follow-up identified in #2872 (comment) and is based on #2872.

Test plan

  • uv run pytest responses_api_models/vllm_model/tests/test_app.py::TestPrefixSupply::test_responses_reasoning_echo_supplies_the_exact_captured_prefix responses_api_models/vllm_model/tests/test_app.py::TestPrefixSupply::test_external_capture_fingerprints_the_served_responses_shape tests/unit_tests/test_base_responses_api_model.py -q
  • focused pre-commit checks on all changed files

@copy-pr-bot

copy-pr-bot Bot commented Sep 3, 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.

@ananthsub ananthsub changed the title fix(token-id-capture): preserve harness utility requests fix(token-id-capture): fingerprint the served response dialect Sep 3, 2026
@ananthsub
ananthsub force-pushed the ananthsub/fix-token-capture-utility-paths branch from cf137e9 to 7dd16b6 Compare September 3, 2026 08:18
@ananthsub
ananthsub changed the base branch from main to pthombre/tokcap/full-stack September 3, 2026 08:18
Defer external-staging ledger publication until Chat, Responses, or Messages conversion is complete so content witnesses match what the harness can echo. Preserve exact token-prefix supply when Responses clients omit standalone reasoning.

Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
@ananthsub
ananthsub force-pushed the ananthsub/fix-token-capture-utility-paths branch from 7dd16b6 to 4c67a86 Compare September 3, 2026 08:28
@ananthsub
ananthsub requested a review from pthombre September 3, 2026 08:30
@ananthsub
ananthsub marked this pull request as ready for review September 3, 2026 09:11
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