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 'origin/main' into litellm_unknown_model_spend_logs_outside_router

mateo-berriaadadc647d37
diff --cc litellm/proxy/openai_files_endpoints/common_utils.py
index a8ab09b725a,3d6c72de09f..b6b7c0585d7
--- a/litellm/proxy/openai_files_endpoints/common_utils.py
+++ b/litellm/proxy/openai_files_endpoints/common_utils.py
@@@ -608,10 -679,11 +680,11 @@@ async def handle_model_based_routing
# Priority 1: Model embedded in file_id
if check_file_id_encoding and model_from_id is not None:
- credentials = get_credentials_for_model(
+ credentials = await get_authorized_credentials_for_model(
llm_router=llm_router,
model_id=model_from_id,
+ user_api_key_dict=user_api_key_dict,
- operation_context=f"file operation (file created with model '{model_from_id}')",
+ operation_context="file operation (file created with model)",
)
original_file_id: Final = get_original_file_id(file_id)
return True, model_from_id, original_file_id, credentials