Repository navigation
fix(openai_model): preserve carrier custom tools on Responses - #6956
RyaliNvidia wants to merge 1 commit into
Conversation
Signed-off-by: RyaliNvidia <ryali@nvidia.com>
|
/ok to test 9938078 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP. LGTM, no concerns found.
I reviewed all four changed files and traced the shared sanitizer, Responses dispatch, namespace restoration and replay paths. Three delegated reviews covered request handling, response/replay behavior, and tests/API/docs. No BLOCKER, RISK or NOTE findings survived review.
Validation
I used 766267172432.dkr.ecr.us-east-1.amazonaws.com/gym:228a16b96df8f925220a7edbff2d7d22317c78fb, the base branch's successful CI image, because this head had no successful container build. Python was 3.13.14. Probe imports were verified against the admitted checkouts.
python /workspace/review-probes/leader/http_probe.py /workspace/review/sourcepassed all four custom/hosted drop-policy combinations through a real loopback HTTP provider. Grammar definitions, multiple carriers, SSE output items and Unicode tool-result replay survived.- Delegated request and replay probes passed on head. They covered mixed function/custom tools, distinct namespaces, completed/incomplete/failed responses and next-turn call identity. The public-export probe also passed.
- The four added regression cases run against base produced 2 expected failures and 2 passes: the failures reproduced the missing carrier custom tools. Existing green head suites were not rerun locally.
For the admitted head, CI run 46469139376 shows Nemo_CICD_Test, all four core shards, all eight server shards, sandbox tests and combined core coverage passing. Lint and DCO passed. Changed server tests and Session routing end-to-end were skipped, not passed.
The optional miniswe_sandboxed conformance job is red after its five-minute step timeout. That check also failed on base, but with a different reported failure, so I have not attributed the timeout to an existing cause. Conformance does not feed the Nemo_CICD_Test aggregate.
No live Codex/OpenAI rollout or GPU execution was performed. The probes verify Gym's protocol handling, not external-provider execution.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
What does this PR do?
Keep free-form custom tools carried in
additional_toolsitems when the OpenAI model server handles/v1/responses. Codex code mode advertisesfunctions.execthis way; the default sanitizer currently removes that declaration, so the backend loses the tool even though it supports the Responses custom-tool format.Reuse the shared sanitizer with carrier custom-tool hoisting enabled for this model server. Preserve namespace restoration and replay, and honor
drop_custom_toolsanddrop_hosted_tools. Export the two existing sanitizer types/helpers through the models package API for the component import. Document the behavior in the component README.Related: #4880 established the shared sanitizer and Chat function bridge. This change handles the Responses backend without requiring that bridge. No separate issue: this is a focused reproduced protocol-compatibility bug with an HTTP regression.
Validation
Base:
228a16b96df8f925220a7edbff2d7d22317c78fb. Python 3.13.14, uv 0.13.4, frozen root environment withdevandtelemetryextras.nemo_gym/models/__init__.py. The complete core/sandbox/server matrix is left to trusted CI.Rollouts
N/A for this focused model-server protocol regression: tests exercise HTTP requests, provider-facing definitions, SSE namespace restoration and the next request containing the tool result, with a deterministic provider response. No live Codex/model rollout, container build or remote-sandbox qualification was performed or is claimed.
Compatibility and benchmark impact
Requests containing carrier custom tools now forward those declarations to Responses backends. Explicit tool-drop policies remain effective. No dependency, configuration key, Chat conversion policy or benchmark protocol changes. Runs that previously lost these tools can now use them; this is a capability repair, not evidence of a benchmark-score improvement.
Checklist