Skip to content

feat: add Claude Opus 4.7 support across all providers (#12287)#12301

Open
roomote-v0[bot] wants to merge 3 commits intomainfrom
feat/claude-opus-4-7-all-providers
Open

feat: add Claude Opus 4.7 support across all providers (#12287)#12301
roomote-v0[bot] wants to merge 3 commits intomainfrom
feat/claude-opus-4-7-all-providers

Conversation

@roomote-v0
Copy link
Copy Markdown
Contributor

@roomote-v0 roomote-v0 Bot commented May 9, 2026

Closes: #12287

Supersedes #12288 by extending Claude Opus 4.7 support beyond just Bedrock to all providers.

Changes

Bedrock (from #12288):

  • Added anthropic.claude-opus-4-7 model entry to bedrockModels
  • Added to BEDROCK_1M_CONTEXT_MODEL_IDS and BEDROCK_GLOBAL_INFERENCE_MODEL_IDS
  • Corrected model ID from anthropic.claude-opus-4-7-v1 to anthropic.claude-opus-4-7 to match the correct Bedrock identifier
  • Added adaptive thinking support: Opus 4.7 uses thinking.type: "adaptive" with output_config.effort instead of "enabled" with budget_tokens
  • Added BEDROCK_ADAPTIVE_THINKING_ONLY_MODEL_IDS constant for models requiring this thinking mode
  • Updated BedrockAdditionalModelFields interface to support the adaptive thinking type

Anthropic Direct API:

  • Added claude-opus-4-7 model entry to anthropicModels with 128K maxTokens, $5/$25 pricing, 1M context tiers
  • Added to 1M context beta flag check, prompt caching switch, and extended thinking switch in handler
  • Added to getModel() 1M context tier pricing check

OpenRouter:

  • Added anthropic/claude-opus-4.7 to prompt caching and reasoning budget model sets
  • Added maxTokens override in fetcher

Vercel AI Gateway:

  • Added anthropic/claude-opus-4.7 to prompt caching and vision+tools model sets

WebView UI:

  • Added claude-opus-4-7 to 1M context beta tier pricing check in useSelectedModel

Test Procedure

  • All 88 existing tests pass (anthropic: 64, openrouter: 24)
  • All lint checks pass across 14 packages
  • All type checks pass across 14 packages

Interactively review PR in Roo Code Cloud

Andy Lemin and others added 2 commits May 8, 2026 13:46
Add claude-opus-4-7 model definitions and references to:
- Anthropic direct API types and handler (1M context, prompt caching, extended thinking)
- OpenRouter model sets and fetcher maxTokens override
- Vercel AI Gateway prompt caching and vision+tools sets
- WebView 1M context beta tier pricing check
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. Enhancement New feature or request labels May 9, 2026
@andylemin
Copy link
Copy Markdown

@roomote Bedrock implementation in this is incorrect. Working version in #12288

@roomote-v0
Copy link
Copy Markdown
Contributor Author

roomote-v0 Bot commented May 10, 2026

Fixaroo Clock   See task

Fixed Bedrock implementation to match the working version from PR #12288: corrected model ID to anthropic.claude-opus-4-7 and added adaptive thinking support (thinking.type: "adaptive" with output_config.effort instead of "enabled" with budget_tokens). All tests, lint, and type checks pass.

View commit | Revert commit

…port

- Rename model ID from "anthropic.claude-opus-4-7-v1" to "anthropic.claude-opus-4-7"
  to match the correct Bedrock model identifier (per PR #12288)
- Update BedrockAdditionalModelFields to support adaptive thinking type
- Add BEDROCK_ADAPTIVE_THINKING_ONLY_MODEL_IDS for Opus 4.7
- Opus 4.7 uses thinking.type: "adaptive" with output_config.effort
  instead of "enabled" with budget_tokens (which returns 400 error)
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels May 10, 2026
@andylemin
Copy link
Copy Markdown

@roomote Also update the description on this PR to reflect the fixes?

@roomote-v0
Copy link
Copy Markdown
Contributor Author

roomote-v0 Bot commented May 10, 2026

Fixaroo Clock   See task

Updated the PR description to reflect the fixes from the latest commit: corrected Bedrock model ID (anthropic.claude-opus-4-7-v1anthropic.claude-opus-4-7), added adaptive thinking support details, and documented the new BEDROCK_ADAPTIVE_THINKING_ONLY_MODEL_IDS constant and BedrockAdditionalModelFields interface update.

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

Labels

Enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Add Claude Opus 4.7 support on AWS Bedrock

2 participants