The exception_type for "gemini" is handled same as "palm" now.
Original code of "gemini" was in both "vertex_ai" and "palm".
Recentry, gemini often throws 503, so adding switch case as vertex_ai.
This is sample output.
Note: logger_fn of exception_logging() is always None. Understanding was not easy for me.
โโโ
{'exception': litellm.BadRequestError: GeminiException - {
"error": {
"code": 503,
"message": "The model is overloaded. Please try again later.",
"status": "UNAVAILABLE"
}
}
โโโ
Type
๐ Bug Fix ๐งน Refactoring
Changes
The exception_type for "gemini" is handled same as "palm" now. Original code of "gemini" was in both "vertex_ai" and "palm".
Recentry, gemini often throws 503, so adding switch case as vertex_ai.
This is sample output. Note: logger_fn of exception_logging() is always None. Understanding was not easy for me. โโโ {'exception': litellm.BadRequestError: GeminiException - { "error": { "code": 503, "message": "The model is overloaded. Please try again later.", "status": "UNAVAILABLE" } } โโโ