Repository navigation
Description
Describe the bug
NeMo-RL includes temperature, top_p, and max_output_tokens in Gym rollout requests. Several coding-agent servers reject these controls, so this interface mismatch is broader than Hermes.
Source-reviewed behavior at pinned Gym da9f671:
| Agent Server implementation | RL request fields rejected |
|---|---|
hermes_agent |
top_p, max_output_tokens |
pi_agent |
temperature, top_p, max_output_tokens |
codex_agent |
temperature, top_p, max_output_tokens |
opencode_agent |
temperature, top_p, max_output_tokens |
openclaw_agent |
temperature, top_p, max_output_tokens |
These entries refer to the named server implementations and their session request handling; they do not cover every older server that can launch the same harness. This is not a claim that all coding training is broken: the existing swe_agents OpenHands integration handles these controls. The local reproduction below covers Hermes only; the other four entries are source inspection.
RL already sends these controls before #4429. Hermes uses the same request validator for its session and compatibility execution paths.
Steps/Code to reproduce bug
From a Gym environment with Hermes dependencies installed:
from types import SimpleNamespace
from fastapi import HTTPException
from nemo_gym.openai_utils import NeMoGymResponseCreateParamsNonStreaming
from responses_api_agents.hermes_agent.app import HermesAgent
params = {
"input": [{"role": "user", "content": "Fix the repository bug."}],
"temperature": 1.0, "top_p": 1.0, "max_output_tokens": 1024,
}
for remove in ((), ("max_output_tokens",), ("max_output_tokens", "top_p")):
body = NeMoGymResponseCreateParamsNonStreaming.model_validate(
{key: value for key, value in params.items() if key not in remove}
)
try:
HermesAgent._validate_request(SimpleNamespace(_model_name=lambda: "policy_model"), body)
print("accepted")
except HTTPException as error:
print(error.status_code, error.detail)Observed with the source-extracted validator:
422 Hermes does not support the total max_output_tokens budget; configure max_tokens for a per-model-call limit instead
422 Hermes does not support request field top_p
accepted
The local CPU check used the actual RL input builder and Gym request schema with the source-extracted Hermes validator, avoiding installation of the harness. This is not an HTTP-server, sandbox, or GPU training result.
Expected behavior
Define a consistent generation-control contract between RL and these Gym Agent Servers that preserves sampling settings on actual model calls. Define whether the generation limit is per model call or across the episode, and enforce that meaning. Simply dropping the fields does not establish correct training behavior.
Environment details / relevant configuration
- RL:
99341ff53ebe9653f6b5c22360b744f1ebd01507(#4429). - Pinned Gym:
da9f671490c3400f7ec43af85f0f7746c4a1e82b. - RL: temperature/top_p
1.0, max_new_tokens1024; Hermes max_tokens1024. - Source inspection of Gym main
717c04a3still shows both rejections.
Temporary validation workaround
Track the permanent fix separately from RL #4429. A Hermes-only experiment patch permits these request fields only when they match a fixed sampling profile enforced by Gym's Model Server. The test disables validation and explicitly uses a per-model-call token cap, not an episode-wide budget. Any subsequent training evidence will disclose the patch and link this issue; no completed coding training run is claimed here.
Activity
[-]Hermes rejects generation controls sent by NeMo-RL[/-][+]Coding-agent servers reject generation controls sent by NeMo-RL[/+]zyzhou5 commentedon Oct 21, 2026
Resolved in #4867
feat(rollouts): carry a training framework's sampling values to every…
feat(rollouts): carry a training framework's sampling values to every…
feat(rollouts): carry a training framework's sampling values to every…
feat(rollouts): carry a training framework's sampling values to every…
feat(rollouts): carry a training framework's sampling values to every…
feat(rollouts): carry a training framework's sampling values to every…
feat(rollouts): carry a training framework's sampling values to every…
feat(rollouts): carry a training framework's sampling values to every…
feat(rollouts): carry a training framework's sampling values to every…
feat(rollouts): carry a training framework's sampling values to every…