Skip to content

Switch to Sonnet 5.5 and use Message Batches API - #30

Merged
prozolic merged 2 commits into
mainfrom
use-sonnet-5-5-message-batches
Oct 9, 2026
Merged

prozolic merged 2 commits into
mainfrom
use-sonnet-5-5-message-batches

Conversation

@prozolic

@prozolic prozolic commented Oct 9, 2026

Copy link
Copy Markdown
Owner

This PR switches the summarization model to Claude Sonnet 5.5 and uses the Message Batches API on busy days.

Changes

  • Change the model from Claude Haiku 4.5 to Claude Sonnet 5.5 (thinking off), and raise max_tokens from 1024 to 2048 (1024 cut off about 4% of summaries)
  • Use the Message Batches API when a day has 20 or more PRs (weekdays: 16-56, weekends: 0-16). If the batch does not end in 40 minutes, cancel it and fail the run
  • Raise timeout-minutes of collect-prs.yml from 20 to 70
  • Stop sending reviewer names in the prompt, since the model invented reviews from them
  • Show a fixed message when the safety classifiers refuse to summarize a PR
  • Update NuGet packages: Anthropic SDK 12.54.1, Markdig 1.4.0

Reviewed by prozolic.

🤖 Generated with Claude Code

prozolic and others added 2 commits October 9, 2026 16:32
- Change the model from Claude Haiku 4.5 to Claude Sonnet 5.5, with
  thinking turned off

- Send requests through the Message Batches API when a day has 20 or
  more PRs (weekdays: 16-56 PRs, weekends: 0-16)

- Raise timeout-minutes of collect-prs.yml from 20 to 70 to allow for
  waiting on the batch

- Update NuGet packages: Anthropic 12.44.0 -> 12.54.1 (for Sonnet 5.5)
  and Markdig 1.3.2 -> 1.4.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Stop sending reviewer names in the prompt.  With names only, the
  model invented approvals and review depth and attributed Copilot's
  findings to human reviewers

- Raise max_tokens from 1024 to 2048.  1024 cut off about 4% of
  summaries mid-sentence

- Show a fixed message in the 概要 section when the safety classifiers
  refuse to summarize a PR, and log a warning for refused or cut-off
  summaries

- Move the summary settings (model, max_tokens, refused message) to
  Constants

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 07:58

Copilot AI 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.

🔵 Needs a closer look

The new production batch workflow depends on live API timing, cancellation, and fallback behavior that cannot be fully validated statically.

0 open findings

What changed in this PR

Switches PR summarization to Claude Sonnet 5.5 and reduces high-volume costs through batch processing.

Changes:

  • Uses Sonnet 5.5 with larger output limits and refusal handling.
  • Batches days containing at least 20 PRs, with timeout and sequential fallback behavior.
  • Updates dependencies, workflow timeout, prompts, and model documentation.
File Description
src/​PRDigest.NET/​Program.cs Adds batch summarization, fallback processing, and refusal handling.
src/​PRDigest.NET/​Constants.cs Centralizes model settings and refusal text.
src/​PRDigest.NET/​PromptGenerator.cs Removes reviewer names from prompts.
src/​PRDigest.NET/​PRDigest.NET.csproj Updates Anthropic and Markdig packages.
.github/​workflows/​collect-prs.yml Extends the collection job timeout.
README.md Documents the model and dependency updates.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@prozolic
prozolic merged commit e200a23 into main Oct 9, 2026
3 checks passed
@prozolic
prozolic deleted the use-sonnet-5-5-message-batches branch October 9, 2026 08:03
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