Skip to content

feat(harness_agent): route calls through model server by default - #4795

Merged
oyilmaz-nvidia merged 2 commits into
mainfrom
cmunley1/harness-agent-model-server-default
Oct 21, 2026
Merged

oyilmaz-nvidia merged 2 commits into
mainfrom
cmunley1/harness-agent-model-server-default

Conversation

@cmunley1

@cmunley1 cmunley1 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What and why

With sandbox_model_base_url unset, harness_agent pointed in-box harnesses at the model server config's base_url (the backend). That skipped the Gym model server, so its request handling and capture never ran, and with a list of backends (the training shape) every sandbox went to the first one.

This defaults the sandbox to the Gym model server's own host:port. sandbox_model_base_url stays as the override for sandboxes that cannot reach that address. The README now says it should forward to the same model server.

Validation

  • harness_agent tests: 31 passed. The two URL tests fail on the old code and pass on the new.
  • pre-commit on changed files: passed.
  • Cluster A/B, self-hosted policy on vLLM, OpenSandbox, sandbox_model_base_url unset, same 10 code rows (Claude Code /v1/messages + Pi chat completions), 20 rollouts per arm:
main this PR main + URL set by hand (control, Pi, 5 rows)
calls from sandboxes straight to vLLM 30 0 0
calls via the Gym model server 1 313 128
harness errors 20/20 (sandbox asks vLLM for the harness's own model name) 0 0

Rewards were 0 in all arms on these rows. The control (old code, URL set explicitly to the model server) behaves the same as this PR, so that is model/harness behaviour on these rows, not this change.

Compatibility

Configs that set sandbox_model_base_url are unchanged. Configs that leave it unset or null now route in-box calls through the Gym model server (one extra local hop per call).

…erver by default

Without sandbox_model_base_url, harness_agent pointed in-box harnesses at the
model server config's base_url, i.e. the backend vLLM or API. That skipped the
Gym model server's request handling and capture, and with a list of backends
(the training shape) it sent every sandbox to the first engine only.

Default to the model server's own host:port instead. sandbox_model_base_url
stays as the override for sandboxes that cannot reach that address, and the
README now says it should forward to the same model server.

Signed-off-by: Christian Munley <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Oct 20, 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.

@cmunley1 cmunley1 changed the title fix(agent): route harness_agent sandbox calls through the Gym model server by default feat(harness_agent): route calls through model server by default Oct 20, 2026
@cmunley1
cmunley1 marked this pull request as ready for review October 20, 2026 21:22

@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 reliability concerns.

Reviewed all three changed files and traced endpoint construction through the sandbox runner and model-server routing. The default endpoint selection now uses the Gym server’s host/port while retaining explicit overrides and rollout/training-capture prefixes. No BLOCKER, RISK, or NOTE findings.

Validation was static only; tests and cluster results reported in the PR were not independently 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.

@svcnvidia-nemo-ci svcnvidia-nemo-ci added area:agent Agent harnesses and Responses API agent behavior bug Something isn't working ready-to-merge PR is approved, current, and waiting for final CI or merge labels Oct 21, 2026
@oyilmaz-nvidia

Copy link
Copy Markdown
Contributor

/ok to test 7ccd66c

@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/39634691430

Merged via the queue into main with commit ea5cbbc Oct 21, 2026
43 of 49 checks passed
@oyilmaz-nvidia
oyilmaz-nvidia deleted the cmunley1/harness-agent-model-server-default branch October 21, 2026 16:52
@cmunley1 cmunley1 mentioned this pull request Oct 24, 2026
6 of 7 tasks

This branch was previously deployed

1 inactive deployment
public — 7ccd66cc Deployed Oct 21, 2026 by copy-pr-bot[bot] via release / finalize / notify #6278
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent harnesses and Responses API agent behavior bug Something isn't working ready-to-merge PR is approved, current, and waiting for final CI or merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants