From 6e060ea5aba049d9d2634a5701d3f6c3b5ef7164 Mon Sep 17 00:00:00 2001 From: sands321 <651396092@qq.com> Date: Sat, 30 May 2026 16:24:45 +0800 Subject: [PATCH] fix: prefer raw image-edit final url --- app/products/openai/images.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/products/openai/images.py b/app/products/openai/images.py index 652767ff..05e11bd1 100644 --- a/app/products/openai/images.py +++ b/app/products/openai/images.py @@ -738,13 +738,13 @@ def _resolve_edit_final_url( asset_id: str | None, user_id: str | None, ) -> str | None: - """Prefer stable asset content URLs over generated image paths for image-edit finals.""" + """Prefer the upstream final URL and only fall back to asset-derived URLs.""" + if raw_url: + return _absolutize_asset_url(raw_url) if asset_id and user_id: resolved = resolve_asset_reference(asset_id, "", user_id=user_id) if resolved: return resolved - if raw_url: - return _absolutize_asset_url(raw_url) return None