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]

address greptile review feedback (greploop iteration 3)

Sameer Kankuted4d91684cf77
diff --git a/litellm/llms/azure/fine_tuning/handler.py b/litellm/llms/azure/fine_tuning/handler.py
index 3d82172c585..2415c7d78ed 100644
--- a/litellm/llms/azure/fine_tuning/handler.py
+++ b/litellm/llms/azure/fine_tuning/handler.py
@@ -37,7 +37,6 @@ class AzureOpenAIFineTuningAPI(OpenAIFineTuningAPI, BaseAzureLLM):
create_fine_tuning_job_data: dict,
openai_client: Union[AsyncOpenAI, AsyncAzureOpenAI],
) -> LiteLLMFineTuningJob:
- self._ensure_training_type(create_fine_tuning_job_data)
response = await openai_client.fine_tuning.jobs.create(
**create_fine_tuning_job_data
)
diff --git a/litellm/llms/openai/fine_tuning/handler.py b/litellm/llms/openai/fine_tuning/handler.py
index 2bb39aeaea4..a9fbd88d2a8 100644
--- a/litellm/llms/openai/fine_tuning/handler.py
+++ b/litellm/llms/openai/fine_tuning/handler.py
@@ -6,6 +6,10 @@ from openai import AsyncAzureOpenAI, AsyncOpenAI, AzureOpenAI, OpenAI
from litellm._logging import verbose_logger
from litellm.types.utils import LiteLLMFineTuningJob
+_AZURE_STATUS_MAP = {
+ "pending": "queued",
+}
+
def _normalize_fine_tuning_job_dict(
data: Dict[str, Any], is_azure: bool = False
@@ -16,7 +20,7 @@ def _normalize_fine_tuning_job_dict(
Azure differences:
- organization_id: null → ""
- result_files: null → []
- - status: "pending" → "queued"
+ - status: mapped via _AZURE_STATUS_MAP
"""
if not is_azure:
return data
@@ -29,8 +33,9 @@ def _normalize_fine_tuning_job_dict(
if normalized.get("result_files") is None:
normalized["result_files"] = []
- if normalized.get("status") == "pending":
- normalized["status"] = "queued"
+ status = normalized.get("status")
+ if status in _AZURE_STATUS_MAP:
+ normalized["status"] = _AZURE_STATUS_MAP[status]
return normalized