Expand description
Shared image optimization logic for provider route handlers.
Extracted to avoid duplication between Anthropic and OpenAI routes. The optimization runs on a blocking thread to avoid starving the tokio event loop during CPU-intensive image operations.
Functions§
- optimize_
payload - Run the SHIFT pipeline on a JSON payload.