1 ファイル変更+24-2

この更新の概要

LLMゲートウェイ経由の通信において、ゲートウェイパス以外の不要なバックグラウンド通信を無効化する設定が追加されました。新しい環境変数 CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC を導入することで、テレメトリや自動更新チェック、エラー報告などの外部通信を抑制できます。この設定はネットワークの出力制限(egress)が厳しい環境での利用を想定しており、有効化すると自動更新やモデルの自動検出が制限される点に注意が必要です。WebFetchツールのドメイン安全チェックを個別に無効化する方法についても補足されています。

llm-gateway-connect+24-2

特定の環境下で不要な通信を遮断するための環境変数の説明と、それを有効にした際の制限事項(自動更新の停止など)に関するセクションが追加されました。

@@ -42,7 +42,7 @@ The sections below cover the configuration in order:
- [Set the credential variable](#set-the-credential-variable) and [set the base URL](#set-the-base-url-and-credential): the two variables every gateway connection needs
- [Verify the connection](#verify-the-connection): confirm it works before persisting anything
- [Configure each surface](#configure-each-surface): if you are using a surface besides the Claude Code CLI, such as VS Code, see how to configure it with your gateway credentials
- [Additional configuration](#additional-configuration): variables some gateways need beyond the base URL and credential, such as a custom header, a credential helper, model discovery, or a provider-format base URL. Set these only if your administrator named them
- [Additional configuration](#additional-configuration): variables some gateways need beyond the base URL and credential, such as a custom header, a credential helper, model discovery, a provider-format base URL, or turning off traffic outside the gateway path. Set these only if your administrator named them or your network restricts egress
### Set the credential variable
@@ -239,7 +239,7 @@ To restore either feature, log in with claude.ai and unset the gateway variables
## Additional configuration
These settings cover cases beyond the base URL and credential. Set them only if your administrator's instructions or the [troubleshooting table](#troubleshoot-gateway-errors) call for one.
These settings cover cases beyond the base URL and credential. Set them only if your administrator's instructions, your network's egress rules, or the [troubleshooting table](#troubleshoot-gateway-errors) call for one.
### Send additional headers
@@ -314,6 +314,28 @@ Claude Code caches the helper's output for five minutes by default and re-runs i
The helper's value is sent in both the `Authorization` and `x-api-key` headers, so it works whichever header your gateway reads.
### Turn off traffic outside the gateway path
The gateway carries model requests, but Claude Code also sends nonessential background traffic outside the gateway path, to Anthropic and to third-party services such as GitHub: version checks, telemetry, error reports, release notes, and similar requests. On a network that only allows egress to the gateway, these requests fail and can appear as blocked connections in your egress monitoring.
To turn that traffic off, set `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1` alongside the gateway variables, in the same shell exports or settings-file `env` block:
```bash theme={null}
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
```
```powershell theme={null}
$env:CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "1"
```
Setting the variable has these effects and limits:
- It disables auto-updates, so plan for another update path, such as your package manager or managed distribution.
- It suppresses the [fast mode](/en/fast-mode) availability check. Unless a previous check already enabled fast mode on the machine, `/fast` reports that fast mode is unavailable.
- It turns off [gateway model discovery](#add-gateway-models-to-the-model-picker), even though discovery queries the gateway itself. Previously discovered models stay available from the local cache, but the list isn't refreshed.
- The WebFetch tool's [domain safety check](/en/data-usage#webfetch-domain-safety-check) isn't affected and still calls `api.anthropic.com`. Turn it off separately with `skipWebFetchPreflight: true` in [settings](/en/settings) if your network blocks that host.
- For each telemetry stream and the variable that controls it, see [telemetry services](/en/data-usage#telemetry-services).
### Route to a cloud provider through a gateway
These configurations point Claude Code at a gateway through a provider-specific base URL variable in place of `ANTHROPIC_BASE_URL`. Amazon Bedrock and Google Cloud's Agent Platform gateways accept those providers' native request formats; Microsoft Foundry and Claude Platform on AWS gateways accept the Anthropic Messages format and differ only in which base URL variable reaches them.