claude-code - 💡(How to fix) Fix [BUG] `output_config` sent to Vertex AI causes `invalid_request_error` on session title generation [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52312Fetched 2026-04-24 06:10:31
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Error Message

Error response from Vertex AI "type": "error", "error": {

Error Messages/Logs

"type": "error", "error": {

Root Cause

When running Claude Code with Vertex AI, the session title generation request fails because Claude Code includes an output_config field in the request body. Vertex AI's Claude integration does not support output_config and rejects the request with an invalid_request_error.

Fix Action

Fix / Workaround

Workaround

Code Example

CLAUDE_CODE_USE_VERTEX=1
  CLOUD_ML_REGION=global
  ANTHROPIC_VERTEX_PROJECT_ID=my-secret-project
  VERTEX_REGION_CLAUDE_3_5_HAIKU=global

---

{
  "model": "claude-haiku-4-5@20251001",
  "output_config": {
    "format": {
      "type": "json_schema",
      "schema": {
        "type": "object",
        "properties": { "title": { "type": "string" } },
        "required": ["title"],
        "additionalProperties": false
      }
    }
  },
  ...
}

---

{
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "message": "output_config: Extra inputs are not permitted"
  }
}

---

{
	"type": "error",
	"error": {
		"type": "invalid_request_error",
		"message": "output_config: Extra inputs are not permitted"
	},
	"request_id": "req_vrtx_..."
}
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Environment

  • Claude Code version: 2.1.118 (Claude Code)
  • Backend: Vertex AI
  • Model: claude-haiku-4-5@20251001
  • Environment variables set:
    CLAUDE_CODE_USE_VERTEX=1
    CLOUD_ML_REGION=global
    ANTHROPIC_VERTEX_PROJECT_ID=my-secret-project
    VERTEX_REGION_CLAUDE_3_5_HAIKU=global

Describe the bug

When running Claude Code with Vertex AI, the session title generation request fails because Claude Code includes an output_config field in the request body. Vertex AI's Claude integration does not support output_config and rejects the request with an invalid_request_error.

Request body sent (abbreviated)

{
  "model": "claude-haiku-4-5@20251001",
  "output_config": {
    "format": {
      "type": "json_schema",
      "schema": {
        "type": "object",
        "properties": { "title": { "type": "string" } },
        "required": ["title"],
        "additionalProperties": false
      }
    }
  },
  ...
}

Error response from Vertex AI

{
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "message": "output_config: Extra inputs are not permitted"
  }
}

Actual behavior

The session title generation call fails. This appears to affect every new session start.

Workaround

None available for CLI users. Users proxying requests can strip output_config before forwarding to Vertex AI.

What Should Happen?

Expected behavior

When CLAUDE_CODE_USE_VERTEX=1 is set, Claude Code should not include output_config (or other Anthropic-native-only fields) in requests sent to Vertex AI. JSON output should be enforced via prompt instructions instead, which Vertex AI supports.

Error Messages/Logs

{
	"type": "error",
	"error": {
		"type": "invalid_request_error",
		"message": "output_config: Extra inputs are not permitted"
	},
	"request_id": "req_vrtx_..."
}

Steps to Reproduce

Start claude and send hi in a new session.

Claude Model

Other

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.118 (Claude Code)

Platform

Google Vertex AI

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

Remove the output_config field from the request body when using Vertex AI to fix the session title generation issue.

Guidance

  • Verify that the output_config field is the cause of the error by checking the Vertex AI error response, which indicates that "Extra inputs are not permitted".
  • Modify the Claude Code to conditionally exclude the output_config field when CLAUDE_CODE_USE_VERTEX=1 is set.
  • As a temporary workaround, users proxying requests can manually strip the output_config field before forwarding the request to Vertex AI.
  • Test the modified request by sending a new session start command and verifying that the session title generation call succeeds.

Example

No code snippet is provided as the issue does not imply a specific code change, but rather a modification to the request body.

Notes

The issue appears to be specific to the Vertex AI integration and may not affect other Claude Code users. The fix should be applied conditionally based on the CLAUDE_CODE_USE_VERTEX environment variable.

Recommendation

Apply workaround by modifying the Claude Code to exclude the output_config field when using Vertex AI, as this is a targeted fix for the reported issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] `output_config` sent to Vertex AI causes `invalid_request_error` on session title generation [1 comments, 2 participants]