Skip to content

[Feature]: Add HTTP proxy support for web_fetch tool #6298

@bobcyw

Description

@bobcyw

Summary

Users in restricted network environments (corporate firewalls, regions with internet restrictions like China mainland, etc.) cannot use the web_fetch tool to access external URLs. Currently there is no way to configure an HTTP proxy for outbound web requests, which
blocks a significant use case.

Proposed solution

Add a proxy configuration option under tools.web.fetch that accepts an HTTP proxy URL string. When configured, the web_fetch tool should route all requests through the specified proxy using undici's ProxyAgent.

Example configuration:

tools:
  web:
    fetch:
      proxy: "http://127.0.0.1:7890"

Alternatives considered

  1. System-level proxy (HTTP_PROXY env var) - Less flexible, affects all network requests globally rather than just web_fetch
  2. Per-request proxy parameter - More complex API, most users want a single proxy for all requests
  3. SOCKS proxy support - Could be added later, HTTP proxy covers most common use cases

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions