You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(image-gen): propagate ssrfPolicy into provider HTTP calls (#79716)
Image-generation providers called fetchWithSsrFGuard without inheriting
the agent-level ssrfPolicy (tools.web.fetch.ssrfPolicy), so
allowRfc2544BenchmarkRange had no effect on provider requests even when
explicitly configured. Clash TUN / Surge fake-IP setups (198.18.0.0/15)
were blocked despite the flag being true.
Changes:
- ImageGenerationRequest: add optional ssrfPolicy field
- GenerateImageParams: add optional ssrfPolicy field
- runtime.ts: thread ssrfPolicy into provider.generateImage()
- image-generate-tool.ts: pass remoteMediaSsrfPolicy to generateImage()
- shared.ts resolveGuardedPostRequestOptions: accept full ssrfPolicy and
merge with allowPrivateNetwork instead of always truncating to {allowPrivateNetwork:true}
- postJsonRequest / postMultipartRequest: expose ssrfPolicy param
- openai-compatible-image-provider.ts: forward req.ssrfPolicy
- extensions/openai/image-generation-provider.ts: forward req.ssrfPolicy
in both JSON and multipart request paths
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
0 commit comments