Opus 4 on Vertex AI fails with thinking.type.enabled error (400)

Resolved 💬 2 comments Opened Apr 24, 2026 by droachsf Closed Apr 27, 2026

Bug Description

Selecting Opus 4 (claude-opus-4-7) in Claude Code on a Vertex AI (GCP) backend returns a 400 error immediately:

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"\"thinking.type.enabled\" is not supported for this model. Use \"thinking.type.adaptive\" and \"output_config.effort\" to control thinking behavior."},"request_id":"req_vrtx_011CaNV29S9FHHK79mCMmTeC"}

Root Cause

Claude Code is sending thinking: { type: "enabled" } in the API request. Vertex AI's Opus 4 endpoint requires thinking: { type: "adaptive" } + output_config.effort instead. This is a breaking schema difference between the Vertex Opus 4 endpoint and earlier models.

Environment

  • Claude Code version: 2.1.109
  • Platform: macOS arm64 (darwin 25.4.0)
  • API backend: Vertex AI (GCP) — confirmed via vrtx in request ID
  • Model: Opus 4 (claude-opus-4-7)

Steps to Reproduce

  1. Configure Claude Code to use a Vertex AI backend with Opus 4 enabled
  2. Run /model and select Opus 4
  3. Send any message

Expected Behavior

Claude Code sends the correct thinking schema for Vertex Opus 4 (thinking.type: "adaptive" + output_config.effort) and the model responds successfully.

Actual Behavior

400 error on every request. Model is unusable. Workaround is to use Sonnet 4.6.

Additional Context

  • Request ID: req_vrtx_011CaNV29S9FHHK79mCMmTeC
  • The Vertex AI Opus 4 model is confirmed enabled in GCP
  • The binary is compiled native (Mach-O arm64) so local patching is not possible

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗