feat(pr-review): add llm-extra-body input for provider-specific request fields - #544
Open
arpit-acceleratedata wants to merge 3 commits into
Open
Conversation
…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.
…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.
Contributor
|
👋 This PR needs a couple of things fixed before OpenHands can review it:
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional
llm-extra-bodyinput to thepr-reviewaction. It is a JSON object forwarded to the SDKLLMaslitellm_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_thinkingorthinking_budget(docs). The action only passes model, key, and base URL, so there was no way to send it. On our repo a review withopenai/qwen3.8-flashmade ~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 inputllm-extra-body(default''), passed asLLM_EXTRA_BODYto the run step.scripts/agent_script.py: parseLLM_EXTRA_BODYas JSON; must be an object; setlitellm_extra_body. Invalid input exits with a clear error.README.md: input table row.Notes
llm-base-url.