Skip to content

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]

fix linting

Ishaan Jaffe59376d6fc13
diff --git a/litellm/fine_tuning/main.py b/litellm/fine_tuning/main.py
index 98d9e894847..b726a394c23 100644
--- a/litellm/fine_tuning/main.py
+++ b/litellm/fine_tuning/main.py
@@ -183,7 +183,9 @@ def create_fine_tuning_job(
timeout=timeout,
max_retries=optional_params.max_retries,
_is_async=_is_async,
- client=optional_params.client,
+ client=kwargs.get(
+ "client", None
+ ), # note, when we add this to `GenericLiteLLMParams` it impacts a lot of other tests + linting
)
# Azure OpenAI
elif custom_llm_provider == "azure":
@@ -389,7 +391,7 @@ def cancel_fine_tuning_job(
timeout=timeout,
max_retries=optional_params.max_retries,
_is_async=_is_async,
- client=optional_params.client,
+ client=kwargs.get("client", None),
)
# Azure OpenAI
elif custom_llm_provider == "azure":
@@ -552,7 +554,7 @@ def list_fine_tuning_jobs(
timeout=timeout,
max_retries=optional_params.max_retries,
_is_async=_is_async,
- client=optional_params.client,
+ client=kwargs.get("client", None),
)
# Azure OpenAI
elif custom_llm_provider == "azure":
@@ -704,7 +706,7 @@ def retrieve_fine_tuning_job(
timeout=timeout,
max_retries=optional_params.max_retries,
_is_async=_is_async,
- client=optional_params.client,
+ client=kwargs.get("client", None),
)
# Azure OpenAI
elif custom_llm_provider == "azure":
diff --git a/litellm/types/router.py b/litellm/types/router.py
index b6049657bfc..895cb6ee064 100644
--- a/litellm/types/router.py
+++ b/litellm/types/router.py
@@ -156,19 +156,6 @@ class GenericLiteLLMParams(BaseModel):
organization: Optional[str] = None # for openai orgs
configurable_clientside_auth_params: CONFIGURABLE_CLIENTSIDE_AUTH_PARAMS = None
- # for passing in custom OpenAI / Azure OpenAI clients
- client: Optional[
- Union[
- OpenAI,
- AsyncOpenAI,
- AzureOpenAI,
- AsyncAzureOpenAI,
- AsyncClient,
- Client,
- AsyncHTTPHandler,
- HTTPHandler,
- ]
- ] = None
## LOGGING PARAMS ##
litellm_trace_id: Optional[str] = None
## UNIFIED PROJECT/REGION ##