agent.configure_webfetch¶
Set the webfetch policy (SSRF allowances, size cap, timeout). The last
call wins.
Parameters
settings:{allow_loopback: boolean?, allow_private: boolean?, allow_cloud_metadata: boolean?, max_bytes: number?, timeout_secs: number?}allow_loopback— Allow fetching loopback addresses (127.0.0.0/8,::1). Defaults tofalse. Kept independent ofallow_privateso a config can expose a local dev server without also opening up the whole private network.allow_private— Allow fetching private and link-local addresses (RFC1918,fc00::/7,169.254.0.0/16,fe80::/10). Defaults tofalse.allow_cloud_metadata— Allow fetching cloud metadata addresses (169.254.169.254,fd00:ec2::254). Defaults tofalse, and deliberately independent ofallow_privateso opening up private ranges never implicitly exposes the metadata endpoint.max_bytes— Maximum response size in bytes before a fetch is refused. Defaults to [WEBFETCH_DEFAULT_MAX_BYTES].timeout_secs— Default per-request timeout in seconds, used when a tool call omits its owntimeout. Defaults to [WEBFETCH_DEFAULT_TIMEOUT_SECS].