From a04cbfc6a0406663aa5e2155119a8e2a1fe2ea0f Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 19 Jun 2026 01:11:59 -0400 Subject: [PATCH] fix: forward non_default_params in image_edit fallback handler Added support for forwarding provider-specific parameters in image edit requests. --- litellm/images/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litellm/images/main.py b/litellm/images/main.py index 8b108ded4c9..f910df12dbb 100644 --- a/litellm/images/main.py +++ b/litellm/images/main.py @@ -963,6 +963,9 @@ def image_edit( client=kwargs.get("client"), aimage_edit=_is_async, ) + # Forward provider-specific params (e.g., image_config for OpenRouter) so they + # reach the provider the same way bedrock/stability/black_forest_labs paths do. + image_edit_request_params.update(non_default_params) # Call the handler with _is_async flag instead of directly calling the async handler return base_llm_http_handler.image_edit_handler( model=model,