Repository navigation
fix(anyswe_agent): keep rollout path on relay URLs, grade failed runs - #5060
Merged
Merged
Conversation
…rade the patch when the harness raises A sandbox_model_base_url relays to the same Gym model server, so it now keeps the /ng-rollout/<id> path. Without it, observability capture and token capture cannot attribute in-box model calls when a run uses a relay (the usual OpenSandbox setup), as harness_agent already does. The runner now writes patch.diff in a finally block, so a harness that stops on an error (a turn limit, a Fabric stop timeout) is graded on the edits it made. The existing mask rule (resolved after max_iteration or context_window) then applies. Signed-off-by: Christian Munley <[email protected]>
Contributor
Author
|
/ok to test c90035d |
Contributor
Author
|
/review |
svcnvidia-nemo-ci
left a comment
Contributor
There was a problem hiding this comment.
SHIP
LGTM — no reliability concerns.
Reviewed all three changed files and traced relay URL routing, partial-patch extraction, artifact retrieval, grading, and masking. No qualifying BLOCKER, RISK, or NOTE findings.
The delegated runner/test-isolation report was unavailable; that topic was independently checked against source. Static inspection only; tests and sandbox rollouts were not executed.
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.
This was referenced Oct 25, 2026
eddy-nassif
pushed a commit
to youdotcom-oss/NeMo-Gym
that referenced
this pull request
Oct 27, 2026
…VIDIA-NeMo#5111) A sandbox_model_base_url relays to the same Gym model server, so it now keeps the /ng-rollout/<id> path, as anyswe_agent (NVIDIA-NeMo#5060) and harness_agent do. Without it, model-call capture and token capture cannot attribute in-box model calls to a rollout whenever a run uses a relay. The in-box runner accepts a relay URL with or without /v1, so a trailing /v1 is removed before the rollout path, as in harness_agent. With no model_server configured, nothing strips the path, so the URL is left unchanged, as in claude_code_agent. Signed-off-by: Christian Munley <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Two small
anyswe_agentfixes found while running NeMo Fabric harnesses on SWE-bench Verified through OpenSandbox.sandbox_model_base_url. The relay URL reaches the same Gym model server, so it now keeps/ng-rollout/<id>like the default URL does. Without it,++observability_enabled=truecapture (and token capture) cannot attribute in-box model calls to a rollout whenever a run uses a relay, which is the usual OpenSandbox setup.harness_agentalready keeps the prefix on its explicit override.agent_runner.pynow writespatch.diffin afinallyblock. Before, a harness that stopped on an error (a turn limit, a Fabric stop timeout) left no patch, so the rollout scored 0 without grading its edits. The existing mask rule (resolved aftermax_iterationorcontext_window) now applies to these rollouts as intended.Validation
pytest responses_api_agents/anyswe_agent/tests: 70 passed. Both new tests fail onmain.ruff formatandruff checkon the changed files: passed.Rollouts
SWE-bench Verified on OpenSandbox through
nemo_fabric_agent, self-hosted DeepSeek-V4.1-Flash policy reached through a relay, with++observability_enabled=true ++model_call_capture_dir=.... With change 1, 8 rollouts across pi, OpenClaw, Kilo, Hermes and Deep Agents captured 11 to 40 model calls each (184 total), one capture file per rollout.Compatibility and benchmark impact
sandbox_model_base_urlmust now route/ng-rollout/...paths, which every relay to the Gym model server does. A URL that bypasses the Gym model server and goes straight to a backend would now get the prefix and fail, so point it at the model server instead.anyterminal_agenthas the same relay skip and is left for a follow-up.Checklist