環境変数

CLAUDE_CODE_DISABLE_STRUCTURED_OUTPUTS

上流がこれらを拒否する LLM ゲートウェイ向けに 1 を設定すると、Claude Code が structured output 用の output_config.format フィールドと、それに対応する anthropic-beta 値を送信しなくなり、CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS で無効化される他のプレリリース機能は有効のまま維持されます(Claude Code v2.1.288 以降が必要)。

使い方・用途

  • structured outputs を拒否する LLM ゲートウェイ(Mantle など)経由で実行した場合、structured outputs を要求する機能が失敗し、セッションタイトルの生成・memory recall・prompt hooks が機能しない問題を回避するための環境変数
  • 1 を設定すると output_config.format フィールドと対応する anthropic-beta 値の送信が停止され、structured outputs 非対応のゲートウェイ環境でもこれらの機能がエラーなく動作する
  • CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS とは異なり structured outputs のみを無効化でき、他のプレリリース機能は有効のまま残る(v2.1.288 以降で使用可能)
英語原文(公式ドキュメントより)

Set to 1 to stop Claude Code from sending the structured-output output_config.format field and the anthropic-beta value that pairs with it, for an LLM gateway whose upstream rejects them. This leaves on the other pre-release capabilities that CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS turns off. Requires Claude Code v2.1.288 or later

関連する変更履歴

v2.1.288(1件)

Fixed
構造化出力を拒否する Mantle やゲートウェイの環境で、セッションタイトル、メモリーの呼び出し、プロンプトフックが失敗する問題を修正した。構造化出力を無効化する CLAUDE_CODE_DISABLE_STRUCTURED_OUTPUTS を追加した。
英語原文を表示
Fixed session titles, memory recall and prompt hooks failing on Mantle or behind gateways that reject structured outputs; added CLAUDE_CODE_DISABLE_STRUCTURED_OUTPUTS to turn structured outputs off