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]

Merge remote-tracking branch 'berri/main' into litellm_mistral_ocr_batches

mubashir1osmani9066a3236337
diff --cc litellm/batches/batch_utils.py
index 077d6e72fd7,26b4318da2d..65c8c6bcd32
--- a/litellm/batches/batch_utils.py
+++ b/litellm/batches/batch_utils.py
@@@ -9,7 -9,7 +9,8 @@@ import litell
from litellm._logging import verbose_logger
from litellm.litellm_core_utils.get_litellm_params import AWS_CREDENTIAL_KWARGS_KEYS
from litellm.litellm_core_utils.llm_cost_calc.utils import parse_prompt_tokens_details
+from litellm.llms.base_llm.ocr.transformation import OCRUsageInfo
+ from litellm.llms.vertex_ai.batches.transformation import vertex_prompt_tokens_details
from litellm.types.llms.openai import Batch
from litellm.types.utils import ModelInfo, Usage
from litellm.utils import token_counter
diff --cc litellm/proxy/openai_files_endpoints/files_endpoints.py
index 0efd618e171,ae6e222a863..91fce11a871
--- a/litellm/proxy/openai_files_endpoints/files_endpoints.py
+++ b/litellm/proxy/openai_files_endpoints/files_endpoints.py
@@@ -1553,13 -1565,12 +1573,13 @@@ async def list_files
status_code=500,
detail="LLM Router not initialized. Ensure models added to proxy.",
)
- credentials = get_credentials_for_model(
+ credentials = await get_authorized_credentials_for_model(
llm_router=llm_router,
model_id=target_model_names_list[0],
+ user_api_key_dict=user_api_key_dict,
operation_context="file list",
)
- prepare_data_with_credentials(data=data, credentials=credentials)
+ prepare_data_with_credentials(data=data, credentials=credentials, include_internal_credentials=True)
response = await litellm.afile_list(
custom_llm_provider=credentials["custom_llm_provider"],
purpose=purpose,