環境変数
CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARD
Amazon Bedrock のストリーミングレスポンスにおける Content-Type ヘッダーのチェックをスキップします。
使い方・用途
- 値を 1 に設定することで有効化されます
- ゲートウェイやプロキシがヘッダーを書き換えるが、ボディのバイナリは変更しない環境で使用します
- v2.1.208 以降で導入されました
英語原文(公式ドキュメントより)
Set to 1 to skip the check that an Amazon Bedrock streaming response carries the application/vnd.amazon.eventstream content-type. Without this variable, a response with a different content-type fails with an error naming that content-type, which means a gateway or proxy is transforming the response. Set it only when the gateway rewrites the Content-Type header but passes the binary event-stream body through unmodified; if the body itself was transformed, requests fail with Truncated event message received instead. Requires Claude Code v2.1.208 or later