github The-PR-Agent/pr-agent v0.51.0

5 hours ago

⚠️ Breaking changes and upgrade notes

  • /improve now runs /review. The suggestions check run is gone (switch branch protection to review), and most [pr_code_suggestions] settings are ignored.
  • /answer and /auto_review are removed.
  • "tool" is now "command" with no aliases: pr_agent.tools is pr_agent.commands, and propagate_tool_errors, target_tools, push_outputs.tools and fail_on_tool_errors are renamed to their command forms. Old keys are silently ignored. Docs moved from /tools/ to /commands/.
  • The CLI exits 1 when a command fails, so CI jobs that passed on a failed review now go red.
  • New defaults: max_model_tokens 256000 (was 32000, may raise cost); /review posts findings inline, up to 6, with a "Since the last review" summary and sensitive-path risk checks.
  • enable_auto_approval now works: /review approves on GitHub and GitLab only when it finds no concerns, and withdraws its approval otherwise.

What's Changed

🚀 Features

🐛 Bug Fixes

  • fix(gitea): verify raw diff revisions before reading file contents by @PeterDaveHello in #4895
  • fix(review): preserve coverage warnings when no findings are reported by @Qiyuanqiii in #5217
  • fix(bitbucket): build line links on the canonical PR URL by @juunghyun in #5222
  • fix(ai-handlers): pass a date-shaped Azure API version from the environment as text by @juunghyun in #5220
  • fix(yaml): preserve falsy values recovered by the encoding fallback by @PeterDaveHello in #5215
  • fix(yaml): avoid logging successful falsy recoveries as parse failures by @PeterDaveHello in #5214
  • fix(review): recover fitting files beside oversized fallback patches by @PeterDaveHello in #5211
  • fix: let hosts scope Linear and Asana ticket context by @xixi-box in #5209
  • fix(review): skip source-free clips to retain useful review coverage by @PeterDaveHello in #5208
  • fix(providers): preserve trailing non-Git separators in suggestion diffs by @PeterDaveHello in #5210
  • fix(github): retry a transient failure on the first PR read by @Yi-111-a in #5189
  • fix(providers): retain Git line boundaries in rendered suggestion diffs by @PeterDaveHello in #5205
  • fix(mosaico): accept the documented @JSON bearer-token form at startup by @PeterDaveHello in #5198
  • fix(yaml): recover tilde YAML blocks embedded in prose by @zhengqiuyang in #5176
  • fix(review): preserve persisted finding state and resolved file headings by @PeterDaveHello in #5194
  • fix(gitlab): keep the /describe body within the API limit by @eric7h in #5186
  • fix(yaml): strip a dangling tilde or longer closing fence by @zhengqiuyang in #5177
  • fix(yaml): strip tilde wrappers around fenced content by @zhengqiuyang in #5175
  • fix(bitbucket): mark a failed file-content fetch unreadable by @zhengqiuyang in #5178
  • fix(bitbucket_server): keep comments within the API limit by @eric7h in #5172
  • fix(bitbucket_server): keep the /describe body within the API limit by @eric7h in #5173
  • fix(yaml): drop a sign-off after a longer wrapper fence by @chuenchen309 in #5169
  • fix(diff): preserve filename identity across prompt headers and fallback by @PeterDaveHello in #5168
  • fix(config): match numeric ignore settings as text by @andretorresdg in #5165
  • fix(mosaico): keep backticks inside a supplied fenced diff by @chuenchen309 in #5158
  • fix(yaml): strip four-backtick wrappers around fenced content by @zhengqiuyang in #5156
  • fix(review): prevent AI metadata misattribution from path trimming by @PeterDaveHello in #5088
  • fix(review): keep deleted/filtered notices in packed reviews by @PeterDaveHello in #5129
  • fix(review): resolve full ticket IDs despite shared numeric suffixes by @PeterDaveHello in #5167
  • fix(review): publish final action verdict by @utsab345 in #5152
  • fix(deps): reject malformed ZIP archives with uv 0.13.10 by @PeterDaveHello in #5153
  • fix(local): stop /describe comments from overwriting the review file by @PeterDaveHello in #5108
  • fix(polling): prevent lost commands from mixed-case bot mentions by @PeterDaveHello in #5118
  • fix(risk): scan diff lines with git boundaries by @utsab345 in #5151
  • fix(dedup): read four-backtick diff fences with nested code by @zhengqiuyang in #5142
  • fix: match user-supplied ignore and branch regexes with a timeout by @shu-chen-dot-ca in #5147
  • fix(review): count files the model never read as unreviewed for gated approval by @shu-chen-dot-ca in #5146
  • fix: only automatic and CLI runs write the unchanged-diff record by @Carlos0196 in #5037
  • fix: escape hidden comment markers echoed by /ask and /help by @shu-chen-dot-ca in #5148
  • fix(config): keep plain_diff content and output paths host-only by @seung-waedet in #5126
  • fix(cli): reject a target option written after the command instead of exiting 0 by @sheepdogs in #5141
  • fix: canonicalize host-only setting names by @utsab345 in #5127
  • fix(doctor): accept Databricks SDK auth without native keys by @PeterDaveHello in #5140
  • fix(webhooks): fail closed on invalid frozen Host settings by @PeterDaveHello in #5132
  • fix(webhooks): skip Azure and Bitbucket Server on Host read failure by @PeterDaveHello in #5131
  • fix(review): replan single chunks for smaller fallback models by @PeterDaveHello in #5128
  • fix(describe): escape HTML in long file walkthrough descriptions by @nurlanmnn in #5083
  • fix(describe): report incomplete large-PR file coverage by @PeterDaveHello in #5078
  • fix(local): reject incomplete branch comparisons without a merge base by @PeterDaveHello in #5117
  • fix(describe): keep hyphenated Mermaid node ids whole when adapting diagram direction by @thejesh23 in #5110
  • fix(mentions): neutralize mentions in HTML blocks, split table cells and URLs with backticks by @abhiramshaji-cyber in #5027
  • fix(azure): answer file-level questions with their diff by @tanishqbaweja in #5109
  • fix(ci): stop root-doc exclusions from skipping Python tests by @PeterDaveHello in #5074
  • fix(litellm): restore user attribution for prefixed and custom providers by @PeterDaveHello in #5090
  • fix(models): normalize Gemini 4 Hydrogen and Gemini reasoning ceilings by @PeterDaveHello in #5102
  • fix(ask_line): handle mixed-side diff ranges on GitLab and GitHub by @PeterDaveHello in #5098
  • fix(gitlab): keep the review state marker out of mention neutralizing by @abhiramshaji-cyber in #5026
  • fix(github): fence re-anchored fallback diffs and close details in place by @PeterDaveHello in #5096
  • fix(bitbucket-server): route PR comment commands directly to PRAgent by @PeterDaveHello in #5094
  • fix(review): publish merge recommendation status once when suppressed by @PeterDaveHello in #5095
  • fix(patch): preserve after-context size on pre-hunk context mismatches by @PeterDaveHello in #5093
  • fix(github-action): honor disable_auto_feedback on all automatic events by @PeterDaveHello in #5092
  • fix(review): support recursive ** globs in deterministic sensitive_paths by @PeterDaveHello in #5091
  • fix(litellm): preserve host opt-outs without promoting repo settings by @PeterDaveHello in #5087
  • fix(doctor): prevent Azure AD from bypassing non-Azure key checks by @PeterDaveHello in #5089
  • fix(cli): report decoding errors when reading a diff from stdin by @DoraC7 in #5086
  • fix(chunks): stop staggered batch dispatch on first-chunk cancellation by @PeterDaveHello in #5100
  • fix(providers): preserve submodule pointer diffs in Local Git and Gerrit by @PeterDaveHello in #5105
  • fix(azure): diff PR-added files against the incremental baseline by @PeterDaveHello in #5097
  • fix(bitbucket): delete Cloud comments returned by get_issue_comments by @PeterDaveHello in #5101
  • fix(bitbucket): preserve old_filename for renamed Cloud diff files by @PeterDaveHello in #5099
  • fix(changelog): strip tilde code fences too by @zhengqiuyang in #5106
  • fix(review): preserve custom labels that share review label prefixes by @PeterDaveHello in #5107
  • fix(docs): separate config reference group labels from tables by @PeterDaveHello in #5081
  • fix(github): neutralize mentions in published comments, reviews, replies and descriptions by @abhiramshaji-cyber in #4997
  • fix(gitlab): link expanded submodule files to the submodule project by @JokeWaumans in #5068
  • fix(labels): accept a custom label returned as its description by @JokeWaumans in #5066
  • fix(describe): propagate chunk cancellation before processing earlier chunks by @PeterDaveHello in #5065
  • fix(gitlab): answer file-level questions with their diff by @tanishqbaweja in #5062
  • fix(litellm): parse request flags as booleans and coerce config.seed by @Epi-Lo in #5039
  • fix(github-app): react to review comments through their own endpoints by @tanishqbaweja in #5057
  • fix: coerce quoted boolean settings from comment args and repo files by @SpinachDigital in #5058
  • fix: catch ProcessLookupError when reading /proc pid stat by @WillXing in #5052
  • fix(outputs): deliver built-in HTTP sinks concurrently by @PeterDaveHello in #5016
  • fix(unchanged-diff): avoid recording degraded runs as complete by @PeterDaveHello in #5011
  • fix(models): normalize Google Gemini 4 Argon reasoning levels by @PeterDaveHello in #5015
  • fix(telemetry): fold OTEL.EXPORTER_TYPE before the closed-set check by @inverteum in #5038
  • fix(webhooks): skip automatic commands when the host settings cannot be loaded by @emreocell in #5022
  • fix: drop removed command sections from per-directory allowlist by @tridev-tej in #5036
  • fix(add_docs): skip docs_blacklist extensions when packing the diff by @tridev-tej in #5035
  • fix(github_app): ship an empty webhook_secret in the secrets template by @qwist1233-cpu in #5034
  • fix(openai): log prompts and responses at DEBUG and honor the message-logging opt-out by @emreocell in #5023
  • fix: keep spend and provider logging keys out of comment arguments by @shu-chen-dot-ca in #5024
  • fix(litellm): honor message logging opt-out in diagnostics by @PeterDaveHello in #5013
  • fix(gitlab): post the unanchored suggestion fallback as a resolvable file-level thread by @mhufton in #5008
  • fix(openrouter): Resolve token budgets when SDK metadata is missing by @PeterDaveHello in #5012
  • fix(i18n): resolve Chinese script tags to shipped catalogs by @PeterDaveHello in #5009
  • fix(webhooks): enforce host exclusions before repo settings by @PeterDaveHello in #4853
  • fix(review): keep one failure notice and remove it after a review by @PeterDaveHello in #4984
  • fix(github): preserve suggestion deduplication after body rewrites by @PeterDaveHello in #4980
  • fix(gitlab): fall back when a draft suggestion cannot be anchored by @Carlos0196 in #5003
  • fix(describe): keep the author's text when the User description header is removed by @Carlos0196 in #4977
  • fix(github): use completed workflow jobs for head staleness by @jiangjiang248 in #4881
  • fix: send LiteLLM session id on auto commands and calls without a PR by @JRedOW in #4991
  • fix: protect AI call limits from comment overrides by @1cbyc in #4992
  • fix(output): preserve structured reviews when writing fails by @rudycelekli in #4666
  • fix(review): deduplicate failure modes before the output cap by @rudycelekli in #4671
  • fix(cli): exit non-zero when a command fails by @PeterDaveHello in #4982
  • fix(models): make native OpenCode Go requests reach the provider by @JRedOW in #4956
  • fix(cli): fail a skipped plain-diff run that owes a JSON file by @PeterDaveHello in #4983
  • fix(litellm): suppress LiteLLM's stdout hints on provider errors by @PeterDaveHello in #4981
  • fix(help_docs): use forward slashes in doc source links on Windows by @harshdazz in #4930
  • fix(gitlab): keep the /describe title within the API limit by @eric7h in #4973
  • fix(github): keep the /describe title within the API limit by @eric7h in #4972
  • fix(gerrit): bind the webhook server to PORT by @oleksii-tumanov in #4961
  • fix(github): stop repeating a denied user-login lookup by @PeterDaveHello in #4969
  • fix(review-context): prevent swallowed build timeout signals by @PeterDaveHello in #4957
  • fix: Preserve Prometheus overflow metrics without merging series by @PeterDaveHello in #4968
  • fix(gitlab): skip confidential issues in the MR's own project by @kvdb in #4919
  • fix(deps): Update OpenTelemetry to 1.45.2 to fix traceparent parsing DoS by @PeterDaveHello in #4967
  • fix(codecommit): keep the /describe title within the API limit by @eric7h in #4965
  • fix(gitlab): do not invent an importance score for /review fallback notes by @ira-at-work in #4396
  • fix(codecommit): keep the /describe body within the description limit by @eric7h in #4953
  • fix(tickets): keep the lowest-numbered sub-issues under the cap by @oleksii-tumanov in #4960
  • fix(tickets): skip date prefixes in branch issue numbers by @oleksii-tumanov in #4959
  • fix(help_docs): fall back when the model response is truncated by @oleksii-tumanov in #4958
  • fix(config): raise default max_model_tokens to 256000 by @SpinachDigital in #4951
  • fix: guard GitLab ticket context with project issue visibility by @xixi-box in #4932
  • fix: recover final YAML reflection feedback after code examples by @depohmel in #4858
  • fix(review): scope deterministic risk checks to incremental changes by @PeterDaveHello in #4945
  • fix: raise self-review prompt token budget to 256k by @bh1090 in #4949
  • fix: preserve PR descriptions before generated walkthroughs by @PeterDaveHello in #4854
  • fix(add_docs): preserve documentation suggestions in fallbacks by @PeterDaveHello in #4943
  • fix(context): reset request-scoped state after failures by @PeterDaveHello in #4942
  • fix(gitlab): honor string-valued SSL verify and thread-cleanup flags by @eric7h in #4904
  • fix(review-context): honor timeouts with blocked SIGALRM by @PeterDaveHello in #4933
  • fix(azure): pass work item tags to ticket prompts as labels by @shu-chen-dot-ca in #4903
  • fix(github): reject malformed file-level ask metadata by @PeterDaveHello in #4917
  • fix(gitlab): avoid retrying unconfirmed suggestion writes by @PeterDaveHello in #4894
  • fix(deps): update litellm to 1.109.1 and keep Azure OIDC cache scoped by @JRedOW in #4923
  • fix(telemetry): parse OTEL switches as booleans by @eric7h in #4928
  • fix(review-context): don't swallow the build timeout during grammar loading by @youssefm1 in #4926
  • fix(describe): preserve exact filenames in file walkthroughs by @PeterDaveHello in #4873
  • fix(gitea): refresh PR state between automatic commands by @PeterDaveHello in #4918
  • fix(review): resolve inline findings without complete head files by @PeterDaveHello in #4913
  • fix(github): preserve File objects during incremental diff processing by @PeterDaveHello in #4914
  • fix(github-app): answer file-level questions with their diff by @tanishqbaweja in #4887
  • fix(github): keep the /describe body within GitHub's length limit by @tanishqbaweja in #4883
  • fix(review): honor command error propagation in per-commit reviews by @PeterDaveHello in #4890
  • fix(describe): don't print None for a large PR when the file walkthrough is off by @tanishqbaweja in #4884
  • fix(github-action): honor disabled auto_review when auto_improve is unset by @PeterDaveHello in #4899
  • fix(gitlab): anchor suggestion positions to reviewed diff refs by @PeterDaveHello in #4893
  • fix(gitea): honor string-valued SKIP_SSL_VERIFICATION by @eric7h in #4905
  • fix(improve): announce command removal in review notice by @utsab345 in #4875
  • fix(gitea): reject incomplete raw PR diffs by @PeterDaveHello in #4821
  • fix(plain-diff): reconstruct the base when the working-tree file is empty by @eric7h in #4879
  • fix(gitlab): verify MR revisions before resolving inline threads by @PeterDaveHello in #4822
  • fix(gitlab): neutralize mentions in more markdown edge cases by @muzman123 in #4836
  • fix(deps): require patched filelock and update litellm to 1.108.5 by @latent-sre in #4869
  • fix(github): skip push commands when "Update branch" pushes a merge commit by @coder-abu in #4862
  • fix(providers): cache empty diffs within a command, refresh at the boundary by @Yoel-qin in #4861
  • fix(gitlab): neutralize mentions after non-ASCII letters, slashes and HTML entities by @RagedPanda in #4845
  • fix(gitea): don't treat a failed file fetch as empty content by @MaxWang007 in #4865
  • fix: adapt to litellm 1.108.4 header validation and registry changes by @kartik70 in #4844
  • fix(plain-diff): honor "\ No newline at end of file" when rebuilding the base file by @eric7h in #4863
  • fix(github): match PR-Agent check runs by app, take staleness from push time by @SpinachDigital in #4829
  • fix(bitbucket-server): encode file paths in raw content reads by @tanishqbaweja in #4856
  • fix(ask): preserve inline scope for recognized command aliases by @PeterDaveHello in #4847
  • fix(json): report incomplete review and suggestion coverage by @PeterDaveHello in #4851
  • fix(similar_issue): stop LanceDB pagination at the scan limit by @PeterDaveHello in #4852
  • fix: Preserve native input ceilings in LangChain token budgets by @PeterDaveHello in #4827
  • fix(github): fall back when incremental commit lists omit HEAD by @PeterDaveHello in #4814
  • fix(providers): report unreadable changed files in local git and Gerrit diffs by @Henry-Shan in #4840
  • fix(action): read the GitHub event payload as UTF-8 by @Henry-Shan in #4841
  • fix(bitbucket): decode each file of the PR diff on its own by @tanishqbaweja in #4828
  • fix(github-action): answer file-level questions with their diff by @PeterDaveHello in #4656
  • fix(gitlab): filter non-reference hashes in ticket extraction by @PeterDaveHello in #4820
  • fix(providers): count changed files without building diffs by @PeterDaveHello in #4818
  • fix(ask_line): preserve literal filenames in command settings by @PeterDaveHello in #4825
  • fix(config): honor false-like output and changelog settings by @PeterDaveHello in #4823
  • fix(polling): stop retaining unused notification thread IDs by @PeterDaveHello in #4826
  • fix(security): redact generic password and token assignments by @dodoshell in #4810
  • fix(docker): update Python to 3.14.10 and uv to 0.13.7 by @latent-sre in #4807
  • fix(gitlab): resolve Markdown issue and work item links by URL by @kvdb in #4808
  • fix(gitlab): bound mention code spans to blocks by @utsab345 in #4800
  • fix(providers): report diff line counts for gerrit, codecommit and local git by @zhengqiuyang in #4799
  • fix(risk): give each custom risk shape search a time budget by @Chebaleomkar in #4794
  • fix(gitlab): retry MR diffs with 20 per page when GitLab answers HTTP 500 by @Chebaleomkar in #4796
  • fix(github): move non-committable comments into the nearest hunk by @zhengqiuyang in #4787
  • fix(mosaico): populate FilePatchInfo line counts in parse_unified_diff by @Mr45401 in #4789
  • fix(lambda): keep GitLab credentials out of async handoffs by @lj1166 in #4788
  • fix(gitea): read the old side of changed files at the PR's merge base by @tanishqbaweja in #4791
  • fix(lambda): ack webhook before review runs by @painbaba in #4759
  • fix(improve): tell users that /improve merges into /review by @lyn1dev in #4775
  • fix(azure): detect amended and rebased commits in incremental reviews by @tanishqbaweja in #4776
  • fix(describe): use fence-aware stripping for large-PR headers by @zhengqiuyang in #4652
  • fix(plain-diff): report line counts in descriptions by @PeterDaveHello in #4768
  • fix(github): move suggestions that enclose a hunk into it by @BaeJinSeop in #4767
  • fix(ai-handlers): preserve unexpected inference exceptions by @PeterDaveHello in #4771
  • fix(patch): strip pre-hunk file headers in handle_patch_deletions output by @zhengqiuyang in #4761
  • fix(improve): reject reflection feedback for another file by @rudycelekli in #4675
  • fix(review): use the prepared diff when packing yields one chunk by @PeterDaveHello in #4535
  • fix(github): resolve the actual PR head when commit lists are truncated by @PeterDaveHello in #4750
  • fix: fail closed on invalid boolean settings by @utsab345 in #4740
  • fix(questions): fall back to the next model when /ask, /ask_line or /help is truncated by @jay23606 in #4746
  • fix(review): keep ticket compliance fields returned as null or lists by @BaeJinSeop in #4762
  • fix(push_outputs): escape Slack control syntax for every record by @shu-chen-dot-ca in #4754

⚡ Performance

📚 Documentation

🧹 Maintenance

⬆️ Dependencies

Full Changelog: v0.50.0...v0.51.0

Don't miss a new pr-agent release

NewReleases is sending notifications on new releases.