Skip to content

fix(swe_agents): forward max_output_tokens to the OpenHands llm config - #2449

Merged
marta-sd merged 3 commits into
NVIDIA-NeMo:mainfrom
michal2409:mfutrega/swe-agents-max-output-tokens
Aug 11, 2026
Merged

marta-sd merged 3 commits into
NVIDIA-NeMo:mainfrom
michal2409:mfutrega/swe-agents-max-output-tokens

Conversation

@michal2409

Copy link
Copy Markdown
Contributor

The request body's max_output_tokens is already mapped into inference_params as tokens_to_generate, but get_run_command never writes it into the generated OpenHands config.toml — only temperature and top_p are forwarded. OpenHands therefore runs with its own default output limit, and a caller-requested cap (e.g. from a training harness that budgets generation lengths) is silently ignored.

Forward it as llm.model.max_output_tokens when present; behavior is unchanged for requests that don't set it.

The request body's max_output_tokens is already mapped into
inference_params as tokens_to_generate, but get_run_command never writes
it into the generated OpenHands config.toml — only temperature and top_p
are forwarded. OpenHands therefore runs with its own default output
limit, and a caller-requested cap (e.g. from a training harness that
budgets generation lengths) is silently ignored.

Forward it as llm.model.max_output_tokens when present; behavior is
unchanged for requests that don't set it.

Signed-off-by: Michal Futrega <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Aug 10, 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.

@ananthsub
ananthsub requested a review from sdevare-nv August 10, 2026 15:56
@marta-sd
marta-sd enabled auto-merge (squash) August 11, 2026 09:51
@marta-sd
marta-sd merged commit 3b31312 into NVIDIA-NeMo:main Aug 11, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants