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
fix timeouts for predibase - they are unstable af
Ishaan Jaff62d4d5e74626
diff --git a/litellm/llms/predibase.py b/litellm/llms/predibase.pyindex d028cb1074a..62dcebb8c1e 100644--- a/litellm/llms/predibase.py+++ b/litellm/llms/predibase.py@@ -61,8 +61,11 @@ async def make_call(model: str,messages: list,logging_obj,+ timeout: Optional[Union[float, httpx.Timeout]],):- response = await client.post(api_base, headers=headers, data=data, stream=True)+ response = await client.post(+ api_base, headers=headers, data=data, stream=True, timeout=timeout+ )if response.status_code != 200:raise PredibaseError(status_code=response.status_code, message=response.text)@@ -484,6 +487,7 @@ class PredibaseChatCompletion(BaseLLM):headers=headers,data=json.dumps(data),stream=stream,+ timeout=timeout,)_response = CustomStreamWrapper(response.iter_lines(),@@ -498,6 +502,7 @@ class PredibaseChatCompletion(BaseLLM):url=completion_url,headers=headers,data=json.dumps(data),+ timeout=timeout,)return self.process_response(model=model,@@ -591,6 +596,7 @@ class PredibaseChatCompletion(BaseLLM):model=model,messages=messages,logging_obj=logging_obj,+ timeout=timeout,),model=model,custom_llm_provider="predibase",