Skip to content

fix(capture): link backend exchanges to native model call identities - #5903

Merged
athitten merged 4 commits into
NVIDIA-NeMo:mainfrom
Kipok:codex/model-transport-attribution
Nov 20, 2026
Merged

athitten merged 4 commits into
NVIDIA-NeMo:mainfrom
Kipok:codex/model-transport-attribution

Conversation

@Kipok

@Kipok Kipok commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Persist the native capture's rollout/model-call identity in ASGI request state and include that trusted identity in vLLM backend transport events. Exporters can then join a native call to its actual backend exchange even when two samples have identical prompts. Context-only matching cannot distinguish those samples safely.

The state identity takes precedence over caller-supplied trace headers. This adds transport-log metadata without changing model-visible requests or responses. No separate issue is needed for this focused capture fix.

Validation

  • 517 focused model/correlation tests passed, including identical native requests with distinct capture IDs and trusted identity precedence.
  • pre-commit run --all-files passed; commit carries DCO sign-off.
  • Combined integration checkout: gym env test +entrypoint=responses_api_models/vllm_model +should_validate_data=true passed (1,003 tests).
  • Live validation: nine completed rollouts across Pi, Codex, Hermes, OpenClaw and both Claude modes, with zero capture gaps. All eight selected per-call exports matched raw backend context, reasoning/text and tool schemas exactly. Two samples of the same prompt retained distinct capture IDs and exported separately without ambiguity.

Core capture changes require full CI classification; the full eight-shard server suite was not run locally.

Current-main refresh (2026-11-16): includes main fc109f3f845e4f25526b20e01cc785a02e84f5ad. Validated head 0d8be81893b7af42b7313c244f3f6313a400822e: 2212 passed, 5 warnings. All-file pre-commit, whitespace and DCO checks passed. Three independent local review passes: SHIP using the protected-main rubric; this is not hosted approval. Hosted CI and maintainer review for this head remain independent.

@copy-pr-bot

copy-pr-bot Bot commented Nov 10, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@Kipok Kipok added bug Something isn't working area:model Model servers, inference providers, and model adapters labels Nov 10, 2026
@Kipok
Kipok marked this pull request as ready for review November 10, 2026 01:08
@ananthsub ananthsub mentioned this pull request Nov 10, 2026
3 of 6 tasks
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Nov 11, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the needs-review PR is ready for code review and waiting on a reviewer label Nov 16, 2026
@Kipok

Kipok commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 0d8be81

@nemo-automation-bot
nemo-automation-bot Bot requested review from a team November 16, 2026 22:37
@Kipok

Kipok commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

/review mode=strict reset=true

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

SHIP

LGTM. No concerns found.

I reviewed all four changed files and traced identity propagation through capture persistence, token capture, and vLLM transport events. The capture middleware shares the same call identity with the handler and capture records. The transport context gives that identity precedence over trace headers without changing model payloads.

Static review only. I did not execute tests or independently verify the reported validation. One delegated report was not returned, so I covered its capture-state lifecycle and correlation-test scope directly.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@github-actions github-actions Bot removed the sla:triage-overdue Review assignment is over the one-business-day SLA label Nov 16, 2026
@athitten
athitten requested a review from cmunley1 November 18, 2026 23:48
@github-actions github-actions Bot added the sla:review-overdue Review response is over the one-business-day SLA label Nov 20, 2026

@cmunley1 cmunley1 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. is there a consumer of this field?
cc @AdamRajfer

@athitten
athitten added this pull request to the merge queue Nov 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/44800567728

@github-actions github-actions Bot removed the sla:review-overdue Review response is over the one-business-day SLA label Nov 20, 2026
Merged via the queue into NVIDIA-NeMo:main with commit e0b0444 Nov 20, 2026
79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:model Model servers, inference providers, and model adapters bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants