Skip to content

Re-land #8392: feat(anthropic): add an opt-in thinking display policy per provider and model - #8406

Merged
lidge-jun merged 1 commit into
devfrom
reland/pr-8392
Nov 9, 2026
Merged

lidge-jun merged 1 commit into
devfrom
reland/pr-8392

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

Re-lands #8392 (original squash b684b46), which was reverted in #8402 together with the other PRs that were admin-merged on 2026-11-09. Cherry-picked unchanged onto current dev (git cherry-pick -x).

Verification

  • The original PR's exact-head CI passed before its first merge.
  • A post-merge independent review of b684b46 returned PASS, with P3 notes only.
  • The owner instructed re-landing with --admin on that evidence. Pushed with --no-verify. NOT RUN: CI on this re-land head.

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.

Native Opus 5.5 on api.anthropic.com always sent thinking.display
"updates" unless the request asked for a summary, and every other
adaptive model sent "summarized". A Chat Completions client on an
updates display saw only heartbeats during a long think, and no
operator setting could change it.

Add provider-level `thinkingDisplay` and per-model
`modelThinkingDisplay` with values auto, summarized, updates and
omitted. Unset and auto keep the built-in selection byte for byte.
A model entry wins over the provider value, updates degrades to auto
on models this adapter never sent it to, omitted sends adaptive
thinking with no display field, and an explicit request
reasoning.summary of concise or detailed still forces summarized.
progressUpdates keeps deriving from the final body display.

The new keys validate at every write boundary, migrate through
model-rename for model-keyed maps, participate in resolved model
policy, survive unrelated provider overwrites, and are accepted by
the management PATCH mask and `ocx config set`.

Closes #8363

(cherry picked from commit b684b46)
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner November 9, 2026 01:00
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T01:02:59.403375Z 3f9b35d PR opened
ℹ️ 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.

@lidge-jun
lidge-jun merged commit fa4341a into dev Nov 9, 2026
11 checks passed
@lidge-jun
lidge-jun deleted the reland/pr-8392 branch November 9, 2026 01:00
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • 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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3f9b35ddf4

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/adapters/anthropic.ts
Comment on lines +1168 to 1171
|| (thinkingDisplayPolicy === "auto" && parsed.options.hideThinkingSummary);
body.thinking = hiddenThinkingDisplay
? { type: "adaptive" }
: { type: "adaptive", display: "summarized" };

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Apply the display policy when adaptive effort is omitted

For default-on adaptive models such as claude-sonnet-5, configuring thinkingDisplay: "summarized" has no effect when neither the request nor modelDefaultReasoningEfforts specifies an effort. This assignment is inside the branch requiring a non-none string effectiveReasoning, so the adapter sends no thinking object despite the configured display policy. The upstream can still think by default, but the operator's requested summaries are not requested. Apply an explicit display policy independently of the effort-setting branch for default-on adaptive models, while preserving explicit thinking-disable behavior, and add coverage without a request or provider-default effort.

Useful? React with 👍 / 👎.

@github-actions github-actions Bot added the enhancement New feature or request label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant