fix(opencode): summarize adaptive thinking display for all modern claude models via copilot - #46576
Closed
afriemann wants to merge 3 commits into
Closed
fix(opencode): summarize adaptive thinking display for all modern claude models via copilot#46576afriemann wants to merge 3 commits into
afriemann wants to merge 3 commits into
Conversation
…ude models via copilot github-copilot/models.ts only forced thinking.display: "summarized" for opus-4.7 specifically. Anthropic omits thinking content by default for any adaptive-only model newer than that (major >4, or 4.7+), so claude-sonnet-5, claude-opus-4.8, etc. silently return no thinking text even with reasoning enabled. Reuse the existing anthropicUsesModernAdaptiveThinking() classifier from provider/transform.ts instead of the hardcoded opus-4.7 string check. Related: anomalyco#36120
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
afriemann
marked this pull request as ready for review
September 1, 2026 13:20
Collaborator
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.
Issue for this PR
Closes #46593 (also related to #36120, which reports the same symptom for opus-4.8 specifically)
Type of change
What does this PR do?
github-copilot/models.tsonly forcedthinking.display: "summarized"for models matching the literal string"opus-4.7"when building the adaptive-thinking variant for Copilot's/v1/messagesendpoint. Anthropic omits thinking content by default for any adaptive-only Claude model newer than that (major version >4, or 4.7+), soclaude-sonnet-5,claude-opus-4.8, etc. silently return no thinking text even with reasoning enabled and billed.This reuses the existing
anthropicUsesModernAdaptiveThinking()classifier (already used correctly elsewhere inprovider/transform.tsfor other providers) instead of the hardcoded string check, so it covers any current or future model in that range, not just opus-4.7.How did you verify your code works?
test/plugin/github-copilot-models.test.tswith a claude-sonnet-5 fixture: fails against the old code (displayundefined), passes with the fix.github-copilot-models.test.ts+transform.test.ts): 433/433 pass.tsgo --noEmitandoxlintclean on changed files.opencode run --model github-copilot/claude-sonnet-5 --variant high --thinking --format json, same prompt against pre-fix and post-fix source: pre-fix emits areasoningpart withtext: ""; post-fix emits real reasoning content.bun dev) that thinking is now visible when chatting with claude-sonnet-5.Screenshots / recordings
N/A — provider/data layer change, not UI.
Checklist