mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
Merge branch 'main' into litellm_fix_azure_function_calling_streaming
This commit is contained in:
commit
dd4439b6a8
23 changed files with 869 additions and 173 deletions
|
@ -4277,8 +4277,8 @@ def get_optional_params(
|
|||
optional_params["stop_sequences"] = stop
|
||||
if max_tokens is not None:
|
||||
optional_params["max_output_tokens"] = max_tokens
|
||||
elif custom_llm_provider == "vertex_ai" and model in (
|
||||
litellm.vertex_chat_models
|
||||
elif custom_llm_provider == "vertex_ai" and (
|
||||
model in litellm.vertex_chat_models
|
||||
or model in litellm.vertex_code_chat_models
|
||||
or model in litellm.vertex_text_models
|
||||
or model in litellm.vertex_code_text_models
|
||||
|
@ -6827,6 +6827,14 @@ def exception_type(
|
|||
llm_provider="palm",
|
||||
response=original_exception.response,
|
||||
)
|
||||
if "504 Deadline expired before operation could complete." in error_str:
|
||||
exception_mapping_worked = True
|
||||
raise Timeout(
|
||||
message=f"PalmException - {original_exception.message}",
|
||||
model=model,
|
||||
llm_provider="palm",
|
||||
request=original_exception.request,
|
||||
)
|
||||
if "400 Request payload size exceeds" in error_str:
|
||||
exception_mapping_worked = True
|
||||
raise ContextWindowExceededError(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue