1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Claude CodeでOpus4.5を使ってOpus Plan Modeを使う(Vertex AI経由)

Posted at

Vertex AI経由での利用で試しました🙏
別の利用方法だとうまくいかないかもしれません

はじめに

Claude Opus 4.5が出ましたね!
今回から以前より値段が安くなり使いやすくなりました!

今回はVertex AI経由でClaudeを利用する際にOpus Plan Modeの利用で困ったので記録しておきます🙇‍♂️

Opus Plan Modeとは?

結構前に追加された、PlanモードでOpusを使用し、実装ではSonnetなどを使用するモードのことです。

Sonnet 4.5が出てからは /model の選択肢から消えたらしく、/model opusplan や設定ファイルに指定することで利用できます!

問題

デフォルトだとOpus 4.1が使われており、有効化しておらずエラーが出ていました

  ⎿ API Error: 404 {"error":{"code":404,"message":"Publisher Model 
    `projects/xxx/locations/global/publishers/anthropic/models/claude-opus-4-1@20250805` was not found or your project does not have access to it. 
    Please ensure you are using a valid model version. For more information, see: 
    https://cloud.google.com/vertex-ai/generative-ai/docs/learn/model-versions","status":"NOT_FOUND"}}

解決方法

  1. /model opusplan でOpus Plan Modeを使う設定をする
  2. ANTHROPIC_DEFAULT_OPUS_MODELclaude-opus-4-5@20251101 を指定

で使えました!

おまけ: ステータスラインでモデルを表示するとわかりやすい

ステータスラインという機能で、Claude Code インターフェイスの下部にカスタム表示ができます。

公式のサンプルのものを使用してモデル名を表示してみました!

.claude/settings.json
{
// その他の設定
    "type": "command",
    "command": "input=$(cat); MODEL_DISPLAY=$(echo \"$input\" | jq -r '.model.display_name'); CURRENT_DIR=$(echo \"$input\" | jq -r '.workspace.current_dir'); echo \"[$MODEL_DISPLAY] 📁 ${CURRENT_DIR##*/}\""
	}
}

以下のようにPlanモードではOpus 4.5が使われているのが確認できました

image.png

image.png

他にも例えばコンテキスト残量も表示できるみたいで便利そうですね!

参考

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?