Skip to content

fix(anthropic): honor explicit Opus 5.5 reasoning summaries - #7881

Merged
lidge-jun merged 1 commit into
devfrom
fix/7728-opus55-summary-optin
Oct 29, 2026
Merged

lidge-jun merged 1 commit into
devfrom
fix/7728-opus55-summary-optin

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #7728.

Since #7143, Claude Opus 5.5 on api.anthropic.com always received thinking: {type: "adaptive", display: "updates"} plus the thinking-display-updates-2026-08-18 beta, whatever the request asked for. A client that wants reasoning summaries in a thinking view could not get them for Opus 5.5, while every other adaptive Claude model behind the same adapter returns them.

  • An explicit reasoning.summary of "concise" or "detailed" now selects display: "summarized" without the updates beta, and the signed thinking comes back as reasoning instead of progress commentary.
  • "auto" (the value Codex sends by default), "none" and an omitted summary keep the fix(anthropic): surface Opus 5.5 progress as signed commentary #7143 updates default, as the issue specifies.
  • The final body.thinking now drives both the beta header and response classification on every request, so a reused adapter follows each request's own display.
  • hideThinkingSummary keeps its meaning and never selects the upstream display.
  • Docs: guides/providers.md, reference/adapters.md (English plus ja/ko/ru/tr/zh-cn) and structure/providers/anthropic-progress.md.

Translated Claude Messages ingress maps thinking.display to summary auto/none only, so it cannot express this opt-in and keeps the #7143 behavior; native Messages passthrough is unaffected.

Verification

Bun 1.4.4.

  • bun test tests/adapters/anthropic/anthropic-progress-updates.test.ts against the dev adapter source: 16 fail (the concise/detailed opt-in, adapter reuse and SSE/JSON classification cases); the auto/omitted/none cases pass on both.
  • bun test tests/adapters/anthropic/: 1426 pass / 0 fail across 66 files.
  • bun test tests/ci-workflows/file-size-ratchet.test.ts: 9 pass / 0 fail.
  • bun run typecheck, bun run structure:check, bun run privacy:scan: pass.
  • Independent review of this head: PASS, 0 blocking; its run of every display-related Anthropic test file was 209 pass / 0 fail, plus ingress probes 10 pass / 0 fail.

Full-suite exception: the full local suite was not run because several concurrent worktrees share the host's test runner; the change is confined to one adapter branch covered by the full tests/adapters/anthropic/ directory above. Hosted CI and live Anthropic inference are left to PR CI and the maintainer.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Summary by CodeRabbit

  • Behavior Changes

    • Anthropic Opus 5.5 requests to the native API use progress updates by default, including with OAuth or API-key authentication.
    • Setting the reasoning summary to “concise” or “detailed” switches to summarized thinking without progress updates. This choice is independent of reasoning effort.
    • Hiding the local thinking summary does not hide progress commentary when updates are enabled.
  • Documentation

    • Clarified these display options and their behavior across supported languages.

Native Opus 5.5 on api.anthropic.com always forced display "updates"
plus the updates beta. An explicit reasoning.summary of "concise" or
"detailed" now selects display "summarized" without the beta, and the
selected display drives beta and response classification on every
request, including adapter reuse. "auto" (the Codex default), "none"
and an omitted summary keep the #7143 updates default.

Closes #7728
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between fdc6dd8 and 711d1bd.

Files selected for processing: 10
  • docs-site/src/content/docs/guides/providers.md
  • docs-site/src/content/docs/ja/reference/adapters.md
  • docs-site/src/content/docs/ko/reference/adapters.md
  • docs-site/src/content/docs/reference/adapters.md
  • docs-site/src/content/docs/ru/reference/adapters.md
  • docs-site/src/content/docs/tr/reference/adapters.md
  • docs-site/src/content/docs/zh-cn/reference/adapters.md
  • src/adapters/anthropic.ts
  • structure/providers/anthropic-progress.md
  • tests/adapters/anthropic/anthropic-progress-updates.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

Walkthrough

The Anthropic adapter now selects Opus 5.5 thinking display based on reasoning.summary. Regression tests and provider documentation cover the summarized and updates modes, including their beta-header and response-handling behavior.

Changes: Opus 5.5 thinking display

Layer / File(s) Summary
Display selection, response handling, and validation
src/adapters/anthropic.ts, tests/adapters/anthropic/anthropic-progress-updates.test.ts, structure/providers/anthropic-progress.md, docs-site/src/content/docs/guides/providers.md, docs-site/src/content/docs/reference/adapters.md, docs-site/src/content/docs/{ja,ko,ru,tr,zh-cn}/reference/adapters.md
For native Opus 5.5 requests, explicit concise or detailed summaries select summarized display; other summary values select updates. Progress-update handling follows the final display. Tests cover key and OAuth requests, adapter reuse, and signed thinking. Documentation describes the behavior in the provider guide and reference pages.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: ingwannu

Merge Risk: Minimal · up to 711d1

Opus 5.5 requests can opt into reasoning summaries; no actionable merge risk remains identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: honoring explicit Opus 5.5 reasoning summary settings in the Anthropic adapter.
Linked Issues check Passed The PR meets the coding requirements in [#7728]. In src/adapters/anthropic.ts around lines 1100-1187, native Opus 5.5 reads reasoning.summary; only explicit "concise" or "detailed" selects `{ …
Out of Scope Changes check Passed The changes stay within [#7728]. The source change is limited to native Anthropic Opus 5.5 display selection and request-scoped response classification. The added tests verify the requested opt-in, re…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Linked Issues check

Explanation

The PR meets the coding requirements in [#7728]. In src/adapters/anthropic.ts around lines 1100-1187, native Opus 5.5 reads reasoning.summary; only explicit "concise" or "detailed" selects { type: "adaptive", display: "summarized" }, while omitted, "auto", and "none" retain "updates". The final body.thinking.display controls progressUpdates, so beta selection and response classification follow each request on a reused adapter. The code preserves hideThinkingSummary as a local presentation option. tests/adapters/anthropic/anthropic-progress-updates.test.ts around lines 20-90 covers key and OAuth authentication, effort variants, default cases, adapter reuse, beta headers, and local hiding. Later tests cover JSON and SSE signed-thinking classification. The reported adapter, typecheck, structure, privacy, and focused test results support the implementation.

Full details: Out of Scope Changes check

Explanation

The changes stay within [#7728]. The source change is limited to native Anthropic Opus 5.5 display selection and request-scoped response classification. The added tests verify the requested opt-in, retained updates default, authentication variants, adapter reuse, replay, and JSON/SSE behavior. The provider guide, adapter references, and progress-update documentation explain the same behavior. No unrelated product behavior or cleanup is demonstrated.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files. (8 skipped: 8 unsupported.)

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Oct 28, 2026
@lidge-jun
lidge-jun marked this pull request as ready for review October 28, 2026 09:51
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 28, 2026 09:52
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T09:53:47.832276Z 711d1bd Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant