What
The Claude apps gateway is a server that organisations run between their users and the model providers. Its configuration now accepts an optional load_test_mode block. It only takes effect when an operator adds it to the gateway configuration.
enabledturns it on.reply_tokens(default 750, maximum 100,000) andreply_seconds(default 9.5, maximum 600) set the size and delay of the canned replies.- While it is on, no model request is sent upstream and every reply is canned. Calls to fetch credentials, such as AWS STS, still go out.
- Callers can send an
x-load-test-userheader holding a whole number of up to 7 digits. The request is then recorded under a made-up identity: the caller's sub plus+loadtest-N. - Inference log lines are tagged
load_test: true, and spend is not metered. - The gateway logs a warning at startup when
load_test_mode.enabledis set. - At startup it checks that every upstream was built to use the canned replies, and fails to start if one was not.
- It refuses to start load-test mode against a Postgres store (
store.postgres_url) that already holds real spend. - The provider clients
anthropicAws,vertexandfoundrynow accept a replacementfetchfunction, which is what makes the canned replies possible.
Why
Operators can test how the gateway copes under heavy load without paying for model calls or using real accounts. The startup warning and the checks exist to keep this mode away from a production database and from real users.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
* [`load_test_mode`](#load_test_mode): load testing the gateway without calling a model providerclaude-apps-gateway-config see the edit
Anthropic's documentation has since written up load_test_mode, on Claude apps gateway configuration.