環境変数

CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_DEFAULT

Amazon Bedrock のストリーミング応答で Content-Type ヘッダーが欠落している場合、Claude Code がバイナリ形式として誤ってデコードするのを防ぐために 1 に設定します。

使い方・用途

  • プロキシサーバーが Bedrock の応答から Content-Type ヘッダーを削除し、本体をサーバー送信イベントとして再送信する環境で有効化する
  • Claude Code v2.1.239 以降が必要
  • デフォルトではヘッダー欠落時にバイナリ形式としてデコードされるため、ヘッダーが再送信される場合のみこの設定を使用する
英語原文(公式ドキュメントより)

Set to 1 to stop Claude Code from treating an Amazon Bedrock streaming response with a missing or empty Content-Type header as the binary application/vnd.amazon.eventstream format. Amazon Bedrock always sends that header, so when it's absent, a proxy stripped it and by default Claude Code decodes the body as the binary format anyway. Set this variable only when the proxy strips the header and also re-emits the body as server-sent events; Claude Code then reads the body as server-sent events instead. Requires Claude Code v2.1.239 or later