Skip to content

cp: fix(responses-converter): strip strict from function tools before engine dispatch (2892) into r0.6.0 - #2899

Merged
ananthsub merged 1 commit into
r0.6.0from
cherry-pick-2892-r0.6.0
Aug 31, 2026
Merged

cp: fix(responses-converter): strip strict from function tools before engine dispatch (2892) into r0.6.0#2899
ananthsub merged 1 commit into
r0.6.0from
cherry-pick-2892-r0.6.0

Conversation

@svcnvidia-nemo-ci

Copy link
Copy Markdown

beep boop [🤖]: Hi @pthombre 👋,

we've cherry picked #2892 into  for you! 🚀

Please review and approve this cherry pick by your convenience!

…ine dispatch (#2892)

## Summary

The openai-2.44 pin rework (65129dd, #2456) stopped popping `strict`
from function tool definitions in
`responses_to_chat_completion_create_params`. This restores the
pre-#2456 strip.

`strict` is an OpenAI-hosted enforcement flag with no Chat Completions
semantics on self-hosted engines: vLLM 0.25.1's `FunctionDefinition`
keeps it, and chat templates that render unknown function keys (e.g.
Nemotron's `render_extra_keys`) inject `<strict>True</strict>` into
every `<function>` block. That perturbs the prompt of every tool-bearing
request off-distribution.

## Observed impact

In RL training (jobs 6707880/6712632 vs baseline 6682989): ~17% of
sequences per step ran away to the max-token cap, collected reward-0
truncation penalties, and were masked by sequence logprob error
(1e4–1e14). Restoring the strip returns the engine request to
byte-parity with the pre-#2456 tree.

## Question for reviewers

Was dropping the strip in #2456 intentional? If `strict` support on
self-hosted engines is planned, a config flag may be preferable — but
unconditional stripping matches pre-#2456 behavior and `strict` has no
Chat Completions semantics today.

## Changes

- `nemo_gym/responses_converter.py`: pop `strict` from function tool
dicts before building `NeMoGymChatCompletionToolParam`
- `tests/unit_tests/test_responses_converter.py`: assert `strict` does
not reach the engine params

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Pranav Thombre <pthombre@nvidia.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: NeMo Bot <nemo-bot@nvidia.com>
@svcnvidia-nemo-ci

Copy link
Copy Markdown
Author

/ok to test 236f198

@copy-pr-bot

copy-pr-bot Bot commented Aug 31, 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.

@ananthsub
ananthsub enabled auto-merge (squash) August 31, 2026 20:01
@ananthsub
ananthsub merged commit 723603b into r0.6.0 Aug 31, 2026
35 checks passed
@ananthsub
ananthsub deleted the cherry-pick-2892-r0.6.0 branch August 31, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants