The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Update litellm/llms/openrouter/image_edit/transformation.py
Cesar Garciafecb3016847d
diff --git a/litellm/llms/openrouter/image_edit/transformation.py b/litellm/llms/openrouter/image_edit/transformation.pyindex d06536367eb..19931f00245 100644--- a/litellm/llms/openrouter/image_edit/transformation.py+++ b/litellm/llms/openrouter/image_edit/transformation.py@@ -133,12 +133,11 @@ class OpenRouterImageEditConfig(BaseImageEditConfig):api_base: Optional[str],litellm_params: dict,) -> str:- if api_base:- if not api_base.endswith("/chat/completions"):- api_base = api_base.rstrip("/")- return f"{api_base}/chat/completions"- return api_base- return "https://openrouter.ai/api/v1/chat/completions"+ base_url = api_base or get_secret_str("OPENROUTER_API_BASE") or "https://openrouter.ai/api/v1"+ base_url = base_url.rstrip("/")+ if not base_url.endswith("/chat/completions"):+ return f"{base_url}/chat/completions"+ return base_urldef transform_image_edit_request(self,