[BUG] `output_config` sent to Vertex AI causes `invalid_request_error` on session title generation
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] 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_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗