Skip to content

feat(agentic_if_realworld): accept medium and high effort, hosted APIs and an output-token limit - #7279

Open
jialeiwang wants to merge 1 commit into
mainfrom
charlwang/agentic-if-realworld-efforts-hub
Open

jialeiwang wants to merge 1 commit into
mainfrom
charlwang/agentic-if-realworld-efforts-hub

Conversation

@jialeiwang

Copy link
Copy Markdown
Contributor

What changed

The adaptive driver of agentic_if_realworld accepted a policy reasoning effort of null or max
only, read it only from chat_template_kwargs, and always asked for up to 131072 output tokens.
Three things could therefore not run: a model at medium or high effort, a hosted API that
refuses chat_template_kwargs, and a model whose own output-token limit is below 131072.

  • Efforts. medium, high and max are accepted, each with its own profile name:
    adaptive_first_complete_<effort>_effort_v1. Any other effort is refused before any work, as
    before. agentic_if_text (the raw_receipt.yaml profile) accepts the same three.
  • Hosted APIs. With vllm_model the driver also reads the effort from
    extra_body.reasoning_effort, which the model server sends as the request's own
    reasoning_effort, and names the profile from it. An effort set in both
    chat_template_kwargs and extra_body is refused.
  • Output-token limit. The Resources Server setting policy_output_token_limit keeps every
    scheduled attempt at or below a model's own limit: at 128000 the schedule is (17,32768), (17,65536), (17,128000), (29,128000), (43,128000). Seeds and the number of attempts do not
    change, so a limit at or below 65536 repeats one request in consecutive attempts. The limit is
    part of the run settings and of each task's fingerprint, so a resume across a different limit
    is rejected. Only the adaptive driver of the config.yaml profile reads it; the driver refuses
    it with agentic_if_text, whose server checks each attempt against the fixed schedule, and
    native.yaml does not use it.

Temperature 0.7, the seeds, the wrapper, the criteria and the judge settings are unchanged.

Why

The benchmark is run for model comparisons at each reasoning effort a model offers, and against
models reached through an OpenAI-compatible gateway. One such model refuses
chat_template_kwargs ("Extra inputs are not permitted") and refuses max_tokens above 128000,
so the last three scheduled attempts could never be sent. No issue is linked: the limits are in
the driver's own checks, shown in the diff.

Compatibility and benchmark-result impact

  • For a run with the effort unset or max in chat_template_kwargs, the profile name, the
    schedule and every run setting but the runtime identity are unchanged, and no score changes.
    The runtime identity covers the source files, so a run started on an earlier revision needs a
    new run directory, as after any change.
  • A vllm_model run that already set extra_body.reasoning_effort was recorded under
    adaptive_first_complete_v1 although it sent an effort. It now gets the effort's profile name,
    so a resume of such a run is rejected (new run directory), and values other than medium,
    high or max are refused.
  • policy_output_token_limit is recorded only when set.
  • A result at medium or high, or at an output-token limit, is a different profile from the
    frozen max and unset ones: compare like with like.

Validation

  • pytest resources_servers/agentic_if_realworld/tests responses_api_models/agentic_if_text/tests:
    414 passed.
  • New cases: the profile name at high on the raw_receipt.yaml profile and at medium, high
    and unset on config.yaml; the effort reaching the engine as
    chat_template_kwargs.reasoning_effort or as the request's reasoning_effort, never both; the
    second attempt asking for the limit instead of 65536; the run record keeping the limit; a
    resume at another limit rejected; eight refusals before any work (unknown efforts, both
    places, a non-positive or non-integer limit, the limit with agentic_if_text); schedule()
    at no limit, at 131072 and at 128000.
  • ruff check, ruff format --check and pre-commit run --files <the 11 changed files> pass.

Rollout evidence

Eight-task smoke on this commit, config.yaml profile, a hosted model behind an OpenAI-compatible
gateway that refuses chat_template_kwargs and more than 128000 output tokens, with
extra_body.reasoning_effort: max and policy_output_token_limit: 128000:

  • 8 of 8 tasks scored (5 pass, 3 fail), none masked, none undelivered.
  • The run record holds profile adaptive_first_complete_max_effort_v1 and
    policy_output_token_limit: 128000.
  • Every answer carries reasoning tokens, so the request's reasoning_effort was accepted and
    reasoning was on. Five tasks completed on the first attempt (cap 32768) and three on the
    second (cap 65536).

Rollouts hold private input traces and are not attached; the numbers above are aggregates.

…s and an output-token limit

The adaptive driver accepted a policy reasoning effort of null or max only, read it only from
chat_template_kwargs, and always asked for up to 131072 output tokens.

- Efforts: medium, high and max are accepted, each with its own profile name
  (adaptive_first_complete_<effort>_effort_v1). For an effort unset or max in
  chat_template_kwargs the profile name, the schedule and every run setting but the runtime
  identity are unchanged. The runtime identity covers the source files, so a run started on an
  earlier revision needs a new run directory, as after any change.
- Hosted APIs: an endpoint that refuses chat_template_kwargs reads the request's own
  reasoning_effort. With vllm_model the driver now also reads the effort from
  extra_body.reasoning_effort, names the profile from it, and refuses an effort set in both places.
- Output-token limit: the Resources Server setting policy_output_token_limit keeps every scheduled
  attempt at or below a model's own limit. It is recorded in the run settings only when set, and
  only the adaptive driver of the config.yaml profile reads it.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Signed-off-by: Jialei Wang <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Dec 4, 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 risk:mid Autobot PR risk: mid feature New capabilities, enhancements, or enablement work area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers needs-review PR is ready for code review and waiting on a reviewer labels Dec 4, 2026

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

LGTM, but please take a look at the following findings:

  • The new effort cases bypass configuration validation (finding).

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.


@pytest.mark.parametrize("reported", [None, {"prompt_tokens": 10, "completion_tokens": 2, "total_tokens": 12}])
@pytest.mark.parametrize("reasoning_effort", [None, "max"])
@pytest.mark.parametrize("reasoning_effort", [None, "medium", "high", "max"])

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.

NOTE (low risk)

What I tested
I ran the updated adapter tests against head and base. I also constructed TextModelConfig with medium and high.

What I found
Both test runs report 9 passed, although base rejects both efforts through the real config. SimpleNamespace bypasses validation, so removing the newly supported values would leave these cases green.

What I recommend
As a suggestion, construct a real TextModelConfig in these parameterized cases. Assert both efforts are accepted before checking the outgoing request and usage.

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 needs-review PR is ready for code review and waiting on a reviewer risk:mid Autobot PR risk: mid

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants