Skip to content

feat: add Claude Opus 4.7 model support#1556

Merged
maekawataiki merged 6 commits into
aws-samples:mainfrom
kenicazu:feat/add-claude-opus-4-7
May 7, 2026
Merged

feat: add Claude Opus 4.7 model support#1556
maekawataiki merged 6 commits into
aws-samples:mainfrom
kenicazu:feat/add-claude-opus-4-7

Conversation

@kenicazu
Copy link
Copy Markdown
Contributor

@kenicazu kenicazu commented May 7, 2026

概要

Claude Opus 4.7を各種ユースケースで利用可能とするための変更を実装

変更内容

1. モデルメタデータ追加 (packages/common/src/application/model.ts)

  • global/us/eu/jp の4リージョンバリアントを追加
  • Opus 4.7は temperature/top_p/top_k パラメータを受け付けないため、新しいフラグ noSamplingParams を導入し、専用の TEXT_DOC_IMAGE_ADAPTIVE_THINKING_NO_SAMPLING フィーチャーセットを定義
  • prompt caching対応エントリ (anthropic.claude-opus-4-7) を追加

2. 型定義 (packages/types/src/model.d.ts)

  • FeatureFlagsnoSamplingParams?: boolean を追加

3. Lambda推論パラメータ (packages/cdk/lambda/utils/models.ts)

  • CLAUDE_OPUS_4_7_DEFAULT_PARAMS: temperatureを含まないデフォルトパラメータ(maxTokens: 128000のみ)
  • 4リージョンバリアントのモデルエントリを追加
  • reasoning有効時: noSamplingParams フラグがtrueの場合、temperature: 1 を送信しない
  • 通常チャット時: noSamplingParams フラグがtrueの場合、inferenceConfig から maxTokens のみを渡す

4. ドキュメント (docs/ja/DEPLOY_OPTION.md, docs/en/DEPLOY_OPTION.md)

  • opus4.7のモデルが利用できる旨を追記

5. デフォルト設定 (packages/cdk/cdk.json)

  • modelIdsglobal.anthropic.claude-opus-4-7 を追加

@kenicazu kenicazu closed this May 7, 2026
@kenicazu kenicazu reopened this May 7, 2026
@kenicazu kenicazu closed this May 7, 2026
@kenicazu kenicazu reopened this May 7, 2026
kenicazu added 2 commits May 7, 2026 15:20
…opK)

- Add noSamplingParams flag to FeatureFlags
- Add CLAUDE_OPUS_4_7_DEFAULT_PARAMS without temperature
- Add model entries for global/us.anthropic.claude-opus-4-7
- Strip temperature/topP from inferenceConfig for noSamplingParams models
- Add prompt caching support for Opus 4.7
@kenicazu kenicazu force-pushed the feat/add-claude-opus-4-7 branch from 9396cbf to 798099b Compare May 7, 2026 06:22
Copy link
Copy Markdown
Collaborator

@maekawataiki maekawataiki left a comment

Choose a reason for hiding this comment

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

Thank you for contribution! LGTM!

@maekawataiki maekawataiki merged commit d788bcf into aws-samples:main May 7, 2026
2 checks passed
@kenicazu kenicazu mentioned this pull request May 8, 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.

2 participants