Skip to content

feat(pr-review): add llm-extra-body input for provider-specific request fields - #544

Open
arpit-acceleratedata wants to merge 3 commits into
OpenHands:mainfrom
accelerate-data:feat/pr-review-llm-extra-body
Open

feat(pr-review): add llm-extra-body input for provider-specific request fields#544
arpit-acceleratedata wants to merge 3 commits into
OpenHands:mainfrom
accelerate-data:feat/pr-review-llm-extra-body

Conversation

@arpit-acceleratedata

Copy link
Copy Markdown

Summary

Adds an optional llm-extra-body input to the pr-review action. It is a JSON object forwarded to the SDK LLM as litellm_extra_body.

Why

Some models think by default and expose the switch only as a request-body field. Qwen3.8 on Alibaba Model Studio is one: thinking is on by default and is controlled by enable_thinking or thinking_budget (docs). The action only passes model, key, and base URL, so there was no way to send it. On our repo a review with openai/qwen3.8-flash made ~28 model calls with full reasoning and hit the 20 minute job timeout without posting.

With llm-extra-body: '{"enable_thinking": false}' the same call drops from ~280 s to ~12 s in a direct API test.

Changes

  • action.yml: new optional input llm-extra-body (default ''), passed as LLM_EXTRA_BODY to the run step.
  • scripts/agent_script.py: parse LLM_EXTRA_BODY as JSON; must be an object; set litellm_extra_body. Invalid input exits with a clear error.
  • README.md: input table row.

Notes

  • Ignored in ACP mode, same as llm-base-url.
  • No behaviour change when the input is empty.

…st fields

Some models think by default (for example Qwen3.8 on Model Studio) and
only expose the switch as a request-body field such as enable_thinking or
thinking_budget. The review agent had no way to send it, so every call
paid full reasoning time and long reviews hit the job timeout.

The new optional input is a JSON object forwarded to the SDK's existing
litellm_extra_body. Invalid JSON or a non-object fails fast with a clear
error. Ignored in ACP mode, like llm-base-url.
@github-actions github-actions Bot added the type: feat A new feature label Sep 8, 2026
…nt checks

Fail fast in validate_environment(), before any GitHub call, instead of
at LLM construction.
Maps to the SDK's max_iteration_per_run. A model that explores without
a plan can burn the whole workflow timeout and post nothing; a cap ends
the run early with a clear error.
@all-hands-bot

Copy link
Copy Markdown
Contributor

👋 This PR needs a couple of things fixed before OpenHands can review it:

  • the PR description's HUMAN: section needs at least 20 characters describing what you tested, not just the template placeholder

Push an update once this is addressed and this check re-runs automatically.

This is an automated check - no AI was used to generate this comment.

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

Labels

type: feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants