Skip to content

fix(transform): add claude-opus-4.7 to isAnthropicAdaptive list#23499

Closed
kiote wants to merge 1 commit intoanomalyco:devfrom
kiote:fix/opus-4-7-adaptive-thinking
Closed

fix(transform): add claude-opus-4.7 to isAnthropicAdaptive list#23499
kiote wants to merge 1 commit intoanomalyco:devfrom
kiote:fix/opus-4-7-adaptive-thinking

Conversation

@kiote
Copy link
Copy Markdown

@kiote kiote commented Apr 20, 2026

Issue for this PR

Fixes #23500

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

claude-opus-4.7 uses the adaptive thinking API (thinking.type=adaptive + output_config.effort), the same as claude-opus-4.6. However, it was missing from the isAnthropicAdaptive check in transform.ts:

const isAnthropicAdaptive = ["opus-4-6", "opus-4.6", "sonnet-4-6", "sonnet-4.6"].some((v) =>
  model.api.id.includes(v),
)

Without being in this list, claude-opus-4.7 falls through to the legacy thinking.type=enabled path. GitHub Copilot explicitly rejects this with:

"thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior.

The fix adds "opus-4-7" and "opus-4.7" to the array, matching the same pattern already used for opus-4.6.

How did you verify your code works?

Added a test case for claude-opus-4.7 mirroring the existing claude-opus-4.6 test. Both pass:

bun test test/provider/transform.test.ts --test-name-pattern "opus"
2 pass, 0 fail

Screenshots / recordings

N/A — not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

claude-opus-4.7 supports the adaptive thinking API (thinking.type=adaptive +
output_config.effort) but was missing from the isAnthropicAdaptive check.
It was falling through to the legacy thinking.type=enabled path, which
GitHub Copilot rejects with an explicit error.
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Apr 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found one potentially related PR:

Related PR:

Why it's related: This PR also addresses Opus 4.7 support, though it's specific to the Bedrock provider. Your PR (#23499) is fixing the adaptive thinking API support in the transform layer, which is complementary work to ensure full Opus 4.7 compatibility across different aspects of the system.

Note: PR #23499 (the current PR) appears in the search results because it's the PR being analyzed. The other thinking-related PRs found are about different functionality (thinking block signatures, etc.) and don't appear to be duplicates.

@github-actions github-actions Bot removed needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Apr 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@kiote
Copy link
Copy Markdown
Author

kiote commented Apr 20, 2026

The CI / checks-node-extensions and CI / checks-node-extensions-shard-6 checks are failing. Our change only modifies a string array in transform.ts and adds one test — could a maintainer confirm whether these failures are pre-existing / unrelated to this PR?

@kiote
Copy link
Copy Markdown
Author

kiote commented Apr 20, 2026

Closing as superseded — dev already includes opus-4.7 support with a more comprehensive implementation. The merge conflict confirms this.

@kiote kiote closed this Apr 20, 2026
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.

claude-opus-4.7 via GitHub Copilot fails with thinking.type.enabled not supported

1 participant