Files
CLIProxyAPI/internal/runtime/executor/helps/payload_helpers.go
Hao Wang 8d4a7f1f2e feat(config): add "passthrough" mode for disable-image-generation
Adds a fourth value for the disable-image-generation setting:

- false:       inject image_generation (unchanged)
- true:        strip everywhere + 404 on /v1/images/* (unchanged)
- chat:        strip on non-images endpoints, keep /v1/images/* (unchanged)
- passthrough: never inject and never strip on non-images endpoints
               (the client payload is forwarded unchanged); behaves like
               "chat" on /v1/images/* endpoints.

image_generation injection (codex executors) is already gated on the Off
mode, and the /v1/images/* 404 gate is already gated on the All mode, so
passthrough only required a change to the payload strip logic in
payload_helpers.go, now expressed via shouldStripImageGeneration().

Closes #3831

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 22:41:15 +08:00

23 KiB