From 36f0ee6ff9c711cbdd9814f648a292d22f08c6fe Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 29 Oct 2025 03:19:25 +0100 Subject: [PATCH] Remove unnecessary model variable assignment (#16008) * Remove unnecessary model variable assignment Remove redundant assignment of model variable. * Remove redundant model assignment in image generation --- litellm/llms/openai/openai.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/litellm/llms/openai/openai.py b/litellm/llms/openai/openai.py index 324205237dc..492ed624231 100644 --- a/litellm/llms/openai/openai.py +++ b/litellm/llms/openai/openai.py @@ -1203,7 +1203,6 @@ class OpenAIChatCompletion(BaseLLM, BaseOpenAILLM): ) -> EmbeddingResponse: super().embedding() try: - model = model data = {"model": model, "input": input, **optional_params} max_retries = max_retries or litellm.DEFAULT_MAX_RETRIES if not isinstance(max_retries, int): @@ -1332,7 +1331,6 @@ class OpenAIChatCompletion(BaseLLM, BaseOpenAILLM): ) -> ImageResponse: data = {} try: - model = model data = {"model": model, "prompt": prompt, **optional_params} max_retries = data.pop("max_retries", 2) if not isinstance(max_retries, int):