Skip to content

feat(aviary): consolidate Hypotest and support final assistant responses - #3792

Draft
arnavkomaragiri wants to merge 1 commit into
mainfrom
akomaragiri/aviary-hypotest-final-response
Draft

arnavkomaragiri wants to merge 1 commit into
mainfrom
akomaragiri/aviary-hypotest-final-response

Conversation

@arnavkomaragiri

Copy link
Copy Markdown
Contributor

Aviary currently stops when an environment reports completion, so a terminal submit_answer tool call cannot be followed by a final assistant message. This consolidates the OpenSandbox Hypotest integration from 7c7b439 and the final-response support from 774fb1c into the existing Aviary integration.

  • Keep Hypotest configuration, dependencies, result metadata, and judge-failure masking in resources_servers/aviary/. The OpenSandbox config uses hypotest_app.py; there is no separate bbh_hypotest server.
  • Add opt-in generate_final_response_after_done: make exactly one additional model call with tools disabled, including when completion reaches max_steps. Preserve both trajectory output formats and do not execute any tools from that final call.
  • Have the agent request feedback suppression for those Hypotest sessions. submit_answer returns Answer submitted. for both correct and incorrect answers, while scoring and verifier metadata remain available outside the policy context.
  • Pin hypotest[opensandbox] to afcc132, which adds the default-on include_answer_feedback setting. Current Gym's OpenAI and Pillow pins resolve successfully, so the older OpenAI override is unnecessary.

No separate issue: this is a focused consolidation of the two linked commits and the accompanying feedback-leakage fix.

Compatibility: final-response generation remains disabled by default and is enabled in the new OpenSandbox config. Enabling it adds a final model call and changes the trajectory context; the verifier continues to score the submitted answer, not the later assistant text. Deployments using the earlier branch config should switch to resources_servers/aviary/configs/bbh_hypotest_opensandbox.yaml and the aviary resource-server component. Remote Aviary dataset servers must configure Hypotest's include_answer_feedback: false separately if they enable a final model turn.

Validation (Python 3.13.14):

  • Installed the final resources_servers/aviary/requirements.txt successfully without dependency overrides.
  • gym env test +entrypoint=responses_api_agents/aviary_agent +should_validate_data=true +skip_venv_if_present=true: 13 passed.
  • gym env test +entrypoint=resources_servers/aviary +should_validate_data=true +skip_venv_if_present=true: 10 passed, 1 existing Docker/data-dependent test skipped; example data validated. Both suites used the prepared environment containing the final Git-pinned dependency.
  • Hypotest: pytest tests/test_answer_feedback.py tests/test_interpreter_env.py tests/test_dataset.py -k 'answer_feedback or submit_answer_marks_done or remote_capsule or remote_only_opensandbox' -q -o asyncio_mode=auto: 9 passed. Removing feedback suppression makes both relevant regression cases fail. Pinned Ruff reports no new findings; the upstream interpreter retains 8 pre-existing lint findings.
  • Resolved the OpenSandbox config with deployment values and validated the agent/resource schemas.
  • pre-commit run --all-files: passed.
  • DCO sign-off included. CI classification: server-only; repository CI will provide core/sandbox coverage and changed-server checks.

Real rollout evidence: a synthetic arithmetic task completed through the Gym agent, model, and resource HTTP endpoints with a remote OpenSandbox and an externally hosted OpenAI-compatible API judge endpoint. The policy called run_cell (observed mean 4.0), then submit_answer, then produced a final assistant message. The judge awarded 3/3 points, reward 1.0, with no judge failure. There were 3 policy calls. The final model request had tools: [], tool_choice: none, and the neutral Answer submitted. observation; neither correctness feedback string appeared in that context. The sandbox was terminated successfully. Correct and incorrect feedback suppression are both covered by deterministic tests.

Smoke overlays, credentials, endpoint/model identifiers, and full rollout logs remain local and are excluded from this PR.

Signed-off-by: Arnav Chandra Komaragiri <akomaragiri@nvidia.com>
@arnavkomaragiri arnavkomaragiri added feature New capabilities, enhancements, or enablement work area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers labels Sep 29, 2026
@copy-pr-bot

copy-pr-bot Bot commented Sep 29, 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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers feature New capabilities, enhancements, or enablement work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant