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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Merge remote-tracking branch 'origin/litellm_internal_staging' into HEAD
user8ced8d2f1f3c
diff --cc litellm/proxy/container_endpoints/handler_factory.pyindex ee79ebd96ed,794051e90f8..5a642e3fc9d--- a/litellm/proxy/container_endpoints/handler_factory.py+++ b/litellm/proxy/container_endpoints/handler_factory.py@@@ -175,47 -183,31 +187,40 @@@ async def _process_binary_requestor get_custom_llm_provider_from_request_query(request=request)or "openai")+- # Build litellm_params - credentials are resolved by provider config from env- litellm_params = GenericLiteLLMParams()-+ original_container_id, custom_llm_provider = await assert_user_can_access_container(+ container_id=container_id,+ user_api_key_dict=user_api_key_dict,+ custom_llm_provider=custom_llm_provider,+ )- forwarding_params = get_container_forwarding_params(- container_id,- original_container_id,- custom_llm_provider,- )- if "model_id" in forwarding_params:- litellm_params["model_id"] = forwarding_params["model_id"]-- # Get the provider config- container_provider_config = _get_container_provider_config(custom_llm_provider)-- # Create logging object- logging_obj = Logging(- model="container-file-content",- messages=[],- stream=False,- call_type="container_file_content",- start_time=None,- litellm_call_id="",- function_id="",- )-- # Use the HTTP handler to make the request- handler = BaseLLMHTTPHandler()+ data: Dict[str, Any] = {- "container_id": container_id,+ "file_id": file_id,- "custom_llm_provider": custom_llm_provider,++ **get_container_forwarding_params(++ container_id,++ original_container_id,++ custom_llm_provider,++ ),+ }+ processor = ProxyBaseLLMRequestProcessing(data=data)try:- content = await handler.async_container_file_content_handler(- container_id=original_container_id, # Use decoded original ID- file_id=file_id,- container_provider_config=container_provider_config,- litellm_params=litellm_params,- logging_obj=logging_obj,+ content = await processor.base_process_llm_request(+ request=request,+ fastapi_response=fastapi_response,+ user_api_key_dict=user_api_key_dict,+ route_type="aretrieve_container_file_content",+ proxy_logging_obj=proxy_logging_obj,+ llm_router=llm_router,+ general_settings=general_settings,+ proxy_config=proxy_config,+ select_data_generator=select_data_generator,+ model=None,+ user_model=user_model,+ user_temperature=user_temperature,+ user_request_timeout=user_request_timeout,+ user_max_tokens=user_max_tokens,+ user_api_base=user_api_base,+ version=version,)# Determine content type based on common file extensions in the file_id