Skip to content

feat(osworld): add taskgen plugins, reward modes, and capture-aligned history - #4896

Merged
yfw merged 10 commits into
NVIDIA-NeMo:mainfrom
JeffPengCoder:jepeng/osworld-taskgen-served-history
Nov 6, 2026
Merged

yfw merged 10 commits into
NVIDIA-NeMo:mainfrom
JeffPengCoder:jepeng/osworld-taskgen-served-history

Conversation

@JeffPengCoder

@JeffPengCoder JeffPengCoder commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Based on main at 273d709ccc9dcbf0b95e5092bc1d7fa3f232fba8. The required foundations are merged; this is no longer a stacked integration branch. The final diff is limited to ten files under responses_api_agents/osworld_agent/. The served-history tests import internal completion helpers from their defining module; the token-capture public API matches main byte for byte.

This PR adds two capabilities:

  • Generated-task evaluators and reward modes. Register task-carried getter/metric plugins before DesktopEnv.reset(), check the declared module digest, and refuse replacement of OSWorld built-ins. Registrations are task-scoped and cleared on success, errors, and cancellation during environment cleanup. The remote Resources Server path rejects these plugins. Keep binary as the default reward, preserve raw, and add opt-in signed_v1: success earns 1; unsuccessful DONE earns -1; other evaluated outcomes earn 0.
  • Capture-aligned accepted history. When training-token capture is enabled and exact per-call token evidence is not returned to the agent, return accepted served generations verbatim, including original thinking and successful retries. Preserve rejected attempts separately in complete trajectory/capture evidence. Previously, synthesized per-step output stripped thinking, preventing returned-history attribution from matching capture records.

This is a follow-up integration feature and a captured-history bug fix; no separate issue is required. The README documents the contracts, trusted-plugin boundary, selection behavior, and dependency provenance.

Review follow-up

Commit 629d61c7cf463250da2441f956cffa93fd00a2ea addresses the two review threads:

  • Task-scoped plugin cleanup: undo registrations in an outer cleanup finally, including partial registration, reset, rollout, evaluator, environment-close errors, and cancellation while closing. Cleanup compares callable object identity, so aliases/partials are removed without deleting built-ins or later replacements. Registration ownership is keyed by module/name so registering a getter cannot authorize replacement of a same-named metric built-in. Sequential tasks on a reused Ray worker can reuse names with different implementations or share a getter with different metrics.
  • Accepted history versus complete evidence: only accepted calls enter the new capture-history output; all attempts remain in evidence. Empty accepted output stays empty instead of falling back to synthesized action text. terminal_response_id still names the last observed non-empty served response, even when rejected; it is never silently reassigned to an earlier accepted call. A rejected terminal without a served ID fails response construction rather than enabling false fallback attribution.

For RL selection, returned_history consumes accepted output; all_captured explicitly permits rejected captured attempts, subject to completion/evidence checks. The paired RL selector rejects a rejected terminal absent from accepted history, and its metadata planner rejects selected continuations whose captured parent was omitted. This PR does not add those parents to the loss, rewrite prompts, fabricate roots, or change Gym runtime admission/reward to bypass those checks. Consumers must choose an explicit compatible selection policy for those cases.

Dependencies and provenance

The required foundations are already in main, and their merge commits are ancestors of this branch's base:

PR Merged commit Foundation used here
#3591 8af4df7ef Isolated component runtimes, setup configuration, and rollout identity
#4128 11c874b22 Shared token capture, lineage, and external staging
#4822 6416352bf Docker-create reconciliation and E2B endpoint/worker transport

The existing OSWorld source dependency is unchanged from this main base: both the agent's pyproject.toml and the Resources Server's pyproject.toml reference the public JeffPengCoder/OSWorld fork at f32ab2b74. A fresh managed CI environment installs that source archive; it does not require access to a private repository or private VM assets. Plugin/reward/history unit tests use stand-ins rather than a live desktop; an actual rollout still requires the OSWorld runtime and desktop assets.

The original experimental integration also carried #3368, the separate optional simple-agent compaction migration, and #4823, shared HTTP-client shutdown and wildcard-host fixes. #4823 subsequently merged as 9d6e0c282; #3368 remains separate. Neither is bundled here or required to merge these taskgen/reward/served-history changes. OSWorld's own history policy does not depend on the optional simple-agent compaction package.

The two original changes are preserved as df6c3741a and 37b2eb59c; bea228184 adds documentation and format-only cleanup, and 629d61c7c contains this review follow-up. The four original commits remain intact and have DCO sign-off. Two additional signed merge commits synchronize main without rewriting those commits. The leaf-package review fix removes the temporary completion-helper exports, so the final diff contains no Gym core changes. This additional signed follow-up is faffcd6c27ef254f0fa5db7cb2a6cfca0ea4cf1e. This branch does not modify Gym core, sandbox providers, model servers, dependencies, lockfiles, or deployment scripts.

Compatibility and scope

  • Canonical OSWorld task setup and evaluator definitions remain unchanged. Tasks without taskgen_plugins are unaffected.
  • Task-carried Python executes in the agent's evaluator process. Only trusted task sources are supported; the digest is a consistency check, not an authenticity or isolation guarantee.
  • Binary reward remains the default. signed_v1 is opt-in and does not penalize reaching the horizon without DONE; it is not a recommended benchmark default. Reported success/raw-score metrics remain separate from this reward mapping.
  • Capture-disabled output and the existing exact per-call token-evidence path retain their behavior. That compatibility path still exports exact parser-retry calls; the new accepted-history filtering does not silently change it.
  • Under capture, returned_history loss membership intentionally changes for rejected attempts. Full capture evidence and explicit all_captured selection remain available. Do not compare training recipes without recording the selection policy.
  • Model prompts, 3-10-3/history policy, sampling settings, action parsing, evaluator scores, reward mapping, and runtime admission are unchanged by the review fix.
  • Missing observed responses supply no returned-content witness; they are not proof that inference never ran. The capture ledger remains authoritative.
  • This main-based branch does not restore an older capture implementation or claim byte identity with the earlier experimental runtime.

Leaf-package review fix (2026-11-06)

Current head: faffcd6c27ef254f0fa5db7cb2a6cfca0ea4cf1e.

Apply the exact minimal patch proposed by Yi-Fu in review: remove the added TYPE_CHECKING import and the two facade exports from nemo_gym/models/token_capture/__init__.py, and import those internal helpers directly from nemo_gym.models.token_capture.completion in the OSWorld served-history test. The public-API facade checker governs already-exported names; a test-only helper does not need a public export. The token-capture public API is now byte-identical to main, and the final PR diff returns to the ten OSWorld-agent files.

The previous synchronization introduced a real regression. Resolving every public token-capture name loaded ChatCompletionsConverter, OpenAI and httpx; test_package_is_dependency_free_leaf failed. The original local selection omitted that invariant. The authorized CI run on 9e2e3016a5141000a275a8f6d38299fe77cd786e reported 1 failed, 5469 passed, 67 skipped, 33 warnings and 24 passed subtests in 337.88 seconds in Core shard 2. Its sole failing test was the leaf-package check (leaf package pulled in: httpx,openai); the two aggregate gates then failed. All eight server-suite shards passed.

Validation of this fix:

  • Unmodified reviewed head: the leaf-package test fails locally; the isolated minimal fix passes that test.
  • Entire token-capture test module, public API/facade suites and OSWorld agent tests: 1584 passed, 0 failed, 0 skipped, 5 warnings in 28.87 seconds. The exact validated patch was then applied to the PR branch and byte-compared before commit; source paths were asserted against the isolated worktree.
  • pre-commit run --all-files --show-diff-on-failure and git diff --check: passed on the PR branch before commit. No unrelated hook changes remained. DCO sign-off is included.
  • No repository tests or test assertions were changed; only the served-history test import changes. The completion helpers, parser, prompts, model-output handling, history policy, reward mapping and task-plugin code are unchanged. No live model/VM rollout or new benchmark was run for this import/export-only correction.
  • Fresh upstream CI for this new head remains to be checked. The earlier /ok to test authorization named 9e2e3016a5141000a275a8f6d38299fe77cd786e; repository rules require authorization of an unverified new head separately.

Main synchronization (2026-11-05; historical synchronization head)

Synchronization head: 9e2e3016a5141000a275a8f6d38299fe77cd786e. Main: 273d709ccc9dcbf0b95e5092bc1d7fa3f232fba8. Main is an ancestor of the branch (0 commits behind). The original four signed feature/review commits are preserved; the update uses two normal merge commits and no force push. Main advanced by one commit during validation, so that increment was included as well.

  • The only merge conflict was in _build_response. Keep both the served terminal_response_id and main's typed admission/sandbox failure fields.
  • Update the served-history tests to ChatCompletionsConverter and current package imports. This synchronization head temporarily exported two completion helpers through nemo_gym.models.token_capture; the later leaf-package review correctly identified that the export violates the dependency boundary. The follow-up below removes those exports without changing the helper implementations.
  • Two regression cases cover accepted captured history together with typed evaluator/model failure fields.
  • Byte comparisons against both the original PR head and final main pass for action_parser.py, adapter_agents.py, history_policy.py, and rollout_outcome.py. Plugin and reward modules match the original PR byte for byte. Eight function AST comparisons preserve accepted-history/terminal handling, existing normalization/recovery, and main's failure-reporting helpers.

Validation:

  • Final merged source: 79 passed across served-history tests and the two reverification suites affected by the last main increment; pre-commit run --all-files --show-diff-on-failure and git diff --check main...HEAD passed.
  • Broader regression on the first merged tree (5193f9c3b2eca06e444acd430ad2c86824aff85e): 1655 passed, 6 failed, covering OSWorld agent, Resources Server, benchmark, completion/served-ID/ledger/external-capture, public API/facade, layering and import-migration checks. Four failures were localhost bind restrictions; all 4 passed when repeated with localhost permissions. This resolves the same 1661 test identities to 1659 passed, 2 remaining failures; it is not a claim that the first full command exited successfully.
  • One remaining failure is benchmarks/osworld/tests/test_run_scripts.py::test_managed_osworld_agent_installs_opensandbox_sdk: it expects nemo-gym[dev] but the base declares nemo-gym[dev,ray]. The same assertion was freshly reproduced on unmodified main b625dcc8b4ff274b1855548e118c84487ba406cd; the relevant source remains unchanged in the last main increment.
  • The other is resources_servers/osworld/tests/test_import_runtime.py::test_desktop_runtime_imports_with_cpu_torch: this local test environment does not install desktop_env, so the runtime-import check cannot pass here. It is not counted as passed or silently skipped.
  • The OSWorld agent, Resources Server, benchmark and token-capture feature sources are byte-identical between the first merged tree and the final merged tree. The final increment changes only reverification code/tests and its docs; its focused 79-test command passed.
  • Python 3.13.14, aiohttp 3.14.4 and Ray 2.58.0; the latter two were installed in a separate validation environment at the versions in main's lockfile. Source paths were asserted to point to the current worktree before tests.
  • No new live-model/VM rollout or benchmark was run for this branch synchronization. These checks do not establish score equivalence or qualify a training run. Existing completed experiment snapshots and scores were not altered.

Earlier review-fix validation (629d61c7cf463250da2441f956cffa93fd00a2ea)

Local checks on that earlier review-fix source, Python 3.13.14:

  • OSWorld agent, Resources Server, benchmark tests, and focused shared completion/served-ID/ledger/external-capture tests: 659 passed, 1 failed. The reused venv's editable namespaces were explicitly bound to the current worktree and source paths asserted before collection.
  • The sole failure is the existing base assertion benchmarks/osworld/tests/test_run_scripts.py::test_managed_osworld_agent_installs_opensandbox_sdk: it expects nemo-gym[dev], but the unchanged base declares nemo-gym[dev,ray]. The same failure was previously reproduced in a clean worktree at the main base. The test and installation inputs remain unchanged; no unrelated fix is included.
  • Negative control: restoring the affected functions from pre-fix bea228184 in an isolated Python process makes all 13 selected behavioral regression cases fail, covering cross-task leakage and rejected/synthetic history. Current source passes those cases.
  • Direct CPU compatibility probes against NeMo-RL 6e68b1791, the revision cited in review, executed its actual call selectors and unchanged CPU metadata-planner function with current Gym schemas. Six cases passed: normal returned_history; normal all_captured; rejected-terminal rejection under returned_history; rejected-terminal acceptance under all_captured; missing-rejected-parent rejection under returned_history; and valid ancestry under all_captured. This is a metadata/selection check, not tensor reconstruction or optimizer validation.
  • The exact-token retry compatibility test passes with the capture-history flag both off and on.
  • pre-commit run --all-files, focused Ruff checks, and git diff --check: passed; no unrelated hook changes remained.

Historical real-model evidence: the original integration tree completed 31 optimizer steps of OSWorld GRPO training with Nano Omni, NeMo-RL #4124 + #4200, all_captured selection, 200-step episodes, and 32 rollouts per step. This predates the review fix and is not a fresh qualification of this head. A fresh live-model/VM rollout and GPU training were not run for this follow-up; the new checks do not establish score equivalence or end-to-end training throughput.

There are no outstanding prerequisite PRs for this scope. Normal review and required CI still apply; upstream CI for the new head must be checked independently of local validation.

@copy-pr-bot

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

@svcnvidia-nemo-ci svcnvidia-nemo-ci added area:agent Agent harnesses and Responses API agent behavior feature New capabilities, enhancements, or enablement work labels Oct 22, 2026
JeffPengCoder and others added 3 commits October 28, 2026 10:15
Generated (taskgen) OSWorld tasks may judge with getters/metrics they carry themselves: taskgen_plugins.register_task_plugins registers them before env.reset() so DesktopEnv resolves them by name, and refuses them on the remote Resources Server path.

reward_modes.reward_from_score maps the evaluator score and the agent's terminal action to the training reward: binary (default), raw, or signed_v1 (1 on success, -1 for a DONE on an unfinished task, 0 otherwise).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Jeff Peng <[email protected]>
With training-token capture on, the agent gets no token arrays, so its output fell back to synthesized msg-step-N messages: thinking stripped, one per environment step, parse retries missing. Capture fingerprints what the model server served, so returned_history selection found no match on the first call.

When capture is on and there is no exact per-call evidence, the agent now returns one assistant message per served model call, with the text as served (thinking included), parse retries included; calls with no response or with empty served content (a local context-overflow answer) are skipped. The served Chat id is kept beside each structured response, and the top-level terminal_response_id names the last served call. Behaviour without capture is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Jeff Peng <[email protected]>
Document trusted generated-task evaluator plugins, reward mappings, served-call history, and the merged Gym foundations. Distinguish the separate optional compaction and HTTP-lifecycle PRs. Apply repository formatting to this PR only; no runtime behavior change.

Signed-off-by: Jeff Peng <[email protected]>
@JeffPengCoder
JeffPengCoder force-pushed the jepeng/osworld-taskgen-served-history branch from 3116a37 to bea2281 Compare October 28, 2026 02:47
@JeffPengCoder JeffPengCoder changed the title feat(osworld): taskgen task plugins, reward modes, and served-call history under token capture (stacked on #4128, #3368) feat(osworld): add taskgen plugins, reward modes, and capture-aligned history Oct 28, 2026
@JeffPengCoder
JeffPengCoder marked this pull request as ready for review October 28, 2026 02:48
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the needs-review PR is ready for code review and waiting on a reviewer label Oct 28, 2026
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 29, 2026
@github-actions github-actions Bot removed the sla:triage-overdue Review assignment is over the one-business-day SLA label Nov 2, 2026
yfw
yfw previously approved these changes Nov 5, 2026
Merge upstream main b625dcc
into the branch for PR NVIDIA-NeMo#4896 without rewriting its four signed commits.

Resolve _build_response by retaining the served terminal response ID and
main's typed admission/sandbox failure fields. Keep accepted history,
task-scoped plugin cleanup, reward modes and action parsing unchanged.

Migrate served-history tests to the package APIs and renamed
ChatCompletionsConverter. Export the two existing completion evidence
helpers from the token-capture public API as required by the new layout.
Cover captured history together with evaluator/model failure metadata.

Signed-off-by: Jeff Peng <[email protected]>
Merge upstream main 273d709,
which advanced while the PR NVIDIA-NeMo#4896 synchronization was being validated.
The additional upstream change concerns selected-answer reverification;
the OSWorld feature, protocol, configuration and test sources are unchanged.

Signed-off-by: Jeff Peng <[email protected]>
@yfw

yfw commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

/ok to test 9e2e301

yfw
yfw previously approved these changes Nov 5, 2026
Remove the completion_items and output_item_fingerprint facade exports
and import their defining module in the OSWorld served-history test.
Resolving all public token-capture names must not load the OpenAI client
or httpx through ChatCompletionsConverter.

Apply the exact minimal change proposed in Yi-Fu's review:
NVIDIA-NeMo#4896 (comment)

The token-capture facade now matches the main base byte for byte.
Completion helpers, parser, model output handling and test assertions
are unchanged. Token-capture, public-API/facade and OSWorld agent tests:
1584 passed.

Signed-off-by: Jeff Peng <[email protected]>
@yfw

yfw commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

/ok to test faffcd6

@JeffPengCoder

Copy link
Copy Markdown
Collaborator Author

/ok to test 5f782b0

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/42141491876

Merged via the queue into NVIDIA-NeMo:main with commit dc9ed70 Nov 6, 2026
61 checks passed
jinglinglingling pushed a commit to jinglinglingling/Gym that referenced this pull request Nov 16, 2026
The exact per-call token-evidence path again exports all calls, including parser retries,
as the README and NVIDIA-NeMo#4896 describe. Capture-on returned history is unchanged.

Signed-off-by: Linglin Jing <[email protected]>
khazic pushed a commit to khazic/Gym-lao that referenced this pull request Nov 20, 2026
* feat(osworld): add NeMo RL runtime profiles

Signed-off-by: Linglin Jing <[email protected]>

* fix(osworld): forward Gym config to Ray rollout task

Signed-off-by: Linglin Jing <[email protected]>

* fix(osworld): sanitize setup cleanup commands

Signed-off-by: Linglin Jing <[email protected]>

* fix(model): re-read endpoint file after polling interval

Signed-off-by: Linglin Jing <[email protected]>

* feat(osworld): restore 3-10-3 training compaction

Signed-off-by: Linglin Jing <[email protected]>

* fix(osworld): replace fixed compaction params

Signed-off-by: Linglin Jing <[email protected]>

* fix(osworld): align sandbox create budget with readiness

Signed-off-by: Linglin Jing <[email protected]>

* fix(osworld): isolate OpenSandbox transport loop

Signed-off-by: Linglin Jing <[email protected]>

* fix(osworld): replay accepted served calls and keep Code in history

Replay the served completion inside the live window so prefixes stay
continuous, keep the policy's original Code in compacted turns (raw_full),
expose only accepted calls as loss membership, and carry served
response_id through exact traces.

Signed-off-by: Linglin Jing <[email protected]>

* feat(osworld): optional stop-on-context-overflow policy with prompt token limit

Under the shrink policy a trajectory near the window overflows on every
later turn, and each shrink re-prefills the prompt and starts a new
captured row. The stop policy ends the rollout at the first overflow and
scores it as a policy stop, so the evaluated trajectory stays trainable.
context_prompt_token_limit rejects served calls whose prompt left less
than the reserved output room, since the server clamps max_tokens.

Signed-off-by: Linglin Jing <[email protected]>

* fix(osworld): fail unterminated episodes like the reference agent

The adapter scored an episode on its final state when the policy never
returned computer.terminate: at the step horizon, after exhausting parse
retries, or at the context-limit stop. Training under that rule stopped
rewarding termination, and the policy drifted to printing a completion
message instead, which the reference Nemotron evaluator scores 0.

unterminated_episode_policy=fail executes FAIL in those three cases, as
the reference agent does. Transport failures remain runtime facts for
admission. The default keeps the published contract unchanged; the NeMo
RL OpenSandbox profile opts in.

Signed-off-by: Linglin Jing <[email protected]>

* feat(osworld): report how each episode ended

Classify every evaluated episode as done, agent_fail, forced_fail or
unterminated, print one OSWORLD_EPISODE_END line per episode, and expose
one-hot episode_end_* scalars on the verify response so trainers can log
them per step.

Signed-off-by: Linglin Jing <[email protected]>

* feat(osworld): opt-in options that reproduce pre-rebase cc_app training

Each option defaults to the current behavior and is enabled through an
OSWORLD_* environment variable in osworld_nemo_rl_opensandbox.yaml.

- cc_chunk_turns_as_generated / cc_prompt_token_guard: inside a context
  chunk, continue from the tokens the model generated and start a new
  chunk before the prompt exceeds the guard, as cc_app did.
- legacy_response_parser: parse actions with the pre-rebase OSWorld
  parser, including its Action header completion.
- rollout_timeout_s: agent-loop budget counted from the first step;
  reaching it ends the rollout as a timeout, which is not trained.
  cc_app trained with 1200s and evaluated with 7200s.
- mask_unterminated / mask_context_limit: do not train rollouts that end
  without a terminal action or at the context limit.
- Loss membership follows a loss_member flag so a rejected terminal call
  can be trained when train_invalid_terminal_call is set.

Signed-off-by: Linglin Jing <[email protected]>

* feat(osworld): let training keep partial OSWorld scores

Expose reward_mode through OSWORLD_REWARD_MODE (default binary). The
pre-rebase resources server trained on the raw evaluator score.

Signed-off-by: Linglin Jing <[email protected]>

* style(osworld): apply ruff format after rebase onto main

Signed-off-by: Linglin Jing <[email protected]>

* docs(osworld): name the legacy nemotron_osworld agent instead of pre-rebase

Signed-off-by: Linglin Jing <[email protected]>

* docs(osworld): describe training options by behavior

Signed-off-by: Linglin Jing <[email protected]>

* test(osworld): import ChatCompletionsConverter from the public API

The core public-API facade test rejects imports from nemo_gym.models submodules.

Signed-off-by: Linglin Jing <[email protected]>

* fix(osworld): emit ng_trajectory as a typed TrajectoryRecord

Gym's collector validates ng_trajectory as a TrajectoryRecord and drops a hand-built dict.
Build one TrajectoryTurn per accepted call with ModelCallRef(model_ref, response_id), and
pass the policy server reference into _build_response.

Signed-off-by: Linglin Jing <[email protected]>

* fix(osworld): name the last accepted call when the prompt-token guard stops a rollout

A reply that context_prompt_token_limit rejects was named as terminal_response_id while
accepted history excluded it, so returned-history selection raised. Skip it, as the
server's local overflow reply is skipped, so a context-limit stop names the last accepted
call like a step-horizon FAIL.

Signed-off-by: Linglin Jing <[email protected]>

* fix(osworld): restore exact-trace output of every model call

The exact per-call token-evidence path again exports all calls, including parser retries,
as the README and NVIDIA-NeMo#4896 describe. Capture-on returned history is unchanged.

Signed-off-by: Linglin Jing <[email protected]>

* fix(osworld): stop forwarding NEMO_GYM_CONFIG_DICT to Ray rollout tasks

Ray logs a task's runtime_env env_vars at INFO, which exposed literal keys in the Gym config.
Since NVIDIA-NeMo#5093 the child builds its HTTP client without parsing argv, so the dict is not needed.
NEMO_GYM_CONFIG_PATH is still forwarded for sandbox attribution.

Signed-off-by: Linglin Jing <[email protected]>

* feat(osworld): report infrastructure-stopped episodes as aborted

A row with no terminal action and an infrastructure_failure_reason (reset failure, policy
transport failure, rollout timeout) now reports episode_end=aborted instead of unterminated.

Signed-off-by: Linglin Jing <[email protected]>

* fix(osworld): require cc_keep_last_groups >= 1

With 0, a chunk re-base dropped the current screenshot from the prompt.

Signed-off-by: Linglin Jing <[email protected]>

* fix(osworld): propagate context-overflow errors in the NeMo RL profile

Without propagate_context_overflow_errors, vllm_model turns an engine context refusal into an
empty length reply, so context_overflow_policy and mask_context_limit never see it.

Signed-off-by: Linglin Jing <[email protected]>

* docs(osworld): cite the source of the copied OSWorld parser

The parser functions come from mm_agents/nvidia/nemotron_agent.py in terrykong/OSWorld at
5d8c93592be588ab8e9909bed82f3b480fd4f533 (Apache-2.0).

Signed-off-by: Linglin Jing <[email protected]>

* revert(vllm_model): drop the endpoint_file polling change

No OSWorld configuration sets endpoint_file; Gym NVIDIA-NeMo#3532 carries this fix with a test.

Signed-off-by: Linglin Jing <[email protected]>

---------

Signed-off-by: Linglin Jing <[email protected]>
Signed-off-by: Linglin Jing <[email protected]>
Co-authored-by: Linglin Jing <[email protected]>

This branch was previously deployed

1 inactive deployment
public — 5f782b00 Deployed Nov 6, 2026 by copy-pr-bot[bot] via release / finalize / notify #10564
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 feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants